Skip to content
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
17 changes: 13 additions & 4 deletions buildkite/terraform/bazel-trusted/bazel-release-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,23 +151,32 @@ steps:
- "/var/lib/gitmirrors:/var/lib/gitmirrors:ro"
- "/var/run/docker.sock:/var/run/docker.sock"
command: |
# Install gh
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can actually delete bazel-release-arm64.yml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The corresponding CI job is already gone.

apt-get update -y && apt-get install wget -y
mkdir -p -m 755 /etc/apt/keyrings
wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null
echo "deb [arch=\$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
apt-get update -y && apt-get install gh -y

echo "+++ Fetching Git notes"
git fetch origin master
git fetch --force origin refs/notes/*:refs/notes/*
git checkout ${BUILDKITE_BRANCH}

echo "+++ Downloading release artifacts"
ARTIFACTS="$(mktemp -d)"
ARTIFACTS="\$(mktemp -d)"
buildkite-agent artifact download "*" "\${ARTIFACTS}/"

echo "+++ Importing GPG release key"
keyfile="$(mktemp --tmpdir)"
keyfile="\$(mktemp --tmpdir)"
chmod 0600 "\${keyfile}"
gsutil cat "gs://bazel-trusted-encrypted-secrets/release-key.gpg.enc" | gcloud kms decrypt --project "bazel-public" --location "global" --keyring "buildkite" --key "bazel-release-key" --ciphertext-file "-" --plaintext-file "\${keyfile}"
gpg --allow-secret-key-import --import "\${keyfile}"
gpg --allow-secret-key-import --import "\${keyfile}"
rm -f "\${keyfile}"

echo "+++ Deploying release"
sed -i -e '403,410d' scripts/ci/build.sh
# Remove GPG signing loop by pattern
sed -i '/rm -f.*sha256/,/done/d' scripts/ci/build.sh

source scripts/ci/build.sh
deploy_release "\${ARTIFACTS}"
12 changes: 8 additions & 4 deletions pipelines/bazel-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,13 @@ steps:
echo "+++ Installing required packages"
sudo apt -y update && sudo apt -y install devscripts pandoc reprepro

echo "+++ Downloading github-release"
curl -L https://mirror.bazel.build/github.com/c4milo/github-release/releases/download/v1.1.0/github-release_v1.1.0_linux_amd64.tar.gz | sudo tar xz -C /usr/local/bin
sudo chown root:root /usr/local/bin/github-release
sudo chmod 0755 /usr/local/bin/github-release
echo "+++ Installing GitHub CLI"
mkdir -p -m 755 /etc/apt/keyrings
wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null
sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=\$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt -y update
sudo apt -y install gh

echo "+++ Checking out Git branch"
git fetch origin ${BUILDKITE_BRANCH}
Expand All @@ -489,6 +492,7 @@ steps:
rm -f "\${keyfile}"

echo "+++ Deploying release"
sed -i '/rm -f.*sha256/,/done/d' scripts/ci/build.sh
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this? Should we just fix the code in the bazel repo?

Copy link
Copy Markdown
Contributor Author

@deepalak56 deepalak56 May 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a safer step to remove the signing loop. Also, this command does nothing if the signing loop wasn't already present. essentially github CLI can handle auth, signing, and artifact checks. But i just left it as is, so that i dont break any for now.

source scripts/ci/build.sh
deploy_release "\${ARTIFACTS}"

Expand Down
Loading