Skip to content

Commit

Permalink
Adjust how to initialize the build variables
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandros, Sapranidis <[email protected]>
  • Loading branch information
alexsapran committed Jul 14, 2023
1 parent 44d42f5 commit f56cce9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
18 changes: 13 additions & 5 deletions .buildkite/pipeline.elastic-agent-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@ steps:
provider: "gcp"
machineType: "c2-standard-16"
command: |
export DEV=$(buildkite-agent meta-data get DEV --default "true")
export ManifestURL=$(buildkite-agent meta-data get ManifestURL --default "")
export MAGEFILE_VERBOSE=$(buildkite-agent meta-data get MAGEFILE_VERBOSE --default "0")
if [[ -z "${DEV}" ]]; then
export DEV=$(buildkite-agent meta-data get DEV --default "true")
fi
if [[ -z "${ManifestURL}" ]]; then
export ManifestURL=$(buildkite-agent meta-data get ManifestURL --default "")
fi
if [[ -z "${MAGEFILE_VERBOSE}" ]]; then
export MAGEFILE_VERBOSE=$(buildkite-agent meta-data get MAGEFILE_VERBOSE --default "0")
fi
.buildkite/scripts/steps/package.sh
artifact_paths:
Expand All @@ -72,8 +78,10 @@ steps:
DRA_PROJECT_ARTIFACT_ID: "elastic-agent-package"
command: |
buildkite-agent artifact download 'build/distributions/**' build/distributions --step package_elastic-agent
export MAGEFILE_VERBOSE=$(buildkite-agent meta-data get MAGEFILE_VERBOSE --default "0")
if [[ -n "${DRA_DRY_RUN}" ]]; then
if [[ -z "${MAGEFILE_VERBOSE}" ]]; then
export MAGEFILE_VERBOSE=$(buildkite-agent meta-data get MAGEFILE_VERBOSE --default "0")
fi
if [[ -z "${DRA_DRY_RUN}" ]]; then
DRA_DRY_RUN=$(buildkite-agent meta-data get DRA_DRY_RUN --default "--dry-run")
export DRA_DRY_RUN
fi
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/dra-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function run_release_manager() {
exit 1
fi

echo "+++ Publishing $BUILDKITE_BRANCH ${WORKFLOW} DRA artifacts..."
echo "+++ :hammer_and_pick: Publishing $BUILDKITE_BRANCH ${WORKFLOW} DRA artifacts..."
if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then
# force main branch on PR's or it won't execute
# because the PR branch does not have a project folder in release-manager
Expand Down

0 comments on commit f56cce9

Please sign in to comment.