Skip to content

Commit 3458da3

Browse files
authored
Merge pull request #3604 from buildkite/pb-991-trigger-the-new-e2e-pipeline
Trigger the new E2E pipeline
2 parents c9ca995 + 94bc85b commit 3458da3

File tree

3 files changed

+35
-15
lines changed

3 files changed

+35
-15
lines changed

.buildkite/docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ services:
4242
- BUILDKITE_JOB_ID
4343
- BUILDKITE_BUILD_CREATOR_EMAIL
4444
- BUILDKITE_BUILD_CREATOR
45+
- BUILDKITE_TRIGGERED_FROM_BUILD_ID
4546
- CI_E2E_TESTS_BUILDKITE_API_TOKEN
4647
- CI_E2E_TESTS_AGENT_TOKEN
4748
- CI_E2E_TESTS_TARGET_ORG

.buildkite/pipeline.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ steps:
4444
- "os=linux"
4545
- "arch=amd64"
4646
- "race=false"
47-
47+
4848
- name: ":linux: Linux ARM64 Tests"
4949
key: test-linux-arm64
5050
command: ".buildkite/steps/tests.sh"
@@ -67,7 +67,7 @@ steps:
6767
- "os=linux"
6868
- "arch=arm64"
6969
- "race=false"
70-
70+
7171
- name: ":windows: Windows AMD64 Tests"
7272
key: test-windows
7373
command: "bash .buildkite\\steps\\tests.sh"
@@ -85,7 +85,7 @@ steps:
8585
- "os=windows"
8686
- "arch=arm64"
8787
- "race=false"
88-
88+
8989
- name: ":satellite: Detect Data Races"
9090
key: test-race-linux-arm64
9191
command: ".buildkite/steps/tests.sh -race"
@@ -109,7 +109,7 @@ steps:
109109
- "os=linux"
110110
- "arch=arm64"
111111
- "race=true"
112-
112+
113113
- name: ":coverage: Test coverage report Linux ARM64"
114114
key: test-coverage-linux-arm64
115115
command: ".buildkite/steps/test-coverage-report.sh"
@@ -126,7 +126,7 @@ steps:
126126
- artifacts#v1.9.4:
127127
download: "coverage/**"
128128
step: test-linux-arm64
129-
129+
130130
- name: ":coverage: Test coverage report Linux AMD64"
131131
key: test-coverage-linux-amd64
132132
command: ".buildkite/steps/test-coverage-report.sh"
@@ -143,7 +143,7 @@ steps:
143143
- artifacts#v1.9.4:
144144
download: "coverage/**"
145145
step: test-linux-amd64
146-
146+
147147
- name: ":coverage: Test coverage report Linux ARM64 Race"
148148
key: test-coverage-linux-arm64-race
149149
command: ".buildkite/steps/test-coverage-report.sh"
@@ -160,7 +160,7 @@ steps:
160160
- artifacts#v1.9.4:
161161
download: "coverage/**"
162162
step: test-race-linux-arm64
163-
163+
164164
- label: ":writing_hand: Annotate with Test Failures"
165165
depends_on:
166166
- test-linux-amd64
@@ -171,7 +171,7 @@ steps:
171171
plugins:
172172
- junit-annotate#v1.6.0:
173173
artifacts: junit-*.xml
174-
174+
175175
# --- end Tests and Coverage ---
176176

177177
- group: ":hammer_and_wrench: Binary builds"
@@ -225,9 +225,23 @@ steps:
225225

226226
- with: { os: openbsd, arch: arm64 }
227227
skip: "arm64 OpenBSD is not currently supported"
228-
228+
229229
# --- end Binary builds ---
230230

231+
- label: ":end::two::end: E2E Testing"
232+
key: e2e-tests
233+
depends_on: build-binary
234+
trigger: agent-e2e-tests
235+
async: false
236+
build:
237+
message: "${BUILDKITE_MESSAGE}"
238+
commit: "${BUILDKITE_COMMIT}"
239+
branch: "${BUILDKITE_BRANCH}"
240+
env:
241+
BUILDKITE_PULL_REQUEST: "${BUILDKITE_PULL_REQUEST}"
242+
BUILDKITE_PULL_REQUEST_BASE_BRANCH: "${BUILDKITE_PULL_REQUEST_BASE_BRANCH}"
243+
BUILDKITE_PULL_REQUEST_REPO: "${BUILDKITE_PULL_REQUEST_REPO}"
244+
231245
- label: ":bathtub: Check version string is clean"
232246
key: check-version-string
233247
depends_on: build-binary
@@ -340,7 +354,7 @@ steps:
340354
- ubuntu-22.04
341355
- ubuntu-24.04
342356
- sidecar
343-
357+
344358
# --- end Docker Image tests ---
345359

346360
- name: ":debian: Debian package build"

.buildkite/steps/e2e-tests.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
# TODO: download the agent to test as an artifact
5-
#buildkite-agent artifact download buildkite-agent . --build "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}"
6-
#export CI_E2E_TESTS_AGENT_PATH="${PWD}/buildkite-agent"
4+
if [[ -z "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}" ]] ; then
5+
# For now, e2e test the agent that's currently running
6+
export CI_E2E_TESTS_AGENT_PATH="$(which buildkite-agent)"
7+
else
8+
# Download the artifact from the triggering build
9+
ARTIFACT="pkg/buildkite-agent-$(go env GOOS)-$(go env GOARCH)"
10+
buildkite-agent artifact download "${ARTIFACT}" . --build "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}"
11+
chmod +x "${ARTIFACT}"
12+
export CI_E2E_TESTS_AGENT_PATH="${PWD}/${ARTIFACT}"
13+
fi
714

8-
# For now, e2e test the agent that's currently running
9-
export CI_E2E_TESTS_AGENT_PATH="$(which buildkite-agent)"
1015
go test -v -tags e2e ./internal/e2e/... | sed -e 's/^/> /'

0 commit comments

Comments
 (0)