From 65363c5a01b7ba088c624bb8f355fbc2ff10c608 Mon Sep 17 00:00:00 2001 From: Alex Muller Date: Tue, 17 Jan 2017 17:29:16 +0000 Subject: [PATCH 1/2] Add `set -e` to trigger script This will cause the script to fail immediately if one of the commands fails. --- trigger.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trigger.sh b/trigger.sh index 4c0f908b..ca62779d 100755 --- a/trigger.sh +++ b/trigger.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + PAYLOAD='{ "request": { "branch": "master" From b8ef98cb2210c447187e02a84567a79754112fd0 Mon Sep 17 00:00:00 2001 From: Alex Muller Date: Tue, 17 Jan 2017 17:29:37 +0000 Subject: [PATCH 2/2] Update Travis token environment variable Having this in the Travis file is difficult to figure out, so it's easier to put it in the Travis settings. --- .travis.yml | 3 --- .travis/README.md | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index aba8db0e..855fa8f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,6 @@ sudo: false language: node_js node_js: - "0.10" -env: - global: - secure: "15QWA6igmMx1I2YlDrdkxsOi2YJIWNrXmgEtfEoCWR7eJQW2bkUDdzTXYFzxaEPIVMEgO+0pxfGwMWn/9MBhnXCLu9x0f0KqJ/0YfCGXHW21g8J+31zypdiCiw/Ir/dxazP9wpvWFhuqjo9X35zP3Md7TC8u+20uW2Q5KUVyqZM=" before_install: - openssl aes-256-cbc -K $encrypted_909ac1036a94_key -iv $encrypted_909ac1036a94_iv -in .travis/govuk_frontend_toolkit_push.enc -out ~/.ssh/id_rsa -d - chmod 600 ~/.ssh/id_rsa diff --git a/.travis/README.md b/.travis/README.md index 6b77ac1c..260fc802 100644 --- a/.travis/README.md +++ b/.travis/README.md @@ -16,8 +16,9 @@ is the only way we can find that Travis can trigger another job. In this case, the downstream jobs publish the frontend toolkit to npm and RubyGems. -The `env.global.secure` in `/.travis.yml` contains a Travis token that -belongs to [@alexmuller](https://github.com/alexmuller) - as far as we +The [Travis settings](https://travis-ci.org/alphagov/govuk_frontend_toolkit/settings) +contains a Travis token that belongs to +[@alexmuller](https://github.com/alexmuller) - as far as we can tell there's no way to generate one of these that isn't related to a specific user. This token could be replaced with a generic bot account if we created one.