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

Fix dra publish step #226

Merged
merged 1 commit into from
Jan 30, 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
12 changes: 6 additions & 6 deletions .buildkite/scripts/dra-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -uo pipefail

# Download artifacts from Buildkite "Build stack installers" step
echo "+++ Downloading artifacts..."
buildkite-agent artifact download 'bin\out\**\*.msi' . --step build-"${WORKFLOW}"
buildkite-agent artifact download 'bin\out\**\*.msi' . --step build-"${DRA_WORKFLOW}"
chmod -R 777 bin/out

echo "+++ Setting DRA params"
Expand All @@ -20,15 +20,15 @@ export VAULT_ADDR VAULT_ROLE_ID VAULT_SECRET_ID
VERSION=$(cat Directory.Build.props | awk -F'[><]' '/<StackVersion>/{print $3}' | tr -d '[:space:]')
export VERSION

if [ "$WORKFLOW" == "staging" ]; then
MANIFEST_URL=$(curl https://artifacts-"$WORKFLOW".elastic.co/beats/latest/"$VERSION".json | jq -r '.manifest_url')
if [ "$DRA_WORKFLOW" == "staging" ]; then
MANIFEST_URL=$(curl https://artifacts-"$DRA_WORKFLOW".elastic.co/beats/latest/"$VERSION".json | jq -r '.manifest_url')
else
MANIFEST_URL=$(curl https://artifacts-"$WORKFLOW".elastic.co/beats/latest/"$VERSION"-SNAPSHOT.json | jq -r '.manifest_url')
MANIFEST_URL=$(curl https://artifacts-"$DRA_WORKFLOW".elastic.co/beats/latest/"$VERSION"-SNAPSHOT.json | jq -r '.manifest_url')
fi

# Publish DRA artifacts
function run_release_manager() {
echo "+++ Publishing $BUILDKITE_BRANCH ${WORKFLOW} DRA artifacts..."
echo "+++ Publishing $BUILDKITE_BRANCH ${DRA_WORKFLOW} DRA artifacts..."
dry_run=""
if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then
dry_run="--dry-run"
Expand All @@ -44,7 +44,7 @@ function run_release_manager() {
--project elastic-stack-installers \
--branch "${BRANCH}" \
--commit "${BUILDKITE_COMMIT}" \
--workflow "${WORKFLOW}" \
--workflow "${DRA_WORKFLOW}" \
--version "${VERSION}" \
--artifact-set main \
--dependency beats:"${MANIFEST_URL}" \
Expand Down