-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy path.travis.yml
49 lines (45 loc) · 1.69 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
language: node_js
node_js:
- "10"
services:
- docker
cache:
yarn: true
directories:
- node_modules
# install current version of yarn
before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
jobs:
include:
- stage: Test and Build
script:
- yarn install --frozen-lockfile --non-interactive
- yarn run ci
- script:
- docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/frontend-nuxt .
after_success:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh success $WEBHOOK_URL
- if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" &&
docker tag humanconnection/frontend-nuxt humanconnection/frontend-nuxt:alpha &&
docker push humanconnection/frontend-nuxt:alpha &&
wget https://raw.githubusercontent.com/Human-Connection/Discord-Bot/develop/tester.sh &&
chmod +x tester.sh &&
./tester.sh alpha $WEBHOOK_URL;
fi
- if [ $TRAVIS_BRANCH == "develop" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" &&
docker tag humanconnection/frontend-nuxt humanconnection/frontend-nuxt:edge &&
docker push humanconnection/frontend-nuxt:edge &&
wget https://raw.githubusercontent.com/Human-Connection/Discord-Bot/develop/tester.sh &&
chmod +x tester.sh &&
./tester.sh staging $WEBHOOK_URL;
fi
after_failure:
- wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh
- chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL