From a6411ae1543fb380a9e74d6f24d83f4589201a74 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 4 Mar 2025 14:56:35 +0100 Subject: [PATCH 1/4] buildkite: add initial elastic-agent-helm-charts pipeline Implementation in a follow-up --- .../pipeline.elastic-agent-helm-charts.yml | 13 +++++ .buildkite/scripts/common.sh | 2 +- .buildkite/scripts/common2.sh | 2 +- .buildkite/scripts/retry.sh | 3 +- .github/workflows/macos.yml | 49 +++++++++++++++++++ catalog-info.yaml | 36 ++++++++++++++ 6 files changed, 102 insertions(+), 3 deletions(-) create mode 100644 .buildkite/pipeline.elastic-agent-helm-charts.yml create mode 100644 .github/workflows/macos.yml diff --git a/.buildkite/pipeline.elastic-agent-helm-charts.yml b/.buildkite/pipeline.elastic-agent-helm-charts.yml new file mode 100644 index 00000000000..96a37549590 --- /dev/null +++ b/.buildkite/pipeline.elastic-agent-helm-charts.yml @@ -0,0 +1,13 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json + +steps: + + - label: ":elastic-stack: Create helm chart" + command: | + echo "TBC" + + - wait: ~ + + - label: ":elastic-stack: Publish helm chart" + command: | + echo "TBC" diff --git a/.buildkite/scripts/common.sh b/.buildkite/scripts/common.sh index f93fc7c152d..ee0b7220963 100755 --- a/.buildkite/scripts/common.sh +++ b/.buildkite/scripts/common.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/.buildkite/scripts/common2.sh b/.buildkite/scripts/common2.sh index aed20eb7a8e..0744649f4b0 100755 --- a/.buildkite/scripts/common2.sh +++ b/.buildkite/scripts/common2.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -euo pipefail diff --git a/.buildkite/scripts/retry.sh b/.buildkite/scripts/retry.sh index ce073b0d5dc..04c2042de2c 100755 --- a/.buildkite/scripts/retry.sh +++ b/.buildkite/scripts/retry.sh @@ -1,4 +1,5 @@ -#!/bin/bash +#!/usr/bin/env bash + set -euo pipefail retry() { diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 00000000000..4384473a447 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,49 @@ +--- +name: macos + +on: + workflow_dispatch: + schedule: + - cron: "0 20 * * 6" + # Being: for testing purposes + push: + branches: + - feature/test-macos-gh-action + # End: for testing purposes + +permissions: + contents: read + +jobs: + package: + strategy: + matrix: + # NOTE: macos-13 is intel and macos-latest is arm + os: [ macos-13, macos-latest ] + fail-fast: false + runs-on: ${{ matrix.os }} + env: + PLATFORMS: "darwin/amd64 darwin/arm64" + PACKAGES: "tar.gz,docker" + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: .go-version + + - name: Install Docker CLI + run: brew install docker + + # NOTE: see https://github.com/actions/runner/issues/1456 + - name: Install Colima + run: | + brew install qemu + brew install colima + colima version + + - name: Start Colima + run: colima start + + - name: Run Integration Package + run: .buildkite/scripts/steps/integration-package.sh diff --git a/catalog-info.yaml b/catalog-info.yaml index 6467f1a8b82..b84f5487ab9 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -328,3 +328,39 @@ spec: access_level: MANAGE_BUILD_AND_READ everyone: access_level: BUILD_AND_READ + +--- +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: buildkite-elastic-agent-helm-charts + description: Elastic-agent Helm Charts Pipeline + links: + - title: Pipeline + url: https://buildkite.com/elastic/buildkite-elastic-agent-helm-charts + +spec: + type: buildkite-pipeline + owner: group:ingest-fp + system: platform-ingest + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: buildkite-elastic-agent-helm-charts + description: Runs elastic-agent helm charts + spec: + pipeline_file: ".buildkite/pipeline.elastic-agent-helm-charts.yml" + provider_settings: + trigger_mode: none # don't trigger jobs from github activity + repository: elastic/elastic-agent + teams: + ingest-fp: + access_level: MANAGE_BUILD_AND_READ + observablt-robots: + access_level: MANAGE_BUILD_AND_READ + release-eng: + access_level: BUILD_AND_READ + everyone: + access_level: READ From 84e924e9f5bc1d407f665482ffb22cc55ddd7eef Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 4 Mar 2025 14:58:19 +0100 Subject: [PATCH 2/4] Revert "buildkite: add initial elastic-agent-helm-charts pipeline" This reverts commit a6411ae1543fb380a9e74d6f24d83f4589201a74. --- .../pipeline.elastic-agent-helm-charts.yml | 13 ----- .buildkite/scripts/common.sh | 2 +- .buildkite/scripts/common2.sh | 2 +- .buildkite/scripts/retry.sh | 3 +- .github/workflows/macos.yml | 49 ------------------- catalog-info.yaml | 36 -------------- 6 files changed, 3 insertions(+), 102 deletions(-) delete mode 100644 .buildkite/pipeline.elastic-agent-helm-charts.yml delete mode 100644 .github/workflows/macos.yml diff --git a/.buildkite/pipeline.elastic-agent-helm-charts.yml b/.buildkite/pipeline.elastic-agent-helm-charts.yml deleted file mode 100644 index 96a37549590..00000000000 --- a/.buildkite/pipeline.elastic-agent-helm-charts.yml +++ /dev/null @@ -1,13 +0,0 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json - -steps: - - - label: ":elastic-stack: Create helm chart" - command: | - echo "TBC" - - - wait: ~ - - - label: ":elastic-stack: Publish helm chart" - command: | - echo "TBC" diff --git a/.buildkite/scripts/common.sh b/.buildkite/scripts/common.sh index ee0b7220963..f93fc7c152d 100755 --- a/.buildkite/scripts/common.sh +++ b/.buildkite/scripts/common.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash set -euo pipefail diff --git a/.buildkite/scripts/common2.sh b/.buildkite/scripts/common2.sh index 0744649f4b0..aed20eb7a8e 100755 --- a/.buildkite/scripts/common2.sh +++ b/.buildkite/scripts/common2.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash set -euo pipefail diff --git a/.buildkite/scripts/retry.sh b/.buildkite/scripts/retry.sh index 04c2042de2c..ce073b0d5dc 100755 --- a/.buildkite/scripts/retry.sh +++ b/.buildkite/scripts/retry.sh @@ -1,5 +1,4 @@ -#!/usr/bin/env bash - +#!/bin/bash set -euo pipefail retry() { diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 4384473a447..00000000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -name: macos - -on: - workflow_dispatch: - schedule: - - cron: "0 20 * * 6" - # Being: for testing purposes - push: - branches: - - feature/test-macos-gh-action - # End: for testing purposes - -permissions: - contents: read - -jobs: - package: - strategy: - matrix: - # NOTE: macos-13 is intel and macos-latest is arm - os: [ macos-13, macos-latest ] - fail-fast: false - runs-on: ${{ matrix.os }} - env: - PLATFORMS: "darwin/amd64 darwin/arm64" - PACKAGES: "tar.gz,docker" - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-go@v5 - with: - go-version-file: .go-version - - - name: Install Docker CLI - run: brew install docker - - # NOTE: see https://github.com/actions/runner/issues/1456 - - name: Install Colima - run: | - brew install qemu - brew install colima - colima version - - - name: Start Colima - run: colima start - - - name: Run Integration Package - run: .buildkite/scripts/steps/integration-package.sh diff --git a/catalog-info.yaml b/catalog-info.yaml index b84f5487ab9..6467f1a8b82 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -328,39 +328,3 @@ spec: access_level: MANAGE_BUILD_AND_READ everyone: access_level: BUILD_AND_READ - ---- -# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json -apiVersion: backstage.io/v1alpha1 -kind: Resource -metadata: - name: buildkite-elastic-agent-helm-charts - description: Elastic-agent Helm Charts Pipeline - links: - - title: Pipeline - url: https://buildkite.com/elastic/buildkite-elastic-agent-helm-charts - -spec: - type: buildkite-pipeline - owner: group:ingest-fp - system: platform-ingest - implementation: - apiVersion: buildkite.elastic.dev/v1 - kind: Pipeline - metadata: - name: buildkite-elastic-agent-helm-charts - description: Runs elastic-agent helm charts - spec: - pipeline_file: ".buildkite/pipeline.elastic-agent-helm-charts.yml" - provider_settings: - trigger_mode: none # don't trigger jobs from github activity - repository: elastic/elastic-agent - teams: - ingest-fp: - access_level: MANAGE_BUILD_AND_READ - observablt-robots: - access_level: MANAGE_BUILD_AND_READ - release-eng: - access_level: BUILD_AND_READ - everyone: - access_level: READ From ea1f89766d146615ff6417c322c95665570a1f6c Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 4 Mar 2025 14:59:02 +0100 Subject: [PATCH 3/4] buildkite: add initial elastic-agent-helm-charts pipeline Implementation in a follow-up --- .../pipeline.elastic-agent-helm-charts.yml | 13 +++++++ catalog-info.yaml | 36 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .buildkite/pipeline.elastic-agent-helm-charts.yml diff --git a/.buildkite/pipeline.elastic-agent-helm-charts.yml b/.buildkite/pipeline.elastic-agent-helm-charts.yml new file mode 100644 index 00000000000..96a37549590 --- /dev/null +++ b/.buildkite/pipeline.elastic-agent-helm-charts.yml @@ -0,0 +1,13 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json + +steps: + + - label: ":elastic-stack: Create helm chart" + command: | + echo "TBC" + + - wait: ~ + + - label: ":elastic-stack: Publish helm chart" + command: | + echo "TBC" diff --git a/catalog-info.yaml b/catalog-info.yaml index 6467f1a8b82..b84f5487ab9 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -328,3 +328,39 @@ spec: access_level: MANAGE_BUILD_AND_READ everyone: access_level: BUILD_AND_READ + +--- +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: buildkite-elastic-agent-helm-charts + description: Elastic-agent Helm Charts Pipeline + links: + - title: Pipeline + url: https://buildkite.com/elastic/buildkite-elastic-agent-helm-charts + +spec: + type: buildkite-pipeline + owner: group:ingest-fp + system: platform-ingest + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: buildkite-elastic-agent-helm-charts + description: Runs elastic-agent helm charts + spec: + pipeline_file: ".buildkite/pipeline.elastic-agent-helm-charts.yml" + provider_settings: + trigger_mode: none # don't trigger jobs from github activity + repository: elastic/elastic-agent + teams: + ingest-fp: + access_level: MANAGE_BUILD_AND_READ + observablt-robots: + access_level: MANAGE_BUILD_AND_READ + release-eng: + access_level: BUILD_AND_READ + everyone: + access_level: READ From 545e517eafb2cdad99c793f950176136301b0475 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 4 Mar 2025 15:13:53 +0100 Subject: [PATCH 4/4] rename --- catalog-info.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog-info.yaml b/catalog-info.yaml index b84f5487ab9..a1f69b6fa14 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -338,7 +338,7 @@ metadata: description: Elastic-agent Helm Charts Pipeline links: - title: Pipeline - url: https://buildkite.com/elastic/buildkite-elastic-agent-helm-charts + url: https://buildkite.com/elastic/elastic-agent-helm-charts spec: type: buildkite-pipeline @@ -348,7 +348,7 @@ spec: apiVersion: buildkite.elastic.dev/v1 kind: Pipeline metadata: - name: buildkite-elastic-agent-helm-charts + name: elastic-agent-helm-charts description: Runs elastic-agent helm charts spec: pipeline_file: ".buildkite/pipeline.elastic-agent-helm-charts.yml"