diff --git a/.buildkite/version_bump_pipeline.yml b/.buildkite/version_bump_pipeline.yml new file mode 100644 index 00000000000..c91afb6ced7 --- /dev/null +++ b/.buildkite/version_bump_pipeline.yml @@ -0,0 +1,61 @@ +notify: + - slack: + channels: + - "#logstash-build" + if: (build.branch == 'main' || build.branch =~ /^[0-9]+\.[0-9x]+\$/) && (build.state == 'passed' || build.state == 'failed') + - slack: + channels: + - "#logstash-build" + 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: 250m + memory: 512Mi + ephemeralStorage: 1Gi + 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/logstash/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/logstash/latest/${BRANCH}.json" + field: ".version" + expected_value: "${NEW_VERSION}-SNAPSHOT" + polling_interval: "30" diff --git a/catalog-info.yaml b/catalog-info.yaml index 36b73c7e18d..19d85eba907 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -889,3 +889,48 @@ spec: branch: main cronline: 30 20 * * * message: Daily trigger of Health Report Tests Pipeline + +# *********************************** +# SECTION START: DRA Version Bump +# *********************************** +--- +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: logstash-version-bump + description: 'Logstash Version Bump pipeline' + links: + - title: 'Logstash Version Bump pipeline' + url: https://buildkite.com/elastic/logstash-version-bump +spec: + type: buildkite-pipeline + owner: group:logstash + system: platform-ingest + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: logstash-version-bump + description: 'Logstash Version Bump pipeline' + spec: + repository: elastic/logstash + pipeline_file: ".buildkite/version_bump_pipeline.yml" + provider_settings: + trigger_mode: none + cancel_intermediate_builds: true + skip_intermediate_builds: true + teams: + ingest-fp: + access_level: MANAGE_BUILD_AND_READ + logstash: + access_level: MANAGE_BUILD_AND_READ + ingest-eng-prod: + access_level: MANAGE_BUILD_AND_READ + release-eng: + access_level: BUILD_AND_READ + everyone: + access_level: READ_ONLY +# ******************************* +# SECTION END: DRA Version Bump +# *******************************