forked from kalisio/k-hubeau
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
42 lines (37 loc) · 1.59 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
language: node_js
node_js:
- '16'
services:
- docker
notifications:
email: false
slack:
rooms:
- secure: WuuqaxaQDy7IBzwfR/kJHLce5TOkGGlTxZ5nOG+S6KaG1hnIk/Xnaewp+mijmrsrSzcKzhhCdkF6Bq/Ib/uC76PpwYdgMlP5UCVnd41C3P8atuDdjeHwE4d9u7jAGkKPEmhVzescFef67B9YZJZR2Z4QOG+4GPDMOti/lyBpHYvyTELZHYQoCWYSXJaFkSvzHNL2QGPICsNVtYxagdejCr9dC6c2D37UUBy3Cew5YIqj1FPaV1WTWy5VE79UwcufjiYy3SKBvw7YN0skCmloDg+2esOFr5QHZgkzAHmiXGsSM4FxGfE1c2TpvSMNFbaZkgDUl6BY+TDtrORIUiUjpb6skGNJgP4deSSLNTZXGcnw3DdQRwNHUO229TRYscdAN3HGsNFD/6rwL3UQMP/UWfjv0YDGirfd19gVpuplo4QgQonCgURva3E7RQrSDtGhzMj7U1IqnHDDsQz3JQYsCsRuXiR+wwoceBozbPr7ue+LtqAlDa+CM8mkTKB6QL0mW8lDlQnIfQ/OLGmHFYu9knab/LOvMYwfHscPxjlSxtednj/KigOjJq7XiLugmLG6QG7nfSVfvAZTgiD+MzBOyxlzECVVlSTLV2YOV87Y1VdvtVcLqD7nkBNUMop+SYH25N/+/65tBX4cvMnMg8ljPXuAPVOQrtZNXFHnyp5Da1Y=
on_success: always
on_failure: always
env:
- JOB=hydro-stations
- JOB=hydro-observations
- JOB=hydro-predictions
- JOB=piezo-stations
- JOB=piezo-observations
before_script:
- docker login -u="$DOCKER_USER" -p="$DOCKER_PASSWORD"
script:
- |
REPO_SLUG="$TRAVIS_REPO_SLUG"
IMAGE_NAME=${REPO_SLUG,,} # to lowercase
if [[ -z "$TRAVIS_TAG" ]]; then
IMAGE_TAG=latest
KRAWLER_TAG=latest
else
IMAGE_TAG=$(node -p -e "require('./package.json').version")
KRAWLER_TAG=$(node -p -e "require('./package.json').peerDependencies['@kalisio/krawler']")
fi
docker build --build-arg KRAWLER_TAG=$KRAWLER_TAG -f dockerfile."$JOB" -t $IMAGE_NAME:"$JOB"-$IMAGE_TAG .
deploy:
provider: script
script: docker push $IMAGE_NAME:"$JOB"-$IMAGE_TAG
on:
all_branches: true