Skip to content

Commit 24ef30f

Browse files
committed
add secure env var for docker login in Travis yml file
1 parent bd149b9 commit 24ef30f

File tree

1 file changed

+76
-93
lines changed

1 file changed

+76
-93
lines changed

.travis.yml

+76-93
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,89 @@
11
matrix:
22
fast_finish: true
33
include:
4-
# QT5 based build with Python 3 // using container based builds and prebuild binary dependencies in osgeo4travis
5-
- os: linux
6-
services: docker
7-
language: python # This lets us use newer python versions from virtualenv
8-
env:
9-
- TRAVIS_CONFIG=linux
10-
- DOCKER_COMPOSE=${TRAVIS_BUILD_DIR}/.docker/docker-compose.travis.yml
11-
- DOCKER_TAG=$(if [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]]; then if [[ $TRAVIS_EVENT_TYPE =~ push ]]; then echo $TRAVIS_BRANCH | sed 's/master/latest/'; elif [[ $TRAVIS_EVENT_TYPE =~ pull_request ]] && [[ `git log --format=%B --no-merges -n 1` =~ \[dockerdeps\] ]]; then echo "PR-$TRAVIS_PULL_REQUEST"; else echo "latest"; fi; else echo "latest"; fi)
12-
- DOCKER_DEPS_PUSH=$(if [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE =~ push ]] || [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE =~ pull_request ]] && [[ `git log --format=%B --no-merges -n 1` =~ \[dockerdeps\] ]]; then echo "true"; else echo "false"; fi )
13-
- DOCKER_DEPS_IMAGE_REBUILD=$( [[ $TRAVIS_COMMIT_MESSAGE =~ '[docker] update dependencies' ]] && echo "true" || echo "false" )
14-
# on cron job, QGIS image is built and push without testing
15-
- DOCKER_QGIS_IMAGE_BUILD_PUSH=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE =~ cron ]] && echo "true" || echo "false" )
16-
- QGIS_LAST_BUILD_SUCCESS=true # TODO use API to know if last build succeed https://developer.travis-ci.com/resource/builds
17-
- TRAVIS_TIMESTAMP=$(date +%s)
18-
- CCACHE_DIR=${HOME}/.ccache
19-
dist: trusty
20-
sudo: false
21-
cache:
22-
apt: true
23-
pip: true
24-
directories:
25-
- $HOME/.ccache
26-
timeout: 1000
27-
compiler: clang
28-
python: "3.5"
29-
addons:
30-
apt:
31-
sources:
32-
packages:
33-
34-
35-
- os: linux
36-
language: python
37-
python: "3.5"
38-
env:
39-
- TRAVIS_CONFIG=code_layout
40-
dist: trusty
41-
sudo: false
42-
cache:
43-
apt: true
44-
addons:
45-
apt:
46-
sources:
47-
- sourceline: 'ppa:jonathonf/backports' # silversearcher-ag backport
48-
- sourceline: 'ppa:sergey-dryabzhinsky/packages' # doxygen
49-
packages:
50-
- doxygen
51-
- graphviz
52-
- txt2tags
53-
- pkg-config
54-
- xvfb
55-
- flip
56-
# used for spell checks
57-
- perl # sipify, lookahead regex in spell check script
58-
- silversearcher-ag
59-
- expect-dev # unbuffer
60-
- coreutils
61-
- libyaml-tiny-perl
62-
# OSX based build with QT4 and Python 2
63-
# - os: osx
64-
# osx_image: xcode8.3 # MacOS 10.12: Sierra
65-
# cache:
66-
# pip: true
67-
# directories:
68-
# - $HOME/.ccache
69-
# env:
70-
# - TRAVIS_CONFIG=macos
71-
# - IGNORE_BUILD_FAILURES=YES
72-
#
73-
# allow_failures:
74-
# - os: osx
75-
4+
- os: linux
5+
services: docker
6+
language: python
7+
env:
8+
- TRAVIS_CONFIG=linux
9+
- DOCKER_COMPOSE=${TRAVIS_BUILD_DIR}/.docker/docker-compose.travis.yml
10+
- DOCKER_TAG=$(if [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]]; then if [[ $TRAVIS_EVENT_TYPE
11+
=~ push ]]; then echo $TRAVIS_BRANCH | sed 's/master/latest/'; elif [[ $TRAVIS_EVENT_TYPE
12+
=~ pull_request ]] && [[ `git log --format=%B --no-merges -n 1` =~ \[dockerdeps\]
13+
]]; then echo "PR-$TRAVIS_PULL_REQUEST"; else echo "latest"; fi; else echo "latest";
14+
fi)
15+
- DOCKER_DEPS_PUSH=$(if [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE
16+
=~ push ]] || [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE
17+
=~ pull_request ]] && [[ `git log --format=%B --no-merges -n 1` =~ \[dockerdeps\]
18+
]]; then echo "true"; else echo "false"; fi )
19+
- DOCKER_DEPS_IMAGE_REBUILD=$( [[ $TRAVIS_COMMIT_MESSAGE =~ '[docker] update dependencies'
20+
]] && echo "true" || echo "false" )
21+
- DOCKER_QGIS_IMAGE_BUILD_PUSH=$( [[ $TRAVIS_REPO_SLUG =~ qgis/QGIS ]] && [[ $TRAVIS_EVENT_TYPE
22+
=~ cron ]] && echo "true" || echo "false" )
23+
- QGIS_LAST_BUILD_SUCCESS=true
24+
- TRAVIS_TIMESTAMP=$(date +%s)
25+
- CCACHE_DIR=${HOME}/.ccache
26+
dist: trusty
27+
sudo: false
28+
cache:
29+
apt: true
30+
pip: true
31+
directories:
32+
- "$HOME/.ccache"
33+
timeout: 1000
34+
compiler: clang
35+
python: '3.5'
36+
addons:
37+
apt:
38+
sources:
39+
packages:
40+
- os: linux
41+
language: python
42+
python: '3.5'
43+
env:
44+
- TRAVIS_CONFIG=code_layout
45+
dist: trusty
46+
sudo: false
47+
cache:
48+
apt: true
49+
addons:
50+
apt:
51+
sources:
52+
- sourceline: ppa:jonathonf/backports
53+
- sourceline: ppa:sergey-dryabzhinsky/packages
54+
packages:
55+
- doxygen
56+
- graphviz
57+
- txt2tags
58+
- pkg-config
59+
- xvfb
60+
- flip
61+
- perl
62+
- silversearcher-ag
63+
- expect-dev
64+
- coreutils
65+
- libyaml-tiny-perl
7666
git:
7767
depth: 120
78-
79-
notifications:
80-
irc: "chat.freenode.net#qgis-test"
81-
on_failure: change
82-
on_success: change
83-
skip_join: true
84-
8568
notifications:
8669
webhooks:
8770
urls:
88-
- https://webhooks.gitter.im/e/467e3aff72e344d1dae3
89-
on_success: change # options: [always|never|change] default: always
90-
on_failure: always # options: [always|never|change] default: always
91-
on_start: never # default: never
92-
71+
- https://webhooks.gitter.im/e/467e3aff72e344d1dae3
72+
on_success: change
73+
on_failure: always
74+
on_start: never
9375
before_install:
94-
- ./.ci/travis/${TRAVIS_CONFIG}/before_install.sh
95-
76+
- "./.ci/travis/${TRAVIS_CONFIG}/before_install.sh"
9677
install:
97-
- ./.ci/travis/${TRAVIS_CONFIG}/install.sh
98-
78+
- "./.ci/travis/${TRAVIS_CONFIG}/install.sh"
9979
before_script:
100-
- ./.ci/travis/${TRAVIS_CONFIG}/before_script.sh
101-
80+
- "./.ci/travis/${TRAVIS_CONFIG}/before_script.sh"
10281
script:
103-
- ./.ci/travis/${TRAVIS_CONFIG}/script.sh
104-
82+
- "./.ci/travis/${TRAVIS_CONFIG}/script.sh"
10583
after_script:
106-
- ./.ci/travis/${TRAVIS_CONFIG}/after_script.sh
84+
- "./.ci/travis/${TRAVIS_CONFIG}/after_script.sh"
85+
env:
86+
global:
87+
# docker usr & pwd
88+
- secure: Cg2F2wKuh8q4dAPZW/vXHhNUMsvwAlNGTYQSXmiuGiHupYZ4rkOPagal9HGFKcp09Fpjus/yGmIh9HqNeOQB498xIbqbfCDvD57haFwXXOWE259WRgu6jE41+B2jLuyjUog3dbHoUwLOMmdkm1qI4EOTekyAFv9fhHfkFMNSlFA=
89+
- secure: CvQJKEvzm8d7YBUoK9CjDdRkNKFBxs4U4k4q0m7yMg2NnUNgZh1rA26BDwFQJWFODiWNeYMlw6WlPfMiLi8rBTPZodtzapiasExbLc7jX7tHKkuEJsQBC4pcZfQ8FbPZxhR4W42Aj36nfqmE+QBZA2BPwAVmrF3buFN3j0oDzUM=

0 commit comments

Comments
 (0)