File tree Expand file tree Collapse file tree 4 files changed +30
-28
lines changed Expand file tree Collapse file tree 4 files changed +30
-28
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,6 @@ branches:
7
7
8
8
cache : yarn
9
9
10
- before_install :
11
- - export CHROME_BIN=/usr/bin/google-chrome
12
- - export DISPLAY=:99.0
13
- - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
14
- - sudo apt-get install -y libappindicator1 fonts-liberation
15
- - wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
16
- - sudo dpkg -i google-chrome*.deb
17
- - openssl aes-256-cbc -K $encrypted_59b1a6418079_key -iv $encrypted_59b1a6418079_iv -in test/.dropbox_uploader.enc -out test/.dropbox_uploader -d
18
-
19
10
language : node_js
20
11
21
12
node_js :
Original file line number Diff line number Diff line change 2
2
set -e
3
3
ORG=${ORG:- hsldevcom}
4
4
5
- if [[ " $ TRAVIS_BRANCH" = " master" && " $TRAVIS_PULL_REQUEST " = " false" ]]; then
5
+ if [[ -n " $TRAVIS_TAG " || ( " $ TRAVIS_BRANCH" = " master" && " $TRAVIS_PULL_REQUEST " = " false" ) ]]; then
6
6
docker pull $ORG /digitransit-ui:ci-$TRAVIS_COMMIT
7
7
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_AUTH
8
- if [ -z " $TRAVIS_TAG " ]; then
9
- echo " Pushing dev release to docker"
10
- docker tag $ORG /digitransit-ui:ci-$TRAVIS_COMMIT $ORG /digitransit-ui:latest
11
- docker push $ORG /digitransit-ui:latest
12
- else
8
+ if [ -n " $TRAVIS_TAG " ]; then
13
9
echo " Pushing prod release to docker"
14
10
docker tag $ORG /digitransit-ui:ci-$TRAVIS_COMMIT $ORG /digitransit-ui:prod
15
11
docker push $ORG /digitransit-ui:prod
12
+ else
13
+ echo " Pushing dev release to docker"
14
+ docker tag $ORG /digitransit-ui:ci-$TRAVIS_COMMIT $ORG /digitransit-ui:latest
15
+ docker push $ORG /digitransit-ui:latest
16
16
fi
17
17
fi
Original file line number Diff line number Diff line change 4
4
if [ -n " $TRAVIS_TAG " ]; then exit 0; fi
5
5
6
6
set -e
7
+
8
+ export CHROME_BIN=/usr/bin/google-chrome
9
+ export DISPLAY=:99.0
10
+ /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
11
+ sudo apt-get install -y libappindicator1 fonts-liberation
12
+ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
13
+ sudo dpkg -i google-chrome* .deb
14
+
7
15
ORG=${ORG:- hsldevcom}
8
16
yarn install
9
17
Original file line number Diff line number Diff line change 3
3
# do nothing if the build is for tagging a prod release
4
4
if [ -n " $TRAVIS_TAG " ]; then exit 0; fi
5
5
6
+ if [ -z " $BS_ACCESS_KEY " ]; then
7
+ echo " BS_ACCESS_KEY not set, failing build on purpose"
8
+ exit 1
9
+ fi
10
+
6
11
set -e
7
12
ORG=${ORG:- hsldevcom}
8
13
yarn install
9
14
10
- if [ -n " $BS_ACCESS_KEY " ]; then
11
- docker run -d -e CONFIG=hsl -p 127.0.0.1:8080:8080 $ORG /digitransit-ui:ci-$TRAVIS_COMMIT
12
- IDENTIFIER=${TRAVIS_COMMIT} _${VISUAL} yarn run test-visual -- --browser $VISUAL
13
- RESULT=$?
14
- if [ $RESULT -ne 0 ]; then
15
- echo " Uploading test images to https://www.dropbox.com/sh/emh3x8h38egy2k1/AAAq_eLYDxJ0AJAwFffoZqH9a?dl=0"
16
- tar czf gemini-report-$TRAVIS_COMMIT -$VISUAL .tar.gz gemini-report
17
- ./test/dropbox_uploader.sh upload gemini-report-$TRAVIS_COMMIT -$VISUAL .tar.gz /gemini-report-$TRAVIS_COMMIT -$VISUAL .tar.gz
18
- fi
19
- exit $RESULT
20
- else
21
- echo " BS_ACCESS_KEY not set, failing build on purpose"
22
- exit 1
15
+ openssl aes-256-cbc -K $encrypted_59b1a6418079_key -iv $encrypted_59b1a6418079_iv -in test/.dropbox_uploader.enc -out test/.dropbox_uploader -d
16
+ docker run -d -e CONFIG=hsl -p 127.0.0.1:8080:8080 $ORG /digitransit-ui:ci-$TRAVIS_COMMIT
17
+
18
+ set +e
19
+ IDENTIFIER=${TRAVIS_COMMIT} _${VISUAL} yarn run test-visual -- --browser $VISUAL
20
+ RESULT=$?
21
+ if [ $RESULT -ne 0 ]; then
22
+ echo " Uploading test images to https://www.dropbox.com/sh/emh3x8h38egy2k1/AAAq_eLYDxJ0AJAwFffoZqH9a?dl=0"
23
+ tar czf gemini-report-$TRAVIS_COMMIT -$VISUAL .tar.gz gemini-report
24
+ ./test/dropbox_uploader.sh upload gemini-report-$TRAVIS_COMMIT -$VISUAL .tar.gz /gemini-report-$TRAVIS_COMMIT -$VISUAL .tar.gz
23
25
fi
26
+ exit $RESULT
You can’t perform that action at this time.
0 commit comments