-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Implement automated version bump pipeline for patch and minor releases #262224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 23 commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
afe3388
feat: add initial template from release-eng team
TamerlanG 26724b6
wip: bump version jobs
TamerlanG 09bfe0c
feat: implement versions.json bump script for patch, minor, and major…
TamerlanG 18ce0b8
feat: add script to create new release branch off main
TamerlanG c62e910
feat: make the snapshot build triggers synchronous
TamerlanG fa54898
feat: implement full patch version bump pipeline workflow
TamerlanG 03a3d14
fix: trigger the dra snapshot and staging at main
TamerlanG e7c4c47
feat: implement minor/major version bump pipeline workflow
TamerlanG a11f6eb
wip
TamerlanG 9da4e14
revert changes to snapshot build
TamerlanG cee7a56
wip: refactor trigger es build and promote
TamerlanG 12a9995
wip
TamerlanG 79656fd
uncomment code
TamerlanG 903b4a3
refactor: extract bump_versions_json.sh into functions and always tar…
TamerlanG 73c9dc6
Add wait_for_pr_merge utility to poll until auto-merge PRs are merged
TamerlanG db46af3
chore: add agent config to the pipeline
TamerlanG 90116dc
refactor: get the old version directly
TamerlanG 262869e
fix the commit logic
TamerlanG d1b6962
chore: remove redundant file and add agent info to the update label c…
TamerlanG e9ea46a
chore: remove codeowners change
TamerlanG a2101f6
feat: pipeline to update pipeline resource definitions for minor rele…
TamerlanG 0286429
feat: allow overriding target branch for version bump PR and enable b…
TamerlanG 1b90a3d
feat: notify #mission-control when Kibana is branched but version bum…
TamerlanG b1dee98
Merge branch 'main' into feat/dra-bump-pipeline
TamerlanG 73f4be6
Add run_skipped_test helper to unskip/reskip create_test_archives bef…
TamerlanG c578a90
chore: fix small errors detected by ai
TamerlanG 7e56730
Update .buildkite/pipelines/version_bump/trigger_es_build_and_promote…
TamerlanG 39c65d0
Update .buildkite/scripts/steps/version_bump/bump.sh
TamerlanG 87ef7cc
Update .buildkite/scripts/steps/version_bump/pipeline.ts
TamerlanG e5dac3a
fix: add check that workflow env exists
TamerlanG 6b4ef0c
Update .buildkite/scripts/steps/version_bump/update_release_branch.sh
TamerlanG 0ee51bd
small fixes according to claude review
TamerlanG 92c4474
Merge branch 'main' into feat/dra-bump-pipeline
TamerlanG 6487ff7
refactor: check if the initial_app_data file exists
TamerlanG 28be97b
refactor: comments, fix dra builds, and minor workflow order
TamerlanG 9d6664e
Remove stale 'blocked' state notification from version bump pipeline
TamerlanG fae68f0
fix: proper path to the file
TamerlanG 3056f42
Merge branch 'main' into feat/dra-bump-pipeline
TamerlanG 5a8bc79
[release branch setup] Append * @kibanamachine to CODEOWNERS to preve…
TamerlanG cb276fa
Merge branch 'main' into feat/dra-bump-pipeline
TamerlanG 95db6e0
refactor: trigger es snapshot and promote with artifact upload
TamerlanG 12dd587
refactor: run es build and promote on main for minor
TamerlanG f4799b3
comment out the steps to test es build and promote
TamerlanG 4ec97de
fix: add a depends_on
TamerlanG 6fca72c
fix typo
TamerlanG 573c55b
get the metadata
TamerlanG f0eea6a
revert comments
TamerlanG edd521b
Add DRY_RUN support to version bump pipeline scripts
TamerlanG 18d7f49
move pipelines around
TamerlanG 21b09c2
Merge branch 'main' into feat/dra-bump-pipeline
TamerlanG 61a0a91
Merge branch 'main' into feat/dra-bump-pipeline
TamerlanG b54a148
remove premtible and spot zones
TamerlanG 292856d
Merge branch 'main' into feat/dra-bump-pipeline
TamerlanG ce17d2a
Merge branch 'main' into feat/dra-bump-pipeline
TamerlanG c65266e
Merge branch 'main' into feat/dra-bump-pipeline
TamerlanG 0c3f3e5
fix: run bootstrap for this job
TamerlanG df95533
feat: set dry runs for everything
TamerlanG 532eb82
fix: use kibana ubuntu 24
TamerlanG 8a9f20c
fix: add sparse checkout
TamerlanG de89fc9
fix orderings
TamerlanG 7e3331f
use n2 machines instead
TamerlanG 6af1e8d
fix: branch out of the correct branch
TamerlanG 889d74f
source setup_node to install proper node version
TamerlanG 6921668
test the label changes
TamerlanG 6802232
use n2 machine
TamerlanG 7f212ca
remove reconcile labeling
TamerlanG b8212db
uncomment the minor path an simplify things
TamerlanG 1967c7e
uncomment line
TamerlanG 2d83907
improve the dry run handling
TamerlanG e587733
add the wait
TamerlanG a0c5940
feat: simply gate the triggers instead of skipping them
TamerlanG e8f0b94
feat(version_bump): dry-run + create-if-missing for update_label_color
TamerlanG 6f85a62
removet the depends on
TamerlanG 0c4ca16
add a wait
TamerlanG 536045e
test: remove the depends on
TamerlanG 382c6b7
try skipping the job instead
TamerlanG 1ebc729
use if statements instead
TamerlanG 6c4bd09
refactor for better debugging experience
TamerlanG bbf02ec
fix: prevent wait steps from being deduplicated
TamerlanG 19506e4
Merge branch 'main' into feat/dra-bump-pipeline
delanni fe81eb1
run all tests
TamerlanG e89f4d4
remove hardcoded dry runs
TamerlanG 0a8e97d
Merge branch 'main' into feat/dra-bump-pipeline
TamerlanG eca89b1
remove comment
TamerlanG e68eb1f
fix ordering of tests
TamerlanG a158032
fix: also commit the snapshot fix
TamerlanG 21b91db
Merge branch 'main' into feat/dra-bump-pipeline
TamerlanG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
.buildkite/pipeline-resource-definitions/kibana-version-bump.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json | ||
| apiVersion: backstage.io/v1alpha1 | ||
| kind: Resource | ||
| metadata: | ||
| name: kibana-version-bump | ||
| description: Buildkite Pipeline for kibana version bump | ||
| links: | ||
| - title: Kibana Version Bump Pipeline | ||
| url: https://buildkite.com/elastic/kibana-version-bump | ||
| spec: | ||
| type: buildkite-pipeline | ||
| owner: group:kibana-operations | ||
| system: buildkite | ||
| implementation: | ||
| apiVersion: buildkite.elastic.dev/v1 | ||
| kind: Pipeline | ||
| metadata: | ||
| name: kibana-version-bump | ||
| description: Buildkite Pipeline for kibana version bump | ||
| spec: | ||
| allow_rebuilds: true | ||
| cancel_intermediate_builds: false | ||
| branch_configuration: main | ||
| pipeline_file: .buildkite/version_bump.yml | ||
| provider_settings: | ||
| trigger_mode: none | ||
| repository: elastic/kibana | ||
| skip_intermediate_builds: false | ||
| teams: | ||
| kibana-operations: | ||
| access_level: MANAGE_BUILD_AND_READ | ||
| kibana-release-operators: | ||
| access_level: BUILD_AND_READ | ||
| everyone: | ||
| access_level: READ_ONLY |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| notify: | ||
| - slack: | ||
| channels: | ||
| - '#kibana-operations' | ||
| if: (build.branch == 'main' || build.branch =~ /^[0-9]+\.[0-9x]+\$/) && (build.state == 'passed' || build.state == 'failed') | ||
| - slack: | ||
| channels: | ||
| - '#kibana-operations' | ||
| 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" | ||
| - slack: | ||
| channels: | ||
| - '#mission-control' | ||
| message: | | ||
| Kibana has been bumped to `${NEW_VERSION}` on branch `${BRANCH}` and a DRA build has begun. | ||
| Build: ${BUILDKITE_BUILD_URL} | ||
| if: build.state == "passed" | ||
|
|
||
| steps: | ||
| - command: .buildkite/scripts/version_bump/bump.sh | ||
| label: Bump version | ||
|
|
||
| - wait | ||
|
|
||
|
TamerlanG marked this conversation as resolved.
|
||
| - label: 'Fetch DRA Artifacts' | ||
|
macroscopeapp[bot] marked this conversation as resolved.
|
||
| 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/kibana/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/kibana/latest/${BRANCH}.json' | ||
| field: '.version' | ||
| expected_value: '${NEW_VERSION}-SNAPSHOT' | ||
| polling_interval: '30' | ||
11 changes: 11 additions & 0 deletions
11
.buildkite/pipelines/version_bump/bump_package_json_versions.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| steps: | ||
| - name: 'Bump package.json versions' | ||
| key: bump-package-json-versions | ||
| command: .buildkite/scripts/steps/version_bump/bump_package_json_versions.sh | ||
| agents: | ||
| image: family/kibana-ubuntu-2404 | ||
| imageProject: elastic-images-prod | ||
| provider: gcp | ||
| machineType: n4-standard-4 | ||
| preemptible: true | ||
|
TamerlanG marked this conversation as resolved.
Outdated
|
||
| spotZones: us-central1-f,us-central1-c,us-central1-a | ||
13 changes: 13 additions & 0 deletions
13
.buildkite/pipelines/version_bump/bump_package_json_versions_to_main.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| steps: | ||
| - name: 'Bump package.json versions (to main)' | ||
| key: bump-package-json-versions-to-main | ||
| command: .buildkite/scripts/steps/version_bump/bump_package_json_versions.sh | ||
| env: | ||
| OVERRIDE_BRANCH: main | ||
| agents: | ||
| image: family/kibana-ubuntu-2404 | ||
| imageProject: elastic-images-prod | ||
| provider: gcp | ||
| machineType: n4-standard-4 | ||
| preemptible: true | ||
| spotZones: us-central1-f,us-central1-c,us-central1-a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| steps: | ||
| - name: 'Bump versions.json' | ||
| key: bump-versions-json | ||
| command: .buildkite/scripts/steps/version_bump/bump_versions_json.sh | ||
| agents: | ||
| image: family/kibana-ubuntu-2404 | ||
| imageProject: elastic-images-prod | ||
| provider: gcp | ||
| machineType: n4-standard-4 | ||
| preemptible: true | ||
| spotZones: us-central1-f,us-central1-c,us-central1-a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| steps: | ||
| - name: 'Create new release branch' | ||
| key: create-new-branch | ||
| command: .buildkite/scripts/steps/version_bump/create_new_branch_of_main.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| steps: | ||
| - name: 'Ensure version label exists' | ||
| key: ensure-version-label | ||
| command: .buildkite/scripts/steps/version_bump/ensure_version_label.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| steps: | ||
| - name: 'Notify Slack: branch created' | ||
| key: notify-branch-created | ||
| command: .buildkite/scripts/steps/version_bump/notify_branch_created.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| steps: | ||
| - name: 'Reconcile PR Labels' | ||
| key: reconcile-pr-labels | ||
| command: .buildkite/scripts/steps/version_bump/reconcile_pr_labels.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| steps: | ||
| - name: Trigger DRA Snapshot Build | ||
| key: trigger-dra-snapshot | ||
| trigger: kibana-artifacts-snapshot | ||
| async: false | ||
| build: | ||
| branch: 'main' | ||
|
TamerlanG marked this conversation as resolved.
Outdated
TamerlanG marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,7 @@ | ||||||
| steps: | ||||||
| - name: Trigger DRA Staging Build | ||||||
| key: trigger-dra-staging | ||||||
| trigger: kibana-artifacts-staging | ||||||
| async: false | ||||||
| build: | ||||||
| branch: 'main' | ||||||
|
||||||
| branch: 'main' | |
| branch: '${BRANCH}' |
26 changes: 26 additions & 0 deletions
26
.buildkite/pipelines/version_bump/trigger_es_build_and_promote.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| steps: | ||
| # run the bash files directly and only run the build and promote, because verify will fail. | ||
| # TODO: Ask @alex if this would work, especially because the meta data get happens in two separate bash files. | ||
|
|
||
| # Step 1: Run the ES Snapshot Build | ||
| - command: .buildkite/scripts/steps/es_snapshots/build.sh | ||
|
TamerlanG marked this conversation as resolved.
Outdated
|
||
| label: Build ES Snapshot | ||
| timeout_in_minutes: 30 | ||
| agents: | ||
| image: family/kibana-ubuntu-2404 | ||
| imageProject: elastic-images-prod | ||
| provider: gcp | ||
| localSsds: 1 | ||
| localSsdInterface: nvme | ||
| machineType: c2-standard-8 | ||
| diskSizeGb: 130 | ||
|
|
||
| # Step 2: Run the ES Promote | ||
| - label: Promote Snapshot | ||
| command: .buildkite/scripts/steps/es_snapshots/promote.sh | ||
| depends_on: build-es-snapshot | ||
|
TamerlanG marked this conversation as resolved.
Outdated
|
||
| agents: | ||
| image: family/kibana-ubuntu-2404 | ||
| imageProject: elastic-images-prod | ||
| provider: gcp | ||
| machineType: n2-standard-2 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| steps: | ||
| - name: 'Update Label Color' | ||
| key: update-label-color | ||
| command: .buildkite/scripts/steps/version_bump/update_label_color.sh | ||
| agents: | ||
| image: family/kibana-ubuntu-2404 | ||
| imageProject: elastic-images-prod | ||
| provider: gcp | ||
| machineType: n4-standard-4 | ||
| preemptible: true | ||
| spotZones: us-central1-f,us-central1-c,us-central1-a |
11 changes: 11 additions & 0 deletions
11
.buildkite/pipelines/version_bump/update_pipeline_resource_definitions.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| steps: | ||
| - name: 'Update pipeline resource definitions' | ||
| key: update-pipeline-resource-definitions | ||
| command: .buildkite/scripts/steps/version_bump/update_pipeline_resource_definitions.sh | ||
| agents: | ||
| image: family/kibana-ubuntu-2404 | ||
| imageProject: elastic-images-prod | ||
| provider: gcp | ||
| machineType: n4-standard-4 | ||
| preemptible: true | ||
| spotZones: us-central1-f,us-central1-c,us-central1-a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| steps: | ||
| - name: 'Update release branch config' | ||
| key: update-release-branch | ||
| command: .buildkite/scripts/steps/version_bump/update_release_branch.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # TODO: If the logic is simple within the piplein.ts file, then remove that layer of abstraction. | ||
| ts-node .buildkite/scripts/version_bump/pipeline.ts | buildkite-agent pipeline upload | ||
|
TamerlanG marked this conversation as resolved.
Outdated
|
||
|
|
||
77 changes: 77 additions & 0 deletions
77
.buildkite/scripts/steps/version_bump/bump_package_json_versions.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| source "$(dirname "$0")/wait_for_pr_merge.sh" | ||
|
|
||
| branch_to_merge_into="${OVERRIDE_BRANCH:-$BRANCH}" | ||
|
|
||
| old_version="" | ||
| store_old_version() { | ||
| old_version=$(jq -r '.version' package.json) | ||
| echo "Current version: $old_version" | ||
| echo "New version: $NEW_VERSION" | ||
|
|
||
| buildkite-agent meta-data set "OLD_VERSION" "$old_version" | ||
| } | ||
|
|
||
| update_package_json_version() { | ||
| echo --- Bump package.json versions | ||
| sed -i "s/\"version\": \"[0-9]\+\.[0-9]\+\.[0-9]\+\"/\"version\": \"${NEW_VERSION}\"/g" package.json | ||
| sed -i "s/\"version\": \"[0-9]\+\.[0-9]\+\.[0-9]\+\"/\"version\": \"${NEW_VERSION}\"/g" x-pack/package.json | ||
| } | ||
|
|
||
| update_initial_app_data() { | ||
| echo --- Bump initial_app_data kibanaVersion | ||
| local target="x-pack/solutions/search/plugins/enterprise_search/common/__mocks__/initial_app_data.ts" | ||
|
TamerlanG marked this conversation as resolved.
|
||
| sed -i "s/kibanaVersion: '[0-9]\+\.[0-9]\+\.[0-9]\+'/kibanaVersion: '${NEW_VERSION}'/" "$target" | ||
| } | ||
|
|
||
| update_kibana_migrator_utils() { | ||
| echo --- Bump BASELINE_ELASTICSEARCH_VERSION | ||
| local target="src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_archive_utils.ts" | ||
| sed -i "s/BASELINE_ELASTICSEARCH_VERSION = '[0-9]\+\.[0-9]\+\.[0-9]\+'/BASELINE_ELASTICSEARCH_VERSION = '${NEW_VERSION}'/" "$target" | ||
| } | ||
|
|
||
| delete_baseline_archives() { | ||
| echo --- Deleting baseline archives | ||
| local archive_dir="src/core/server/integration_tests/saved_objects/migrations/archives" | ||
| find "$archive_dir" -type f -name "${old_version}_baseline_*.zip" -delete | ||
| } | ||
|
|
||
| store_old_version | ||
|
|
||
| update_package_json_version | ||
|
|
||
| # If branch is 8.19, skip updating initial_app_data | ||
| if [[ "$BRANCH" != "8.19" ]]; then | ||
|
TamerlanG marked this conversation as resolved.
Outdated
|
||
| update_initial_app_data | ||
| fi | ||
|
|
||
| update_kibana_migrator_utils | ||
|
|
||
| delete_baseline_archives | ||
|
|
||
| # Run integration tests to update snapshots | ||
| node scripts/jest_integration.js -u src/core/server/integration_tests/saved_objects/migrations/group1/create_test_archives.test.ts | ||
| node scripts/jest_integration.js -u src/core/server/integration_tests/saved_objects/migrations/group1/v2_migration.test.ts | ||
|
|
||
|
|
||
| echo --- Committing version bump changes | ||
| git config --global user.name kibanamachine | ||
| git config --global user.email '42973632+kibanamachine@users.noreply.github.com' | ||
|
|
||
| head_branch="bump-versions-$(date +%F_%H-%M-%S)" | ||
| git checkout -b "$head_branch" | ||
| git add package.json x-pack/package.json x-pack/solutions/search/plugins/enterprise_search/common/__mocks__/initial_app_data.ts src/core/server/integration_tests/saved_objects/migrations/kibana_migrator_archive_utils.ts src/core/server/integration_tests/saved_objects/migrations/archives | ||
|
TamerlanG marked this conversation as resolved.
Outdated
|
||
| git commit -m "[version bump] Bump version to ${NEW_VERSION}" | ||
| git push origin "$branch" | ||
|
TamerlanG marked this conversation as resolved.
Outdated
|
||
|
|
||
| prUrl=$(gh pr create --repo elastic/kibana --base "$branch_to_merge_into" --head "$head_branch" --title "[bump version] $(date +%F) Bump package.json versions to ${NEW_VERSION}" --body "Generated by $BUILDKITE_BUILD_URL" --label "release_note:skip" --label "backport:skip") | ||
| echo "Opened PR: $prUrl" | ||
|
|
||
| gh pr merge --repo elastic/kibana --auto --squash --delete-branch "$prUrl" | ||
|
|
||
| wait_for_pr_merge "$prUrl" | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.