Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Commit f911529

Browse files
authored
Merge branch 'main' into dax/rollout_the_frontend_on_conf_change
2 parents da84257 + 18674f1 commit f911529

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

dev/ci/scripts/wolfi/build-package.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ set -euf -o pipefail
44

55
cd "$(dirname "${BASH_SOURCE[0]}")/../../../.."
66

7+
MAIN_BRANCH="main"
8+
BRANCH="${BUILDKITE_BRANCH:-'default-branch'}"
9+
IS_MAIN=$([ "$BRANCH" = "$MAIN_BRANCH" ] && echo "true" || echo "false")
10+
711
tmpdir=$(mktemp -d -t melange-bin.XXXXXXXX)
812
# shellcheck disable=SC2317
913
# false positive by shellcheck https://github.com/koalaman/shellcheck/issues/2660
@@ -61,8 +65,15 @@ fi
6165

6266
echo " * Building melange package '$name'"
6367

68+
# Sign index, using separate keys from GCS for staging and prod repos
69+
if [[ "$IS_MAIN" == "true" ]]; then
70+
key_path="/keys/sourcegraph-melange-prod.rsa"
71+
else
72+
key_path="/keys/sourcegraph-melange-dev.rsa"
73+
fi
74+
6475
# Build package
65-
melange build "$name.yaml" --arch x86_64 --generate-index false
76+
melange build "$name.yaml" --arch x86_64 --generate-index false --signing-key "$key_path"
6677

6778
# Upload package as build artifact
6879
buildkite-agent artifact upload packages/*/*

0 commit comments

Comments
 (0)