From 686a32c5d43f8e9aed8f804812d489b283e29f3b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 06:46:27 +0000 Subject: [PATCH 1/4] Initial plan From 956f592db2af32371ba0cd932975011d9117e238 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 06:47:58 +0000 Subject: [PATCH 2/4] Migrate Buildkite pipeline to GitHub Actions Agent-Logs-Url: https://github.com/elastic/bayeux/sessions/9cd71941-a390-4d2e-8f07-72b59b259f54 Co-authored-by: v1v <2871786+v1v@users.noreply.github.com> --- .buildkite/hooks/post-checkout | 53 ---------------------- .buildkite/pipeline.yml | 55 ----------------------- .buildkite/pull-requests.json | 20 --------- .buildkite/scripts/gofmt.sh | 8 ---- .buildkite/scripts/pre-install-command.sh | 13 ------ .buildkite/scripts/prepare-report.sh | 14 ------ .buildkite/scripts/test.sh | 21 --------- .github/workflows/ci.yml | 28 ++++++++++++ 8 files changed, 28 insertions(+), 184 deletions(-) delete mode 100644 .buildkite/hooks/post-checkout delete mode 100644 .buildkite/pipeline.yml delete mode 100644 .buildkite/pull-requests.json delete mode 100644 .buildkite/scripts/gofmt.sh delete mode 100644 .buildkite/scripts/pre-install-command.sh delete mode 100644 .buildkite/scripts/prepare-report.sh delete mode 100644 .buildkite/scripts/test.sh create mode 100644 .github/workflows/ci.yml diff --git a/.buildkite/hooks/post-checkout b/.buildkite/hooks/post-checkout deleted file mode 100644 index e10f15d..0000000 --- a/.buildkite/hooks/post-checkout +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -checkout_merge() { - local target_branch=$1 - local pr_commit=$2 - local merge_branch=$3 - - if [[ -z "${target_branch}" ]]; then - echo "No pull request target branch" - exit 1 - fi - - git fetch -v origin "${target_branch}" - git checkout FETCH_HEAD - echo "Current branch: $(git rev-parse --abbrev-ref HEAD)" - - # create temporal branch to merge the PR with the target branch - git checkout -b ${merge_branch} - echo "New branch created: $(git rev-parse --abbrev-ref HEAD)" - - # set author identity so it can be run git merge - git config user.name "github-merged-pr-post-checkout" - git config user.email "auto-merge@buildkite" - - git merge --no-edit "${BUILDKITE_COMMIT}" || { - local merge_result=$? - echo "Merge failed: ${merge_result}" - git merge --abort - exit ${merge_result} - } -} - -pull_request="${BUILDKITE_PULL_REQUEST:-false}" - -if [[ "${pull_request}" == "false" ]]; then - echo "Not a pull request, skipping" - exit 0 -fi - -TARGET_BRANCH="${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-master}" -PR_COMMIT="${BUILDKITE_COMMIT}" -PR_ID=${BUILDKITE_PULL_REQUEST} -MERGE_BRANCH="pr_merge_${PR_ID}" - -checkout_merge "${TARGET_BRANCH}" "${PR_COMMIT}" "${MERGE_BRANCH}" - -echo "Commit information" -git --no-pager log --format=%B -n 1 - -# Ensure buildkite groups are rendered -echo "" diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml deleted file mode 100644 index 03f7b9f..0000000 --- a/.buildkite/pipeline.yml +++ /dev/null @@ -1,55 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json - -env: - GO111MODULE: "on" - -steps: - - label: ":linux: gofmt" - command: - - ".buildkite/scripts/gofmt.sh" - agents: - image: golang:1.20 - cpu: "8" - memory: "4G" - - - label: ":linux: Test matrix. Go {{matrix.go_version}}" - key: test-matrix - matrix: - setup: - go_version: - - "1.20" - command: - - ".buildkite/scripts/test.sh" - env: - GO_VERSION: "{{matrix.go_version}}" - agents: - image: golang:{{matrix.go_version}} - cpu: "8" - memory: "4G" - artifact_paths: - - "build/test-report-*" - - - label: ":buildkite: Prepare reports" - key: prepare-report - command: - - ".buildkite/scripts/prepare-report.sh" - agents: - image: golang:1.20 - cpu: "8" - memory: "4G" - artifact_paths: - - "build/test-report-*.xml" - depends_on: - - step: "test-matrix" - allow_failure: true - - - label: ":junit: Junit annotate" - plugins: - - junit-annotate#v2.4.1: - artifacts: "build/test-report-*.xml" - fail-build-on-error: true - agents: - provider: "gcp" #junit plugin requires docker - depends_on: - - step: "prepare-report" - allow_failure: true diff --git a/.buildkite/pull-requests.json b/.buildkite/pull-requests.json deleted file mode 100644 index 668b105..0000000 --- a/.buildkite/pull-requests.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "jobs": [ - { - "enabled": true, - "pipelineSlug": "bayeux", - "allow_org_users": true, - "allowed_repo_permissions": ["admin", "write"], - "allowed_list": [ ], - "set_commit_status": true, - "build_on_commit": true, - "build_on_comment": true, - "trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))|^/test$", - "always_trigger_comment_regex": "^(?:(?:buildkite\\W+)?(?:build|test)\\W+(?:this|it))|^/test$", - "skip_ci_labels": [ ], - "skip_target_branches": [ ], - "skip_ci_on_only_changed": [ ], - "always_require_ci_on_changed": [ ] - } - ] -} diff --git a/.buildkite/scripts/gofmt.sh b/.buildkite/scripts/gofmt.sh deleted file mode 100644 index d3dc1c6..0000000 --- a/.buildkite/scripts/gofmt.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -set -euo pipefail - -if [ -z "$(gofmt -d .)" ]; then - true -else - gofmt -d . && false -fi diff --git a/.buildkite/scripts/pre-install-command.sh b/.buildkite/scripts/pre-install-command.sh deleted file mode 100644 index 3abfde6..0000000 --- a/.buildkite/scripts/pre-install-command.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash -set -euo pipefail - -add_bin_path(){ - mkdir -p "${WORKSPACE}/bin" - export PATH="${WORKSPACE}/bin:${PATH}" -} - -with_go_junit_report() { - go get -v -u github.com/jstemmer/go-junit-report -} - -WORKSPACE=${WORKSPACE:-"$(pwd)"} diff --git a/.buildkite/scripts/prepare-report.sh b/.buildkite/scripts/prepare-report.sh deleted file mode 100644 index 324c3d3..0000000 --- a/.buildkite/scripts/prepare-report.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -echo "--- Pre install" -source .buildkite/scripts/pre-install-command.sh -add_bin_path -with_go_junit_report - -# Create Junit report for junit annotation plugin -build_folder="/build" -mkdir $build_folder -buildkite-agent artifact download "build/test-report-*" "${build_folder}" --step test-matrix -find ./build -name "test-report-*" -exec sh -c 'f=$1; go-junit-report < ${f} >> ${f}.xml' shell {} \; diff --git a/.buildkite/scripts/test.sh b/.buildkite/scripts/test.sh deleted file mode 100644 index 8e7a837..0000000 --- a/.buildkite/scripts/test.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -echo "--- Prepare enviroment" -source .buildkite/scripts/pre-install-command.sh -add_bin_path -with_go_junit_report - -echo "--- Run the tests" -export OUT_FILE="build/test-report-${GO_VERSION}" -mkdir -p build -set +e -go test -v -race ./... > "${OUT_FILE}" -status=$? -set -e - -# Buildkite collapse logs under --- symbols -# need to change --- to anything else or switch off collapsing (note: not available at the moment of this commit) -awk '{gsub("---", "----"); print }' ${OUT_FILE} - -exit ${status} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..453153d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + ci: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version: "1.20" + + - name: gofmt + run: | + if [ -n "$(gofmt -d .)" ]; then + gofmt -d . + exit 1 + fi + + - name: Test + run: go test -v -race ./... From 8e890f3999471d52db9473ff634efff2cb2ad8b6 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Fri, 17 Apr 2026 08:51:50 +0200 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Victor Martinez --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 453153d..901a078 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,15 +5,16 @@ on: branches: [main] pull_request: +permissions: + contents: read + jobs: ci: runs-on: ubuntu-latest - permissions: - contents: read steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-go@v5 + - uses: actions/setup-go@v6 with: go-version: "1.20" From cacc163ddd493a574b01b0f39f3de2d076799171 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 06:55:33 +0000 Subject: [PATCH 4/4] Remove Buildkite pipeline definition from catalog-info.yaml Agent-Logs-Url: https://github.com/elastic/bayeux/sessions/5811530d-1859-43da-9478-5a62caca6969 Co-authored-by: v1v <2871786+v1v@users.noreply.github.com> --- catalog-info.yaml | 42 ------------------------------------------ 1 file changed, 42 deletions(-) diff --git a/catalog-info.yaml b/catalog-info.yaml index e3570fe..27c6dde 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -14,45 +14,3 @@ spec: lifecycle: production ---- -# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/e57ee3bed7a6f73077a3f55a38e76e40ec87a7cf/rre.schema.json -apiVersion: backstage.io/v1alpha1 -kind: Resource -metadata: - name: buildkite-pipeline-bayeux - description: Buildkite pipeline for the bayeux project - links: - - title: Pipeline - url: https://buildkite.com/elastic/bayeux - -spec: - type: buildkite-pipeline - owner: group:ingest-fp - system: platform-ingest - implementation: - apiVersion: buildkite.elastic.dev/v1 - kind: Pipeline - metadata: - name: bayeux - description: Buildkite pipeline for the bayeux project - spec: - repository: elastic/bayeux - pipeline_file: ".buildkite/pipeline.yml" - branch_configuration: "master" - provider_settings: - build_pull_request_forks: false - build_pull_requests: true # requires filter_enabled and filter_condition settings as below when used with buildkite-pr-bot - build_tags: true - filter_enabled: true - filter_condition: >- - build.pull_request.id == null || (build.creator.name == 'elasticmachine' && build.pull_request.id != null) - env: - ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' - SLACK_NOTIFICATIONS_CHANNEL: '#ingest-notifications' - SLACK_NOTIFICATIONS_ALL_BRANCHES: 'false' - SLACK_NOTIFICATIONS_ON_SUCCESS: 'false' - teams: - ingest-fp: - access_level: MANAGE_BUILD_AND_READ - everyone: - access_level: READ_ONLY