From 68d8baa8b46d410b817e3ca4e36a5ef98fd2ae46 Mon Sep 17 00:00:00 2001 From: Ben Moskovitz Date: Mon, 31 Aug 2026 14:40:10 +1000 Subject: [PATCH 1/3] Prepare v4 for stable release Make it so that making a v4.0.0 tag will release it to stable, and further 3.x releases will go to oldstable (cherry picked from commit 91b4b34b9e1f159fd37bdce5abf0c1a7c61cf3c0) --- .buildkite/pipeline.release-oldstable.yml | 2 -- .buildkite/steps/upload-release-steps.sh | 12 +++--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.buildkite/pipeline.release-oldstable.yml b/.buildkite/pipeline.release-oldstable.yml index 6bc7f11e93..17fd3e67a0 100644 --- a/.buildkite/pipeline.release-oldstable.yml +++ b/.buildkite/pipeline.release-oldstable.yml @@ -26,7 +26,6 @@ steps: mount-buildkite-agent: true - name: ":octocat: :rocket: Create Github Release (if necessary)" - skip: "TODO(v4 release): unskip when v3 no longer stable" command: ".buildkite/steps/github-release.sh" env: CODENAME: "oldstable" @@ -207,7 +206,6 @@ steps: - wait - name: ":beer: Publish Oldstable Homebrew Package" - skip: "TODO(v4 release): unskip when v3 no longer stable" command: ".buildkite/steps/release-homebrew.sh" artifact_paths: "pkg/*.rb;pkg/*.json" env: diff --git a/.buildkite/steps/upload-release-steps.sh b/.buildkite/steps/upload-release-steps.sh index dec5390537..163b6787ea 100755 --- a/.buildkite/steps/upload-release-steps.sh +++ b/.buildkite/steps/upload-release-steps.sh @@ -73,28 +73,22 @@ output_steps_yaml() { wait_step case "${agent_version}" in - *beta*|*rc*) + *alpha*|*beta*|*rc*) trigger_step \ "beta ${agent_version}" \ "agent-release-beta" ;; 4.*) - # This case shouldn't be reached while the v4 branch version string - # includes "beta". trigger_step \ - "beta ${agent_version}" \ - "agent-release-beta" + "stable ${agent_version}" \ + "agent-release-stable" ;; 3.*) - # TODO(v4 release): move stable release to v4 trigger_step \ "oldstable ${agent_version}" \ "agent-release-oldstable" - trigger_step \ - "stable ${agent_version}" \ - "agent-release-stable" ;; esac } From 0a51284f24d0736a4787c6073daf2a237f99a01d Mon Sep 17 00:00:00 2001 From: Ben Moskovitz Date: Mon, 31 Aug 2026 14:49:04 +1000 Subject: [PATCH 2/3] Don't publish built binaries to buildkite packages (cherry picked from commit 6e032f1373576f3f42a6a68b6bf3cce7b84bee38) --- .buildkite/pipeline.release-experimental.yml | 70 -------------------- .buildkite/pipeline.release-oldstable.yml | 70 -------------------- .buildkite/pipeline.release-stable.yml | 70 -------------------- .buildkite/pipeline.release-unstable.yml | 70 -------------------- .buildkite/pipeline.yml | 8 --- 5 files changed, 288 deletions(-) diff --git a/.buildkite/pipeline.release-experimental.yml b/.buildkite/pipeline.release-experimental.yml index 9cbff98002..e6f2de8d6b 100644 --- a/.buildkite/pipeline.release-experimental.yml +++ b/.buildkite/pipeline.release-experimental.yml @@ -50,39 +50,6 @@ steps: volumes: - "/yum.buildkite.com" - - group: ":redhat: Publish Edge RPM Package to Buildkite Packages" - steps: - - name: ":redhat: Publish Edge {{matrix.pkg_arch}} RPM Package to Buildkite Packages" - plugins: - - publish-to-packages#v2.2.0: - artifacts: "rpm/buildkite-agent_*_{{matrix.pkg_arch}}.rpm" - registry: "buildkite/agent-rpm-experimental" - artifact_build_id: "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}" - attestations: - - "buildkite-agent-linux-{{matrix.go_arch}}.build-attestation.json" - - "buildkite-agent-rpm-packages.package-attestation.json" - soft_fail: true - matrix: - setup: - go_arch: - - "amd64" - - "386" - - "arm64" - - "ppc64" - - "ppc64le" - - "riscv64" - pkg_arch: - - "SKIP_FAKE_ARCH" - adjustments: - - with: { go_arch: "amd64", pkg_arch: "x86_64" } - - with: { go_arch: "386", pkg_arch: "i386" } - - with: { go_arch: "arm64", pkg_arch: "aarch64" } - - with: { go_arch: "ppc64", pkg_arch: "ppc64" } - - with: { go_arch: "ppc64le", pkg_arch: "ppc64le" } - - with: { go_arch: "riscv64", pkg_arch: "riscv64" } - - with: { pkg_arch: "SKIP_FAKE_ARCH" } - skip: true - - name: ":debian: Publish Edge Debian Package" command: ".buildkite/steps/publish-debian-package.sh" env: @@ -114,43 +81,6 @@ steps: - exit_status: 1 limit: 3 - - group: ":debian: Publish Edge Debian Package to Buildkite Packages" - steps: - - name: ":debian: Publish Edge {{matrix.pkg_arch}} Debian Package to Buildkite Packages" - plugins: - - publish-to-packages#v2.2.0: - artifacts: "deb/buildkite-agent_*_{{matrix.pkg_arch}}.deb" - registry: "buildkite/agent-deb-experimental" - artifact_build_id: "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}" - attestations: - - "buildkite-agent-linux-{{matrix.go_arch}}.build-attestation.json" - - "buildkite-agent-debian-packages.package-attestation.json" - soft_fail: true - matrix: - setup: - go_arch: - - "amd64" - - "386" - - "arm" - - "armhf" - - "arm64" - - "ppc64" - - "ppc64le" - - "riscv64" - pkg_arch: - - "SKIP_FAKE_ARCH" - adjustments: - - with: { go_arch: "amd64", pkg_arch: "x86_64" } - - with: { go_arch: "386", pkg_arch: "i386" } - - with: { go_arch: "arm", pkg_arch: "arm" } - - with: { go_arch: "armhf", pkg_arch: "armhf" } - - with: { go_arch: "arm64", pkg_arch: "arm64" } - - with: { go_arch: "ppc64", pkg_arch: "ppc64" } - - with: { go_arch: "ppc64le", pkg_arch: "ppc64el" } - - with: { go_arch: "riscv64", pkg_arch: "riscv64" } - - with: { pkg_arch: "SKIP_FAKE_ARCH" } - skip: true - - group: ":docker: Publish Edge Docker Images" steps: - name: ":docker: Publish Edge Images to {{matrix.registry}}" diff --git a/.buildkite/pipeline.release-oldstable.yml b/.buildkite/pipeline.release-oldstable.yml index 17fd3e67a0..21c074281f 100644 --- a/.buildkite/pipeline.release-oldstable.yml +++ b/.buildkite/pipeline.release-oldstable.yml @@ -78,39 +78,6 @@ steps: - exit_status: 1 limit: 3 - - group: ":redhat: Publish Oldstable RPM Package to Buildkite Packages" - steps: - - name: ":redhat: Publish Oldstable {{matrix.pkg_arch}} RPM Package to Buildkite Packages" - plugins: - - publish-to-packages#v2.2.0: - artifacts: "rpm/buildkite-agent_*_{{matrix.pkg_arch}}.rpm" - registry: "buildkite/agent-rpm-oldstable" - artifact_build_id: "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}" - attestations: - - "buildkite-agent-linux-{{matrix.go_arch}}.build-attestation.json" - - "buildkite-agent-rpm-packages.package-attestation.json" - soft_fail: true - matrix: - setup: - go_arch: - - "amd64" - - "386" - - "arm64" - - "ppc64" - - "ppc64le" - - "riscv64" - pkg_arch: - - "SKIP_FAKE_ARCH" - adjustments: - - with: { go_arch: "amd64", pkg_arch: "x86_64" } - - with: { go_arch: "386", pkg_arch: "i386" } - - with: { go_arch: "arm64", pkg_arch: "aarch64" } - - with: { go_arch: "ppc64", pkg_arch: "ppc64" } - - with: { go_arch: "ppc64le", pkg_arch: "ppc64le" } - - with: { go_arch: "riscv64", pkg_arch: "riscv64" } - - with: { pkg_arch: "SKIP_FAKE_ARCH" } - skip: true - - name: ":debian: Publish Oldstable Debian Package" command: ".buildkite/steps/publish-debian-package.sh" env: @@ -138,43 +105,6 @@ steps: tmpfs: - "/root/.gnupg" - - group: ":debian: Publish Oldstable Debian Package to Buildkite Packages" - steps: - - name: ":debian: Publish Oldstable {{matrix.pkg_arch}} Debian Package to Buildkite Packages" - plugins: - - publish-to-packages#v2.2.0: - artifacts: "deb/buildkite-agent_*_{{matrix.pkg_arch}}.deb" - registry: "buildkite/agent-deb-oldstable" - artifact_build_id: "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}" - attestations: - - "buildkite-agent-linux-{{matrix.go_arch}}.build-attestation.json" - - "buildkite-agent-debian-packages.package-attestation.json" - soft_fail: true - matrix: - setup: - go_arch: - - "amd64" - - "386" - - "arm" - - "armhf" - - "arm64" - - "ppc64" - - "ppc64le" - - "riscv64" - pkg_arch: - - "SKIP_FAKE_ARCH" - adjustments: - - with: { go_arch: "amd64", pkg_arch: "x86_64" } - - with: { go_arch: "386", pkg_arch: "i386" } - - with: { go_arch: "arm", pkg_arch: "arm" } - - with: { go_arch: "armhf", pkg_arch: "armhf" } - - with: { go_arch: "arm64", pkg_arch: "arm64" } - - with: { go_arch: "ppc64", pkg_arch: "ppc64" } - - with: { go_arch: "ppc64le", pkg_arch: "ppc64el" } - - with: { go_arch: "riscv64", pkg_arch: "riscv64" } - - with: { pkg_arch: "SKIP_FAKE_ARCH" } - skip: true - - group: ":docker: Publish Oldstable Docker Images" steps: - name: ":docker: Publish Oldstable Images to {{matrix.registry}}" diff --git a/.buildkite/pipeline.release-stable.yml b/.buildkite/pipeline.release-stable.yml index 98cd73f016..e3566bf53a 100644 --- a/.buildkite/pipeline.release-stable.yml +++ b/.buildkite/pipeline.release-stable.yml @@ -78,39 +78,6 @@ steps: - exit_status: 1 limit: 3 - - group: ":redhat: Publish RPM Package to Buildkite Packages" - steps: - - name: ":redhat: Publish {{matrix.pkg_arch}} RPM Package to Buildkite Packages" - plugins: - - publish-to-packages#v2.2.0: - artifacts: "rpm/buildkite-agent_*_{{matrix.pkg_arch}}.rpm" - registry: "buildkite/agent-rpm" - artifact_build_id: "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}" - attestations: - - "buildkite-agent-linux-{{matrix.go_arch}}.build-attestation.json" - - "buildkite-agent-rpm-packages.package-attestation.json" - soft_fail: true - matrix: - setup: - go_arch: - - "amd64" - - "386" - - "arm64" - - "ppc64" - - "ppc64le" - - "riscv64" - pkg_arch: - - "SKIP_FAKE_ARCH" - adjustments: - - with: { go_arch: "amd64", pkg_arch: "x86_64" } - - with: { go_arch: "386", pkg_arch: "i386" } - - with: { go_arch: "arm64", pkg_arch: "aarch64" } - - with: { go_arch: "ppc64", pkg_arch: "ppc64" } - - with: { go_arch: "ppc64le", pkg_arch: "ppc64le" } - - with: { go_arch: "riscv64", pkg_arch: "riscv64" } - - with: { pkg_arch: "SKIP_FAKE_ARCH" } - skip: true - - name: ":debian: Publish Debian Package" command: ".buildkite/steps/publish-debian-package.sh" env: @@ -138,43 +105,6 @@ steps: tmpfs: - "/root/.gnupg" - - group: ":debian: Publish Debian Package to Buildkite Packages" - steps: - - name: ":debian: Publish {{matrix.pkg_arch}} Debian Package to Buildkite Packages" - plugins: - - publish-to-packages#v2.2.0: - artifacts: "deb/buildkite-agent_*_{{matrix.pkg_arch}}.deb" - registry: "buildkite/agent-deb" - artifact_build_id: "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}" - attestations: - - "buildkite-agent-linux-{{matrix.go_arch}}.build-attestation.json" - - "buildkite-agent-debian-packages.package-attestation.json" - soft_fail: true - matrix: - setup: - go_arch: - - "amd64" - - "386" - - "arm" - - "armhf" - - "arm64" - - "ppc64" - - "ppc64le" - - "riscv64" - pkg_arch: - - "SKIP_FAKE_ARCH" - adjustments: - - with: { go_arch: "amd64", pkg_arch: "x86_64" } - - with: { go_arch: "386", pkg_arch: "i386" } - - with: { go_arch: "arm", pkg_arch: "arm" } - - with: { go_arch: "armhf", pkg_arch: "armhf" } - - with: { go_arch: "arm64", pkg_arch: "arm64" } - - with: { go_arch: "ppc64", pkg_arch: "ppc64" } - - with: { go_arch: "ppc64le", pkg_arch: "ppc64el" } - - with: { go_arch: "riscv64", pkg_arch: "riscv64" } - - with: { pkg_arch: "SKIP_FAKE_ARCH" } - skip: true - - group: ":docker: Publish Docker Images" steps: - name: ":docker: Publish Docker Images to {{matrix.registry}}" diff --git a/.buildkite/pipeline.release-unstable.yml b/.buildkite/pipeline.release-unstable.yml index 34a5ceade7..70b1b20287 100644 --- a/.buildkite/pipeline.release-unstable.yml +++ b/.buildkite/pipeline.release-unstable.yml @@ -78,39 +78,6 @@ steps: - exit_status: 1 limit: 3 - - group: ":redhat: Publish Unstable RPM Package to Buildkite Packages" - steps: - - name: ":redhat: Publish Unstable {{matrix.pkg_arch}} RPM Package to Buildkite Packages" - plugins: - - publish-to-packages#v2.2.0: - artifacts: "rpm/buildkite-agent_*_{{matrix.pkg_arch}}.rpm" - registry: "buildkite/agent-rpm-unstable" - artifact_build_id: "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}" - attestations: - - "buildkite-agent-linux-{{matrix.go_arch}}.build-attestation.json" - - "buildkite-agent-rpm-packages.package-attestation.json" - soft_fail: true - matrix: - setup: - go_arch: - - "amd64" - - "386" - - "arm64" - - "ppc64" - - "ppc64le" - - "riscv64" - pkg_arch: - - "SKIP_FAKE_ARCH" - adjustments: - - with: { go_arch: "amd64", pkg_arch: "x86_64" } - - with: { go_arch: "386", pkg_arch: "i386" } - - with: { go_arch: "arm64", pkg_arch: "aarch64" } - - with: { go_arch: "ppc64", pkg_arch: "ppc64" } - - with: { go_arch: "ppc64le", pkg_arch: "ppc64le" } - - with: { go_arch: "riscv64", pkg_arch: "riscv64" } - - with: { pkg_arch: "SKIP_FAKE_ARCH" } - skip: true - - name: ":debian: Publish Unstable Debian Package" command: ".buildkite/steps/publish-debian-package.sh" env: @@ -138,43 +105,6 @@ steps: tmpfs: - "/root/.gnupg" - - group: ":debian: Publish Unstable Debian Package to Buildkite Packages" - steps: - - name: ":debian: Publish Unstable {{matrix.pkg_arch}} Debian Package to Buildkite Packages" - plugins: - - publish-to-packages#v2.2.0: - artifacts: "deb/buildkite-agent_*_{{matrix.pkg_arch}}.deb" - registry: "buildkite/agent-deb-unstable" - artifact_build_id: "${BUILDKITE_TRIGGERED_FROM_BUILD_ID}" - attestations: - - "buildkite-agent-linux-{{matrix.go_arch}}.build-attestation.json" - - "buildkite-agent-debian-packages.package-attestation.json" - soft_fail: true - matrix: - setup: - go_arch: - - "amd64" - - "386" - - "arm" - - "armhf" - - "arm64" - - "ppc64" - - "ppc64le" - - "riscv64" - pkg_arch: - - "SKIP_FAKE_ARCH" - adjustments: - - with: { go_arch: "amd64", pkg_arch: "x86_64" } - - with: { go_arch: "386", pkg_arch: "i386" } - - with: { go_arch: "arm", pkg_arch: "arm" } - - with: { go_arch: "armhf", pkg_arch: "armhf" } - - with: { go_arch: "arm64", pkg_arch: "arm64" } - - with: { go_arch: "ppc64", pkg_arch: "ppc64" } - - with: { go_arch: "ppc64le", pkg_arch: "ppc64el" } - - with: { go_arch: "riscv64", pkg_arch: "riscv64" } - - with: { pkg_arch: "SKIP_FAKE_ARCH" } - skip: true - - group: ":docker: Publish Unstable Docker Images" steps: - name: ":docker: Publish Unstable Images to {{matrix.registry}}" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 239705569c..91fa66bbf9 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -409,10 +409,6 @@ steps: - set-metadata command: ".buildkite/steps/build-debian-packages.sh" artifact_paths: "deb/**/*" - plugins: - - generate-provenance-attestation#v1.1.0: - artifacts: "deb/*" - attestation_name: "buildkite-agent-debian-packages.package-attestation.json" - name: ":redhat: RPM Package build" key: build-rpm-packages @@ -421,10 +417,6 @@ steps: - set-metadata command: ".buildkite/steps/build-rpm-packages.sh" artifact_paths: "rpm/**/*" - plugins: - - generate-provenance-attestation#v1.1.0: - artifacts: "rpm/*" - attestation_name: "buildkite-agent-rpm-packages.package-attestation.json" - name: ":github: Build Github Release" key: build-github-release From b095315c207aa861c1c804f5dc3df03813d1ec52 Mon Sep 17 00:00:00 2001 From: Ben Moskovitz Date: Mon, 31 Aug 2026 15:21:51 +1000 Subject: [PATCH 3/3] Fix exact release tag check Amp-Thread-ID: https://ampcode.com/threads/T-01a055eb-f170-70eb-a61f-56000e7a2feb Co-authored-by: Amp (cherry picked from commit fd6044d2004a16e2258a9d70da980b77af5bf09f) --- .buildkite/steps/upload-release-steps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/steps/upload-release-steps.sh b/.buildkite/steps/upload-release-steps.sh index 163b6787ea..b6caab0335 100755 --- a/.buildkite/steps/upload-release-steps.sh +++ b/.buildkite/steps/upload-release-steps.sh @@ -109,7 +109,7 @@ edge_steps_yaml | buildkite-agent pipeline upload # If there is already a release (which means a tag), we want to avoid trying to create # another one, as this will fail and cause partial broken releases -if [[ "${DRY_RUN:-false}" == "false" ]] && git ls-remote --tags origin | grep "refs/tags/v${agent_version}" ; then +if [[ "${DRY_RUN:-false}" == "false" ]] && git ls-remote --exit-code --tags origin "refs/tags/v${agent_version}" > /dev/null; then echo "Tag refs/tags/v${agent_version} already exists" exit 0 fi