Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: configure buildcopbot #1634

Merged
merged 2 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .kokoro/build-with-appengine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,19 @@ gcloud app deploy --version $GAE_VERSION --no-promote --quiet

# Install dependencies and run tests
npm install

# If tests are running against master, configure Build Cop
# to open issues on failures:
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then
export MOCHA_REPORTER_OUTPUT=sponge_log.xml
export MOCHA_REPORTER=xunit
cleanup() {
chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop
$KOKORO_GFILE_DIR/linux_amd64/buildcop
}
trap cleanup EXIT HUP
fi

npm test

exit $?
13 changes: 13 additions & 0 deletions .kokoro/build-with-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,18 @@ set +x
# Install dependencies and run Nodejs tests.
export NODE_ENV=development
npm install

# If tests are running against master, configure Build Cop
# to open issues on failures:
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then
export MOCHA_REPORTER_OUTPUT=sponge_log.xml
export MOCHA_REPORTER=xunit
cleanup() {
chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop
$KOKORO_GFILE_DIR/linux_amd64/buildcop
}
trap cleanup EXIT HUP
fi

npm test
npm run --if-present e2e-test
12 changes: 12 additions & 0 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,18 @@ export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/secrets-key.json
gcloud auth activate-service-account --key-file "$GOOGLE_APPLICATION_CREDENTIALS"
gcloud config set project $GCLOUD_PROJECT

# If tests are running against master, configure Build Cop
# to open issues on failures:
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then
export MOCHA_REPORTER_OUTPUT=sponge_log.xml
export MOCHA_REPORTER=xunit
cleanup() {
chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop
$KOKORO_GFILE_DIR/linux_amd64/buildcop
}
trap cleanup EXIT HUP
fi

npm test

exit $?