diff --git a/.buildkite/pipeline.version-bump.yaml b/.buildkite/pipeline.version-bump.yaml new file mode 100644 index 0000000000..3bb84960df --- /dev/null +++ b/.buildkite/pipeline.version-bump.yaml @@ -0,0 +1,61 @@ +notify: + - slack: + channels: + - "#ingest-notifications" + if: (build.branch == 'main' || build.branch =~ /^[0-9]+\.[0-9x]+\$/) && (build.state == 'passed' || build.state == 'failed') + - slack: + channels: + - "#ingest-notifications" + message: | + 🚦 Pipeline waiting for approval 🚦 + Repo: `${REPO}` + + Ready to fetch DRA artifacts - please unblock when ready. + New version: `${NEW_VERSION}` + Branch: `${BRANCH}` + Workflow: `${WORKFLOW}` + ${BUILDKITE_BUILD_URL} + if: build.state == "blocked" + +steps: + # TODO: replace this block step by real version bump logic + - block: "Ready to fetch for DRA artifacts?" + prompt: | + Unblock when your team is ready to proceed. + + Trigger parameters: + - NEW_VERSION: ${NEW_VERSION} + - BRANCH: ${BRANCH} + - WORKFLOW: ${WORKFLOW} + key: block-get-dra-artifacts + blocked_state: running + + - label: "Fetch DRA Artifacts" + key: fetch-dra-artifacts + depends_on: block-get-dra-artifacts + agents: + image: docker.elastic.co/release-eng/wolfi-build-essential-release-eng:latest + cpu: 2 + memory: 4G + ephemeralStorage: 10G + command: + - echo "Starting DRA artifacts retrieval..." + timeout_in_minutes: 240 + retry: + automatic: + - exit_status: "*" + limit: 2 + manual: + permit_on_passed: true + + plugins: + - elastic/json-watcher#v1.0.0: + url: "https://artifacts-staging.elastic.co/fleet-server/latest/${BRANCH}.json" + field: ".version" + expected_value: "${NEW_VERSION}" + polling_interval: "30" + - elastic/json-watcher#v1.0.0: + url: "https://storage.googleapis.com/elastic-artifacts-snapshot/fleet-server/latest/${BRANCH}.json" + field: ".version" + expected_value: "${NEW_VERSION}-SNAPSHOT" + polling_interval: "30" diff --git a/catalog-info.yaml b/catalog-info.yaml index a145137db2..0cf69ce10c 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -213,3 +213,45 @@ spec: access_level: MANAGE_BUILD_AND_READ everyone: access_level: READ_ONLY + +--- +# 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-fleet-server-version-bump + description: Buildkite pipeline for the Elastic Fleet Server version bump + links: + - title: Pipeline + url: https://buildkite.com/elastic/fleet-server-version-bump + +spec: + type: buildkite-pipeline + owner: group:ingest-fp + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: fleet-server-version-bump + description: Buildkite pipeline for the Elastic Fleet Server version bump + spec: + repository: elastic/fleet-server + pipeline_file: ".buildkite/pipeline.version-bump.yaml" + provider_settings: + build_branches: false + build_pull_requests: false + trigger_mode: none + cancel_intermediate_builds: true + cancel_intermediate_builds_branch_filter: '!main !8.* !9.*' + skip_intermediate_builds: true + skip_intermediate_builds_branch_filter: '!main !8.* !9.*' + teams: + ingest-fp: + access_level: MANAGE_BUILD_AND_READ + observablt-ci: + access_level: MANAGE_BUILD_AND_READ + release-eng: + access_level: BUILD_AND_READ + everyone: + access_level: READ_ONLY \ No newline at end of file