Skip to content
Open
Show file tree
Hide file tree
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
38 changes: 29 additions & 9 deletions .buildkite/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ x-anchors:
checkout:
fetchFlags: -v --tags

run-tests: &run-tests
artifact_paths: junit-*.xml
secrets:
INTEGRATION_TEST_BUILDKITE_TOKEN: integration_test_buildkite_api_token
BUILDKITE_ANALYTICS_TOKEN: test_engine_suite_token
image: golang:1.25.5@sha256:a22b2e6c5e753345b9759fba9e5c1731ebe28af506745e98f406cc85d50c828e
command: .buildkite/steps/tests.sh
plugins:
- kubernetes:
podTemplate: go-with-cache
podSpecPatch:
serviceAccountName: integration-tests
- test-collector:
files: junit-*.xml
format: junit

agents:
queue: kubernetes

Expand Down Expand Up @@ -47,22 +63,26 @@ steps:
command: .buildkite/steps/agent.sh

- label: ":buildkite::test_tube: tests"
<<: *run-tests
key: tests
depends_on: agent
artifact_paths: junit-*.xml
secrets:
INTEGRATION_TEST_BUILDKITE_TOKEN: integration_test_buildkite_api_token
BUILDKITE_ANALYTICS_TOKEN: test_engine_suite_token
image: golang:1.25.5@sha256:a22b2e6c5e753345b9759fba9e5c1731ebe28af506745e98f406cc85d50c828e
command: .buildkite/steps/tests.sh

- input: "Cleanup orphaned buildkite resources?"
key: cleanup-orphans-block
depends_on: tests

- label: ":broom::buildkite: Clean up orphaned pipelines and queues"
<<: *run-tests
key: cleanup-orphans
depends_on: cleanup-orphans-block
command: .buildkite/steps/tests.sh -v -run TestCleanupOrphanedResources
env:
CLEANUP_PIPELINES: "true"
plugins:
- kubernetes:
podTemplate: go-with-cache
podSpecPatch:
serviceAccountName: integration-tests
- test-collector:
files: junit-*.xml
format: junit

- label: ":docker: build and push controller image"
key: controller
Expand Down
1 change: 1 addition & 0 deletions .buildkite/steps/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ export AGENT_TOKEN_SECRET="agent-stack-k8s-secrets"
go tool gotestsum --junitfile "junit-${BUILDKITE_JOB_ID}.xml" -- \
-count=1 \
-ldflags="-X ${package}.branch=${branch}" \
"$@" \
./...
2 changes: 1 addition & 1 deletion cmd/linter/linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"os"

"github.com/buildkite/agent-stack-k8s/v2/internal/controller/scheduler"
"github.com/buildkite/go-buildkite/v3/buildkite"
"github.com/buildkite/go-buildkite/v4"
"github.com/go-playground/validator/v10"
"github.com/spf13/cobra"
"github.com/xeipuuv/gojsonschema"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.25.4
require (
github.com/Khan/genqlient v0.8.1
github.com/buildkite/agent/v3 v3.115.2
github.com/buildkite/go-buildkite/v3 v3.13.0
github.com/buildkite/go-buildkite/v4 v4.13.1
github.com/buildkite/roko v1.4.0
github.com/buildkite/stacksapi v1.0.0
github.com/distribution/reference v0.6.0
Expand Down Expand Up @@ -98,7 +98,7 @@ require (
github.com/buildkite/go-pipeline v0.16.0 // indirect
github.com/buildkite/interpolate v0.1.5 // indirect
github.com/buildkite/shellwords v1.0.1 // indirect
github.com/cenkalti/backoff v1.1.1-0.20171020064038-309aa717adbf // indirect
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ github.com/buildkite/agent/v3 v3.115.2 h1:26A/dEabfzjorS3Wh/low+yOBM/u8QaT59BYWu
github.com/buildkite/agent/v3 v3.115.2/go.mod h1:a3t090/PPxAIIPCjlXF5fhfRvG0E9huFsnMX7B76iIQ=
github.com/buildkite/bintest/v3 v3.3.0 h1:RTWcSaJRlOT6t/K311ejPf+0J3LE/QEODzVG3vlLnWo=
github.com/buildkite/bintest/v3 v3.3.0/go.mod h1:btqpTsVODiJcb0NMdkkmtMQ6xoFc2W/nY5yy+3I0zcs=
github.com/buildkite/go-buildkite/v3 v3.13.0 h1:8DxSmai9UND0n81BlKqNyCuLmiUSDroMhXq+BF28e7E=
github.com/buildkite/go-buildkite/v3 v3.13.0/go.mod h1:ux2rjcqNoE54wfFHO3Vlet+a57Tt2jqOqfc9Afs7R7g=
github.com/buildkite/go-buildkite/v4 v4.13.1 h1:3PhrShdQwlZ2+OIWy0QbxbbjP6M97NCvarlIB6Oye+k=
github.com/buildkite/go-buildkite/v4 v4.13.1/go.mod h1:DlebrRJqpZttXDjCW+MJ1QyW9AN++ZWt/UbPtKdbSSk=
github.com/buildkite/go-pipeline v0.16.0 h1:wEgWUMRAgSg1ZnWOoA3AovtYYdTvN0dLY1zwUWmPP+4=
github.com/buildkite/go-pipeline v0.16.0/go.mod h1:VE37qY3X5pmAKKUMoDZvPsHOQuyakB9cmXj9Qn6QasA=
github.com/buildkite/interpolate v0.1.5 h1:v2Ji3voik69UZlbfoqzx+qfcsOKLA61nHdU79VV+tPU=
Expand All @@ -148,8 +148,8 @@ github.com/buildkite/stacksapi v1.0.0 h1:qZ/sU6zpeSI3Izk+RjHfhhpK35g9pJQ0KETjoI/
github.com/buildkite/stacksapi v1.0.0/go.mod h1:JffsOjAtQW5sX1s0IN6B6KhnE6jWgJNFmv82687M8jY=
github.com/buildkite/zstash v0.7.0 h1:lKDGLaRjdjh7M0ItRfpy9HIUv02r1bszKC/8fupDjXY=
github.com/buildkite/zstash v0.7.0/go.mod h1:BGBukIwUaM3r/ypdQWyaDIP3izQj1PSauoAS6fOaYwg=
github.com/cenkalti/backoff v1.1.1-0.20171020064038-309aa717adbf h1:yxlp0s+Sge9UsKEK0Bsvjiopb9XRk+vxylmZ9eGBfm8=
github.com/cenkalti/backoff v1.1.1-0.20171020064038-309aa717adbf/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM=
github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
Expand Down
Loading