Skip to content

Commit d1ceb81

Browse files
authored
Unrolled build for rust-lang#126033
Rollup merge of rust-lang#126033 - Kobzol:fix-toolstate-history, r=ehuss CI: fix publishing of toolstate history Hopefully fixes the upload of toolstate history that I broke in rust-lang#125145. The problem is that the toolstate environment variables need to be available not just when updating `latest.json` through the Bash/Python script, but also in the main CI workflow, where `history` is updated in bootstrap (the toolstate logic is distributed in two places :/ ). The only tricky thing is how to pass the token secret to the CI job, as I need to enable it only for privileged (`auto`/`try`) builds. I assume that the secret is filled only on `rust-lang-ci`, not on `rust-lang`, so I chose the easiest way of just configuring the environment variable globally. We'll see if that works on PR CI. r? `@ehuss`
2 parents 98489f2 + 2fe41c6 commit d1ceb81

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ concurrency:
3838
cancel-in-progress: true
3939
env:
4040
TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate"
41+
# This will be empty in PR jobs.
42+
TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
4143
jobs:
4244
# The job matrix for `calculate_matrix` is defined in src/ci/github-actions/jobs.yml.
4345
# It calculates which jobs should be executed, based on the data of the ${{ github }} context.
@@ -242,6 +244,5 @@ jobs:
242244
shell: bash
243245
if: needs.calculate_matrix.outputs.run_type == 'auto'
244246
env:
245-
TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
246247
TOOLSTATE_ISSUES_API_URL: https://api.github.com/repos/rust-lang/rust/issues
247248
TOOLSTATE_PUBLISH: 1

src/ci/github-actions/jobs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ envs:
5858
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
5959
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
6060
AWS_REGION: us-west-1
61+
TOOLSTATE_PUBLISH: 1
6162

6263
try:
6364
<<: *production

src/ci/publish_toolstate.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ cd rust-toolstate
2424
FAILURE=1
2525
for RETRY_COUNT in 1 2 3 4 5; do
2626
# The purpose of this is to publish the new "current" toolstate in the toolstate repo.
27-
# This happens post-landing, on master.
28-
# (Publishing the per-commit test results happens pre-landing in src/bootstrap/toolstate.rs).
27+
# This happens at the end of auto builds.
28+
# (Publishing the per-commit test results happens in src/bootstrap/toolstate.rs).
2929
"$(ciCheckoutPath)/src/tools/publish_toolstate.py" "$GIT_COMMIT" \
3030
"$GIT_COMMIT_MSG" \
3131
"$MESSAGE_FILE" \

0 commit comments

Comments
 (0)