scratch-l10n/.travis.yml
chrisgarrity 564ee36353 Add build failure notification to slack
Created a slack integration that posts to the scratch-ops channel and ddded the token as ENV variable in travis.

Configured the slack notification to only post on failure.
2019-02-12 13:36:58 +01:00

31 lines
755 B
YAML

language: node_js
node_js:
- 8
- node
cache:
directories:
- node_modules
notifications:
slack:
on_success: never
on_failure: $SLACK_NOTIFICATION_TOKEN
jobs:
include:
- stage: update translations
if: type == cron
script: ./scripts/update-translations.sh
- stage: npm release
if: branch in (master, npm-publish) AND type != cron
node_js: 8
script: npm run build
before_deploy:
- VPKG=$($(npm bin)/json -f package.json version)
- export VERSION=${VPKG/%?/}$(date +%Y%m%d%H%M%S)
- npm --no-git-tag-version version $VERSION
deploy:
provider: npm
skip_cleanup: true
email: $NPM_EMAIL
api_key: $NPM_TOKEN
on:
all_branches: true