Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a SHA256SUMS file #2890

Merged
merged 2 commits into from
Jul 18, 2024
Merged
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
24 changes: 15 additions & 9 deletions .buildkite/steps/build-github-release.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
#!/bin/bash
set -e
#!/usr/bin/env bash
set -euo pipefail

echo '--- Getting agent version from build meta data'

export FULL_AGENT_VERSION=$(buildkite-agent meta-data get "agent-version-full")
export AGENT_VERSION=$(buildkite-agent meta-data get "agent-version")
export BUILD_VERSION=$(buildkite-agent meta-data get "agent-version-build")
FULL_AGENT_VERSION="$(buildkite-agent meta-data get "agent-version-full")"
AGENT_VERSION="$(buildkite-agent meta-data get "agent-version")"
BUILD_VERSION="$(buildkite-agent meta-data get "agent-version-build")"
export FULL_AGENT_VERSION
export AGENT_VERSION
export BUILD_VERSION

echo "Full agent version: $FULL_AGENT_VERSION"
echo "Agent version: $AGENT_VERSION"
echo "Build version: $BUILD_VERSION"
echo "Full agent version: ${FULL_AGENT_VERSION}"
echo "Agent version: ${AGENT_VERSION}"
echo "Build version: ${BUILD_VERSION}"

echo '--- Downloading binaries'

Expand All @@ -20,7 +23,7 @@ buildkite-agent artifact download "pkg/*" .
function build() {
echo "--- Building release for: $1"

./scripts/build-github-release.sh $1 $AGENT_VERSION
./scripts/build-github-release.sh $1 "${AGENT_VERSION}"
}

# Export the function so we can use it in xargs
Expand All @@ -31,3 +34,6 @@ rm -rf releases

# Loop over all the binaries and build them
ls pkg/* | xargs -I {} bash -c "build {}"

# Add a SHA256SUMS file
(cd releases ; sha256sum * > "buildkite-agent-${AGENT_VERSION}.SHA256SUMS")