Skip to content

Commit

Permalink
Update .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby authored Oct 11, 2018
1 parent 7176bbf commit dc74ac7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ jobs:
- 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

This comment has been minimized.

Copy link
@roschaefer

roschaefer Oct 12, 2018

Contributor

@Lulalaby awesome thanks! Could you open a Pull Request next time?

- 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;
Expand All @@ -33,3 +36,8 @@ after_success:
docker tag humanconnection/frontend-nuxt humanconnection/frontend-nuxt:edge;
docker push humanconnection/frontend-nuxt:edge;
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

2 comments on commit dc74ac7

@roschaefer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move ./send.sh sucess $WEBHOOK_URL here, so it only get's executed on deployments

@roschaefer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And you can also pass command line parameters to the script like

./send.sh sucess $WEBHOOK_URL "hey @@Tester a new version was deployed on $TRAVIS_BRANCH"

But you have to edit the script (you can also check it into git)

Please sign in to comment.