-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
80 lines (62 loc) · 3.37 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
language: bash
sudo: required
services:
- docker
env:
global:
- CONTAINER_IMAGE_PRIMARY=web-gis-imageprocessing-gdal-grass
- CONTAINER_IMAGE_SECONDARY=web-gis-imageprocessing-gdal-grass-postgis
- CONTAINER_IMAGE_TERTIARY=web-gis-imageprocessing-gdal-grass-postgis-r
jobs:
include:
- stage: 'Primary image: Tomcat + Gdal + Grass'
before_script:
- export BUILD_DATE=$(date '+%d/%m/%Y %T UTC' -u)
- docker pull $USERNAME/$CONTAINER_IMAGE_PRIMARY:latest || true
script:
- docker build --cache-from $USERNAME/$CONTAINER_IMAGE_PRIMARY:latest --build-arg BUILD_DATE="${BUILD_DATE}" --build-arg TRAVIS_COMMIT="${TRAVIS_COMMIT}" --tag $USERNAME/$CONTAINER_IMAGE_PRIMARY:$TRAVIS_COMMIT --tag $USERNAME/$CONTAINER_IMAGE_PRIMARY:latest -f Dockerfile.gdal .
after_script:
- docker images
before_deploy:
- echo $PASSWORD | docker login -u $USERNAME --password-stdin
deploy:
provider: script
script: docker push $USERNAME/$CONTAINER_IMAGE_PRIMARY:$TRAVIS_COMMIT && docker push $USERNAME/$CONTAINER_IMAGE_PRIMARY:latest
on:
branch: master
after_deploy:
- curl --header "Content-Type: application/json" --request POST --data '{}' https://hooks.microbadger.com/images/autimio/postgis/hash
- stage: 'Secondary image: Tomcat + Gdal + Grass + PostgreSQL + PostGIS'
before_script:
- export BUILD_DATE=$(date '+%d/%m/%Y %T UTC' -u)
- docker pull $USERNAME/$CONTAINER_IMAGE_SECONDARY:latest || true
script:
- docker build --cache-from $USERNAME/$CONTAINER_IMAGE_SECONDARY:latest --build-arg BUILD_DATE="${BUILD_DATE}" --build-arg TRAVIS_COMMIT="${TRAVIS_COMMIT}" --tag $USERNAME/$CONTAINER_IMAGE_SECONDARY:$TRAVIS_COMMIT --tag $USERNAME/$CONTAINER_IMAGE_SECONDARY:latest -f Dockerfile.gdal_postgis .
after_script:
- docker images
before_deploy:
- echo $PASSWORD | docker login -u $USERNAME --password-stdin
deploy:
provider: script
script: docker push $USERNAME/$CONTAINER_IMAGE_SECONDARY:$TRAVIS_COMMIT && docker push $USERNAME/$CONTAINER_IMAGE_SECONDARY:latest
on:
branch: master
after_deploy:
- curl --header "Content-Type: application/json" --request POST --data '{}' https://hooks.microbadger.com/images/autimio/postgis/hash
- stage: 'Tertiary image: Tomcat + Gdal + Grass + PostgreSQL + PostGIS + R + RGeoLibs'
before_script:
- export BUILD_DATE=$(date '+%d/%m/%Y %T UTC' -u)
- docker pull $USERNAME/$CONTAINER_IMAGE_TERTIARY:latest || true
script:
- docker build --cache-from $USERNAME/$CONTAINER_IMAGE_TERTIARY:latest --build-arg BUILD_DATE="${BUILD_DATE}" --build-arg TRAVIS_COMMIT="${TRAVIS_COMMIT}" --tag $USERNAME/$CONTAINER_IMAGE_TERTIARY:$TRAVIS_COMMIT --tag $USERNAME/$CONTAINER_IMAGE_TERTIARY:latest -f Dockerfile.gdal_postgis_r .
after_script:
- docker images
before_deploy:
- echo $PASSWORD | docker login -u $USERNAME --password-stdin
deploy:
provider: script
script: docker push $USERNAME/$CONTAINER_IMAGE_TERTIARY:$TRAVIS_COMMIT && docker push $USERNAME/$CONTAINER_IMAGE_TERTIARY:latest
on:
branch: master
after_deploy:
- curl --header "Content-Type: application/json" --request POST --data '{}' https://hooks.microbadger.com/images/autimio/postgis/hash