Skip to content

Commit 13c2b92

Browse files
build: disable test log reporting to flaky-bot (#3822)
Co-authored-by: Tony Pujals <[email protected]>
1 parent beb84f3 commit 13c2b92

File tree

4 files changed

+2
-63
lines changed

4 files changed

+2
-63
lines changed

.github/workflows/flakybot.yaml

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,26 +28,5 @@ jobs:
2828
contents: 'read'
2929
id-token: 'write'
3030
steps:
31-
- name: authenticate
32-
uses: 'google-github-actions/auth@62cf5bd3e4211a0a0b51f2c6d6a37129d828611d' # v2
33-
with:
34-
workload_identity_provider: 'projects/1046198160504/locations/global/workloadIdentityPools/github-actions-pool/providers/github-actions-provider'
35-
service_account: '[email protected]'
36-
create_credentials_file: 'true'
37-
access_token_lifetime: 600s
38-
- name: download test results
39-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
40-
with:
41-
name: test-results
42-
- name: download FlakyBot
43-
run: |
44-
curl -s -L https://github.com/googleapis/repo-automation-bots/archive/refs/tags/flakybot-v${{ env.FLAKYBOT_VERSION }}.tar.gz -o flakybot.tar.gz
45-
tar xzf flakybot.tar.gz
46-
cp -rT repo-automation-bots-flakybot-v${{ env.FLAKYBOT_VERSION}}/packages/flakybot/ .
47-
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5
48-
with:
49-
cache: true
50-
cache-dependency-path: '${{ github.workspace }}/go.sum'
51-
go-version-file: '${{ github.workspace }}/go.mod'
52-
- name: run FlakyBot
53-
run: go run flakybot.go --repo GoogleCloudPlatform/nodejs-docs-samples --commit_hash ${{github.sha}} --build_url https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
31+
- name: DISABLED run FlakyBot
32+
run: echo flakybot error reporting disabled

.kokoro/build-with-appengine.sh

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,6 @@ trap cleanup EXIT HUP
6161
# Install dependencies and run tests
6262
npm install
6363

64-
# If tests are running against main, configure FlakyBot
65-
# to open issues on failures:
66-
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"release"* ]]; then
67-
export MOCHA_REPORTER_SUITENAME=${PROJECT}
68-
notify_flakybot() {
69-
# Call the original trap function.
70-
cleanup
71-
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
72-
$KOKORO_GFILE_DIR/linux_amd64/flakybot
73-
}
74-
trap notify_flakybot EXIT HUP
75-
fi
76-
7764
npm test
7865

7966
exit $?

.kokoro/build-with-run.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,6 @@ export SERVICE_NAME="${SAMPLE_NAME}-${SUFFIX}"
118118
export NODE_ENV=development
119119
npm install
120120

121-
# If tests are running against main, configure FlakyBot
122-
# to open issues on failures:
123-
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"release"* ]]; then
124-
export MOCHA_REPORTER_SUITENAME=${PROJECT}
125-
notify_flakybot() {
126-
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
127-
$KOKORO_GFILE_DIR/linux_amd64/flakybot
128-
}
129-
trap notify_flakybot EXIT HUP
130-
fi
131-
132121
# Configure Cloud SQL variables for deploying idp-sql sample
133122
export DB_NAME="kokoro_ci"
134123
export DB_USER="kokoro_ci"

.kokoro/build.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -139,22 +139,6 @@ print_logfile() {
139139
echo '----- End ${MOCHA_REPORTER_OUTPUT} -----'
140140
}
141141

142-
# If tests are running against main, configure FlakyBot
143-
# to open issues on failures:
144-
if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"release"* ]]; then
145-
export MOCHA_REPORTER_SUITENAME=${PROJECT}
146-
cleanup() {
147-
chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot
148-
$KOKORO_GFILE_DIR/linux_amd64/flakybot
149-
150-
# We can only set one trap per signal, so run `print_logfile` here
151-
print_logfile
152-
}
153-
trap cleanup EXIT HUP
154-
else
155-
trap print_logfile EXIT HUP
156-
fi
157-
158142
npm test
159143

160144
exit $?

0 commit comments

Comments
 (0)