forked from UCL-EO/geog0111
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
25 lines (25 loc) · 910 Bytes
/
.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
services:
- docker
#env:
# global:
# - IMAGE_NAME=ucleo/geog0111
before_script:
- repo="$(grep CONDA_DEFAULT_ENV Docker/Dockerfile | awk -F= '{ print $2; exit }')"
- version="$(grep BASE_VERSION Docker/Dockerfile | awk -F= '{ print $2; exit }')"
- IMAGE_NAME=ucleo/$repo
script:
- docker build --file Docker/Dockerfile --tag "$IMAGE_NAME" .
#- docker run -it "$IMAGE_NAME" bash -ic 'source ~/.dockenvrc && cd ~/geog0111 && bin/notebook-run-2.sh'
#- docker run -it "$IMAGE_NAME" bash -ic 'source ~/.dockenvrc && cd ~/geog0111 && mkdocs gh-deploy --force'
after_script:
- docker images
before_deploy:
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- docker tag "$IMAGE_NAME" "${IMAGE_NAME}:latest"
- docker tag "$IMAGE_NAME" "${IMAGE_NAME}:${version}"
deploy:
provider: script
script:
- docker push "${IMAGE_NAME}:latest" && docker push "${IMAGE_NAME}:${version}"
on:
branch: master