Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .buildkite/version_bump_pipeline.yml
Original file line number Diff line number Diff line change
@@ -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: |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is "prompt" used here? Will this just consistently be in a "waiting" state? How is that different than just running the pipeline when needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entire block step is to be replaced by each team. This block step is more of a placeholder.

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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having trouble understanding what this is for? Why do we want to poll for artifacts? What consumes this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, let me try to answer your questions the best I can.

Why do we want to poll for artifacts?

We (Release-eng) poll for artifacts as the last step to ensure that the version for the artifacts have been bumped.

What consumes this?

We'll be using a centralized pipeline (owned by release-eng) which will be used alongside the pipeline in this PR. How it'll work is that the centralized pipeline will trigger the service team's version bump pipeline using a dependency graph.

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/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"
47 changes: 47 additions & 0 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -889,3 +889,50 @@ 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:
build_branches: false
build_pull_requests: false
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
# *******************************