Skip to content

Commit 59c4b87

Browse files
chore(IDX): encrypt bep (dfinity#3684)
Only upload encrypted BEP files. --------- Co-authored-by: IDX GitHub Automation <[email protected]>
1 parent 8f754dd commit 59c4b87

File tree

10 files changed

+266
-4
lines changed

10 files changed

+266
-4
lines changed

.github/actions/bazel-test-all/action.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ inputs:
2020
required: false
2121
SSH_PRIVATE_KEY_BACKUP_POD:
2222
required: false
23+
GPG_PASSPHRASE:
24+
required: false
2325

2426
runs:
2527
using: "composite"
@@ -60,6 +62,11 @@ runs:
6062
rm "$exportout"
6163
echo "BEP events exported to honeycomb!"
6264
fi
65+
if [ -n "$GPG_PASSPHRASE" ] && [ -f ./bazel-bep.pb ]; then
66+
gpg --symmetric --cipher-algo AES256 -o bazel-bep.pb.gpg \
67+
--passphrase "$GPG_PASSPHRASE" --batch --yes bazel-bep.pb
68+
fi
69+
rm -f bazel-bep.pb
6370
6471
# output node name to gihub step summary
6572
[ -n "${NODE_NAME:-}" ] && echo "Run on node: $NODE_NAME" >>$GITHUB_STEP_SUMMARY
@@ -78,3 +85,4 @@ runs:
7885
CI_PULL_REQUEST_TARGET_BRANCH_NAME: ${{ github.event.pull_request.base.ref }}
7986
MERGE_BASE_SHA: ${{ github.event.pull_request.base.sha }}
8087
SSH_PRIVATE_KEY_BACKUP_POD: ${{ inputs.SSH_PRIVATE_KEY_BACKUP_POD }}
88+
GPG_PASSPHRASE: ${{ inputs.GPG_PASSPHRASE }}

.github/workflows-source/ci-main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ anchors:
8686
if-no-files-found: ignore
8787
compression-level: 9
8888
path: |
89-
bazel-bep.pb
89+
bazel-bep.pb.gpg
9090
profile.json
9191
9292
jobs:
@@ -153,6 +153,8 @@ jobs:
153153
# check if PR title contains release and set timeout filters accordingly
154154
BAZEL_EXTRA_ARGS: ${{ env.BAZEL_EXTRA_ARGS }}
155155
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
156+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
157+
- <<: *bazel-bep
156158
- <<: *bazel-upload
157159

158160
bazel-build-all-config-check:
@@ -169,6 +171,8 @@ jobs:
169171
BAZEL_COMMAND: "build"
170172
BAZEL_TARGETS: "//rs/..."
171173
BAZEL_CI_CONFIG: "--config=check --config=ci --keep_going"
174+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
175+
- <<: *bazel-bep
172176

173177
bazel-test-macos-intel:
174178
name: Bazel Test macOS Intel
@@ -200,6 +204,8 @@ jobs:
200204
BAZEL_EXTRA_ARGS: '--test_tag_filters=test_macos'
201205
BAZEL_STARTUP_ARGS: "--output_base /var/tmp/bazel-output/${{ github.run_id }}"
202206
BAZEL_TARGETS: "//rs/... //publish/binaries/..."
207+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
208+
- <<: *bazel-bep
203209
- name: Purge Bazel Output
204210
if: always()
205211
shell: bash
@@ -218,6 +224,8 @@ jobs:
218224
BAZEL_COMMAND: "build"
219225
BAZEL_TARGETS: "//rs/..."
220226
BAZEL_EXTRA_ARGS: "--keep_going --config=fuzzing --build_tag_filters=libfuzzer"
227+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
228+
- <<: *bazel-bep
221229

222230
bazel-build-fuzzers-afl:
223231
name: Bazel Build Fuzzers AFL
@@ -231,6 +239,8 @@ jobs:
231239
BAZEL_COMMAND: "build"
232240
BAZEL_TARGETS: "//rs/..."
233241
BAZEL_EXTRA_ARGS: "--keep_going --config=afl"
242+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
243+
- <<: *bazel-bep
234244

235245
python-ci-tests:
236246
name: Python CI Tests

.github/workflows-source/release-testing.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ anchors:
5858
if-no-files-found: ignore
5959
compression-level: 9
6060
path: |
61-
bazel-bep.pb
61+
bazel-bep.pb.gpg
6262
profile.json
6363
6464
jobs:
@@ -82,6 +82,8 @@ jobs:
8282
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
8383
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_nightly"
8484
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
85+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
86+
- <<: *bazel-bep
8587

8688
bazel-system-test-staging:
8789
name: Bazel System Test Staging
@@ -98,6 +100,8 @@ jobs:
98100
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
99101
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_staging"
100102
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
103+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
104+
- <<: *bazel-bep
101105

102106
bazel-system-test-hotfix:
103107
name: Bazel System Test Hotfix
@@ -115,6 +119,8 @@ jobs:
115119
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
116120
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_hotfix"
117121
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
122+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
123+
- <<: *bazel-bep
118124

119125
dependency-scan-release-cut:
120126
name: Dependency Scan for Release
@@ -187,3 +193,9 @@ jobs:
187193
BAZEL_CI_CONFIG: "--config=systest --repository_cache=/cache/bazel"
188194
BAZEL_EXTRA_ARGS: "--keep_going --test_timeout=7200 --test_env=OLD_VERSION=${{ matrix.version }}"
189195
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
196+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
197+
- <<: *bazel-bep
198+
name: Upload bazel bep for version ${{ matrix.version }}
199+
with:
200+
<<: *bazel-bep-with
201+
name: ${{ github.job }}-${{ matrix.version }}-bep

.github/workflows-source/schedule-daily.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ anchors:
4949
if-no-files-found: ignore
5050
compression-level: 9
5151
path: |
52-
bazel-bep.pb
52+
bazel-bep.pb.gpg
5353
profile.json
5454
5555
jobs:
@@ -118,6 +118,8 @@ jobs:
118118
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=fi_tests_nightly --test_env=SSH_AUTH_SOCK --test_timeout=43200"
119119
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
120120
SSH_PRIVATE_KEY_BACKUP_POD: ${{ secrets.SSH_PRIVATE_KEY_BACKUP_POD }}
121+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
122+
- <<: *bazel-bep
121123

122124
nns-tests-nightly:
123125
name: Bazel Test NNS Nightly
@@ -136,6 +138,8 @@ jobs:
136138
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=nns_tests_nightly --test_env=SSH_AUTH_SOCK --test_env=NNS_CANISTER_UPGRADE_SEQUENCE=all"
137139
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
138140
SSH_PRIVATE_KEY_BACKUP_POD: ${{ secrets.SSH_PRIVATE_KEY_BACKUP_POD }}
141+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
142+
- <<: *bazel-bep
139143

140144
system-tests-benchmarks-nightly:
141145
name: Bazel System Test Benchmarks
@@ -159,6 +163,8 @@ jobs:
159163
# note: there's just one performance cluster, so the job can't be parallelized
160164
BAZEL_EXTRA_ARGS: "--test_tag_filters=system_test_benchmark --//bazel:enable_upload_perf_systest_results=True --keep_going --jobs 1"
161165
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
166+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
167+
- <<: *bazel-bep
162168
- name: Post Slack Notification
163169
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
164170
if: failure()

.github/workflows-source/schedule-hourly.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ anchors:
4848
if-no-files-found: ignore
4949
compression-level: 9
5050
path: |
51-
bazel-bep.pb
51+
bazel-bep.pb.gpg
5252
profile.json
5353
5454
jobs:
@@ -66,6 +66,8 @@ jobs:
6666
BAZEL_CI_CONFIG: "--config=ci"
6767
BAZEL_COMMAND: "build"
6868
BAZEL_EXTRA_ARGS: "--repository_cache= --disk_cache= --noremote_accept_cached --remote_instance_name=${CI_COMMIT_SHA} --@rules_rust//rust/settings:pipelined_compilation=True"
69+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
70+
- <<: *bazel-bep
6971

7072
bazel-system-test-hourly:
7173
name: Bazel System Tests Hourly
@@ -85,6 +87,8 @@ jobs:
8587
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
8688
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_hourly"
8789
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
90+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
91+
- <<: *bazel-bep
8892

8993
bazel-run-fuzzers-hourly:
9094
name: Bazel Run Fuzzers Hourly

.github/workflows/ci-main.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,20 @@ jobs:
101101
# check if PR title contains release and set timeout filters accordingly
102102
BAZEL_EXTRA_ARGS: ${{ env.BAZEL_EXTRA_ARGS }}
103103
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
104+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
105+
- name: Upload bazel-bep
106+
# runs only if previous step succeeded or failed;
107+
# we avoid collecting artifacts of jobs that were cancelled
108+
if: success() || failure()
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: ${{ github.job }}-bep
112+
retention-days: 14
113+
if-no-files-found: ignore
114+
compression-level: 9
115+
path: |
116+
bazel-bep.pb.gpg
117+
profile.json
104118
- name: Upload bazel-targets
105119
uses: actions/upload-artifact@v4
106120
with:
@@ -136,6 +150,20 @@ jobs:
136150
BAZEL_COMMAND: "build"
137151
BAZEL_TARGETS: "//rs/..."
138152
BAZEL_CI_CONFIG: "--config=check --config=ci --keep_going"
153+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
154+
- name: Upload bazel-bep
155+
# runs only if previous step succeeded or failed;
156+
# we avoid collecting artifacts of jobs that were cancelled
157+
if: success() || failure()
158+
uses: actions/upload-artifact@v4
159+
with:
160+
name: ${{ github.job }}-bep
161+
retention-days: 14
162+
if-no-files-found: ignore
163+
compression-level: 9
164+
path: |
165+
bazel-bep.pb.gpg
166+
profile.json
139167
bazel-test-macos-intel:
140168
name: Bazel Test macOS Intel
141169
timeout-minutes: 130
@@ -168,6 +196,20 @@ jobs:
168196
BAZEL_EXTRA_ARGS: '--test_tag_filters=test_macos'
169197
BAZEL_STARTUP_ARGS: "--output_base /var/tmp/bazel-output/${{ github.run_id }}"
170198
BAZEL_TARGETS: "//rs/... //publish/binaries/..."
199+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
200+
- name: Upload bazel-bep
201+
# runs only if previous step succeeded or failed;
202+
# we avoid collecting artifacts of jobs that were cancelled
203+
if: success() || failure()
204+
uses: actions/upload-artifact@v4
205+
with:
206+
name: ${{ github.job }}-bep
207+
retention-days: 14
208+
if-no-files-found: ignore
209+
compression-level: 9
210+
path: |
211+
bazel-bep.pb.gpg
212+
profile.json
171213
- name: Purge Bazel Output
172214
if: always()
173215
shell: bash
@@ -194,6 +236,20 @@ jobs:
194236
BAZEL_COMMAND: "build"
195237
BAZEL_TARGETS: "//rs/..."
196238
BAZEL_EXTRA_ARGS: "--keep_going --config=fuzzing --build_tag_filters=libfuzzer"
239+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
240+
- name: Upload bazel-bep
241+
# runs only if previous step succeeded or failed;
242+
# we avoid collecting artifacts of jobs that were cancelled
243+
if: success() || failure()
244+
uses: actions/upload-artifact@v4
245+
with:
246+
name: ${{ github.job }}-bep
247+
retention-days: 14
248+
if-no-files-found: ignore
249+
compression-level: 9
250+
path: |
251+
bazel-bep.pb.gpg
252+
profile.json
197253
bazel-build-fuzzers-afl:
198254
name: Bazel Build Fuzzers AFL
199255
runs-on:
@@ -215,6 +271,20 @@ jobs:
215271
BAZEL_COMMAND: "build"
216272
BAZEL_TARGETS: "//rs/..."
217273
BAZEL_EXTRA_ARGS: "--keep_going --config=afl"
274+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
275+
- name: Upload bazel-bep
276+
# runs only if previous step succeeded or failed;
277+
# we avoid collecting artifacts of jobs that were cancelled
278+
if: success() || failure()
279+
uses: actions/upload-artifact@v4
280+
with:
281+
name: ${{ github.job }}-bep
282+
retention-days: 14
283+
if-no-files-found: ignore
284+
compression-level: 9
285+
path: |
286+
bazel-bep.pb.gpg
287+
profile.json
218288
python-ci-tests:
219289
name: Python CI Tests
220290
runs-on:

.github/workflows/release-testing.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ jobs:
5151
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
5252
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_nightly"
5353
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
54+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
55+
- name: Upload bazel-bep
56+
# runs only if previous step succeeded or failed;
57+
# we avoid collecting artifacts of jobs that were cancelled
58+
if: success() || failure()
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: ${{ github.job }}-bep
62+
retention-days: 14
63+
if-no-files-found: ignore
64+
compression-level: 9
65+
path: |
66+
bazel-bep.pb.gpg
67+
profile.json
5468
bazel-system-test-staging:
5569
name: Bazel System Test Staging
5670
runs-on:
@@ -80,6 +94,20 @@ jobs:
8094
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
8195
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_staging"
8296
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
97+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
98+
- name: Upload bazel-bep
99+
# runs only if previous step succeeded or failed;
100+
# we avoid collecting artifacts of jobs that were cancelled
101+
if: success() || failure()
102+
uses: actions/upload-artifact@v4
103+
with:
104+
name: ${{ github.job }}-bep
105+
retention-days: 14
106+
if-no-files-found: ignore
107+
compression-level: 9
108+
path: |
109+
bazel-bep.pb.gpg
110+
profile.json
83111
bazel-system-test-hotfix:
84112
name: Bazel System Test Hotfix
85113
runs-on:
@@ -109,6 +137,20 @@ jobs:
109137
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel"
110138
BAZEL_EXTRA_ARGS: "--keep_going --test_tag_filters=system_test_hotfix"
111139
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
140+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
141+
- name: Upload bazel-bep
142+
# runs only if previous step succeeded or failed;
143+
# we avoid collecting artifacts of jobs that were cancelled
144+
if: success() || failure()
145+
uses: actions/upload-artifact@v4
146+
with:
147+
name: ${{ github.job }}-bep
148+
retention-days: 14
149+
if-no-files-found: ignore
150+
compression-level: 9
151+
path: |
152+
bazel-bep.pb.gpg
153+
profile.json
112154
dependency-scan-release-cut:
113155
name: Dependency Scan for Release
114156
runs-on:
@@ -212,3 +254,17 @@ jobs:
212254
BAZEL_CI_CONFIG: "--config=systest --repository_cache=/cache/bazel"
213255
BAZEL_EXTRA_ARGS: "--keep_going --test_timeout=7200 --test_env=OLD_VERSION=${{ matrix.version }}"
214256
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_TOKEN }}
257+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
258+
- # runs only if previous step succeeded or failed;
259+
# we avoid collecting artifacts of jobs that were cancelled
260+
if: success() || failure()
261+
uses: actions/upload-artifact@v4
262+
name: Upload bazel bep for version ${{ matrix.version }}
263+
with:
264+
retention-days: 14
265+
if-no-files-found: ignore
266+
compression-level: 9
267+
path: |
268+
bazel-bep.pb.gpg
269+
profile.json
270+
name: ${{ github.job }}-${{ matrix.version }}-bep

0 commit comments

Comments
 (0)