File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed
Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -348,6 +348,19 @@ steps:
348348 - .buildkite/scripts/steps/beats_tests.sh
349349 - .buildkite/hooks/pre-command
350350
351+ # NOTE: This should help detecting issues earlier in the development cycle
352+ # See https://github.com/elastic/elastic-agent/issues/11604
353+ - label : " Trigger Elastic Agent Package"
354+ if : build.pull_request.id != null
355+ commands :
356+ - .buildkite/scripts/steps/trigger-elastic-agent-package.sh
357+ - .buildkite/scripts/steps/trigger-elastic-agent-package.sh | buildkite-agent pipeline upload
358+ if_changed :
359+ include :
360+ - .buildkite/pipeline.elastic-agent-package.yml
361+ - .buildkite/scripts/steps/package.sh
362+ - .buildkite/scripts/steps/trigger-elastic-agent-package.sh
363+
351364 # wait for CI to be done
352365 - wait : ~
353366
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ #
3+ # Create a dynamic buildkite step for running the elastic-agent-package pipeline.
4+ #
5+ # Required environment variables:
6+ # - BUILDKITE_PULL_REQUEST
7+ # - BUILDKITE_COMMIT
8+ # - BUILDKITE_BRANCH
9+ # - BUILDKITE_PULL_REQUEST_BASE_BRANCH
10+ #
11+
12+ if [ ! -f .package-version ]; then
13+ echo " .package-version file not found!"
14+ exit 1
15+ fi
16+
17+ # No need for the snapshot but the three digits version is required
18+ BEAT_VERSION=$( jq -r .version .core_version)
19+ MANIFEST_URL=$( jq -r .manifest_url .package-version)
20+
21+ cat << EOF
22+ - label: ":pipeline: Run elastic-agent-package"
23+ trigger: "elastic-agent-package"
24+ build:
25+ message: "#${BUILDKITE_PULL_REQUEST} - Verify elastic-agent-package works"
26+ commit: "${BUILDKITE_COMMIT} "
27+ branch: "${BUILDKITE_BRANCH} "
28+ env:
29+ DRA_VERSION: "${BEAT_VERSION} "
30+ DRA_WORKFLOW: "snapshot"
31+ DRA_BRANCH: "${BUILDKITE_PULL_REQUEST_BASE_BRANCH} "
32+ DRA_DRY_RUN: "--dry-run"
33+ MANIFEST_URL: "${MANIFEST_URL} "
34+ ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "false"
35+ EOF
You can’t perform that action at this time.
0 commit comments