Use test-failures scripts from pulumi/home
Add $PULUMI_HOME to reference the checkout of `pulumi/home`.
This commit is contained in:
parent
487fc24354
commit
ffc74c15eb
|
@ -11,6 +11,7 @@ git:
|
|||
depth: false
|
||||
before_install:
|
||||
- source ./build/travis/prepare-environment.sh
|
||||
- . "${PULUMI_HOME}/scripts/keep-failed-tests.sh"
|
||||
install:
|
||||
- source ./build/travis/install-common-toolchain.sh
|
||||
before_script:
|
||||
|
@ -18,6 +19,6 @@ before_script:
|
|||
script:
|
||||
- make travis_${TRAVIS_EVENT_TYPE}
|
||||
after_failure:
|
||||
- ./build/travis/upload-failure-logs
|
||||
- "${PULUMI_HOME}/scripts/upload-failed-tests"
|
||||
notifications:
|
||||
webhooks: https://ufci1w66n3.execute-api.us-west-2.amazonaws.com/stage/travis
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
# outer shell, so we don't want to set options like nounset because
|
||||
# they would be set in the outer shell as well, so do as much logic as
|
||||
# we can in a subshell.
|
||||
|
||||
export PULUMI_HOME="$(go env GOPATH)/src/github.com/pulumi/home"
|
||||
|
||||
(
|
||||
set -o nounset -o errexit -o pipefail
|
||||
|
||||
|
@ -11,17 +14,12 @@
|
|||
fi
|
||||
|
||||
# We have some shared scripts in pulumi/home, and we use them in other steps
|
||||
git clone git@github.com:pulumi/home "$(go env GOPATH)/src/github.com/pulumi/home"
|
||||
git clone git@github.com:pulumi/home "${PULUMI_HOME}"
|
||||
|
||||
# If we have an NPM token, put it in the .npmrc file, so we can use it:
|
||||
if [ ! -z "${NPM_TOKEN:-}" ]; then
|
||||
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > ~/.npmrc
|
||||
fi
|
||||
)
|
||||
|
||||
# If the sub shell failed, bail out now.
|
||||
[ "$?" -eq 0 ] || exit 1
|
||||
) || exit 1 # Abort outer script if subshell fails.
|
||||
|
||||
export PULUMI_ROOT=/opt/pulumi
|
||||
export PULUMI_FAILED_TESTS_DIR=$(mktemp -d)
|
||||
echo "PULUMI_FAILED_TESTS_DIR=${PULUMI_FAILED_TESTS_DIR}"
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -o nounset -o errexit -o pipefail
|
||||
|
||||
tar czf - -C "${PULUMI_FAILED_TESTS_DIR}" . | aws --region us-west-2 s3 cp - "s3://eng.pulumi.com/travis-logs/${TRAVIS_REPO_SLUG}/${TRAVIS_JOB_NUMBER}/failed-tests.tar.gz" --acl bucket-owner-full-control
|
||||
echo "one or more tests failed, to view detailed failure information, visit https://s3.console.aws.amazon.com/s3/buckets/eng.pulumi.com/travis-logs/${TRAVIS_REPO_SLUG}/${TRAVIS_JOB_NUMBER}/"
|
Loading…
Reference in a new issue