Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
34 changes: 34 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ steps:
# this should help detecting issues earlier in the development cycle
- label: "Trigger Serverless Beats Tests"
if: build.pull_request.id != null
<<<<<<< HEAD
plugins:
- monorepo-diff#v1.2.0:
diff: "git diff --name-only origin/${GITHUB_PR_TARGET_BRANCH}...HEAD"
Expand All @@ -367,3 +368,36 @@ steps:
build:
commit: "${BUILDKITE_COMMIT}"
branch: "${BUILDKITE_BRANCH}"
=======
trigger: "beats-agent-serverless-tests"
build:
commit: "${BUILDKITE_COMMIT}"
branch: "${BUILDKITE_BRANCH}"
if_changed:
include:
- .buildkite/serverless.beats.tests.yml
- .buildkite/scripts/steps/beats_tests.sh
- .buildkite/hooks/pre-command

# NOTE: This should help detecting issues earlier in the development cycle
# See https://github.com/elastic/elastic-agent/issues/11604
- label: "Trigger Elastic Agent Package"
if: build.pull_request.id != null
commands:
- .buildkite/scripts/steps/trigger-elastic-agent-package.sh
- .buildkite/scripts/steps/trigger-elastic-agent-package.sh | buildkite-agent pipeline upload
if_changed:
include:
- .buildkite/pipeline.elastic-agent-package.yml
- .buildkite/scripts/steps/package.sh
- .buildkite/scripts/steps/trigger-elastic-agent-package.sh

# wait for CI to be done
- wait: ~

- label: "Publish to serverless"
branches: main
trigger: "agentless-serverless-release"
build:
commit: "${BUILDKITE_COMMIT}"
>>>>>>> cffc2cdff (ci(packaging): let's test the packaging pipeline on PRs too (#11612))
35 changes: 35 additions & 0 deletions .buildkite/scripts/steps/trigger-elastic-agent-package.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
#
# Create a dynamic buildkite step for running the elastic-agent-package pipeline.
#
# Required environment variables:
# - BUILDKITE_PULL_REQUEST
# - BUILDKITE_COMMIT
# - BUILDKITE_BRANCH
# - BUILDKITE_PULL_REQUEST_BASE_BRANCH
#

if [ ! -f .package-version ]; then
echo ".package-version file not found!"
exit 1
fi

# No need for the snapshot but the three digits version is required
BEAT_VERSION=$(jq -r .version .core_version)
MANIFEST_URL=$(jq -r .manifest_url .package-version)

cat << EOF
- label: ":pipeline: Run elastic-agent-package"
trigger: "elastic-agent-package"
build:
message: "#${BUILDKITE_PULL_REQUEST} - Verify elastic-agent-package works"
commit: "${BUILDKITE_COMMIT}"
branch: "${BUILDKITE_BRANCH}"
env:
DRA_VERSION: "${BEAT_VERSION}"
DRA_WORKFLOW: "snapshot"
DRA_BRANCH: "${BUILDKITE_PULL_REQUEST_BASE_BRANCH}"
DRA_DRY_RUN: "--dry-run"
MANIFEST_URL: "${MANIFEST_URL}"
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: "false"
EOF
Loading