-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ci] Click to deploy cloud #205623
Merged
Merged
[ci] Click to deploy cloud #205623
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
832162c
rename pipeline implementation file
delanni ffefb7e
add pipeline def and impl for deploying to cloud without the test suites
delanni 4eed184
add cloud deployment task to pull_requests
delanni 48746ea
fix partial agent targeting
delanni 3b92c05
add kibana build step before cloud image build
delanni fa17ab7
fix partial agent targeting
delanni 37d43d0
Merge branch 'main' into create-deploy-cloud-pipeline
delanni d9cf744
Merge branch 'main' into create-deploy-cloud-pipeline
delanni 005281a
update/recreate comments instead of creating new
delanni ae3f2c5
linkify comments
delanni b7f5f14
fix links by adding a line-break after the comment
delanni 93935af
Merge branch 'main' into create-deploy-cloud-pipeline
delanni bab7e6a
Merge branch 'main' into create-deploy-cloud-pipeline
delanni 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
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
45 changes: 45 additions & 0 deletions
45
.buildkite/pipeline-resource-definitions/kibana-deploy-cloud.yml
This file contains 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,45 @@ | ||
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Resource | ||
metadata: | ||
name: bk-kibana-deploy-cloud-from-pr | ||
description: 'Builds Kibana and initiates a Kibana cloud deployment from a PR' | ||
links: | ||
- url: 'https://buildkite.com/elastic/kibana-deploy-cloud-from-pr' | ||
title: Pipeline link | ||
spec: | ||
type: buildkite-pipeline | ||
system: buildkite | ||
owner: 'group:kibana-operations' | ||
implementation: | ||
apiVersion: buildkite.elastic.dev/v1 | ||
kind: Pipeline | ||
metadata: | ||
name: kibana / deploy cloud from PR | ||
description: 'Builds Kibana and initiates a Kibana cloud deployment from a PR' | ||
spec: | ||
env: | ||
ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'false' | ||
|
||
allow_rebuilds: false | ||
branch_configuration: main | ||
default_branch: main | ||
repository: elastic/kibana | ||
pipeline_file: .buildkite/pipelines/build_pr_and_deploy_cloud.yml | ||
provider_settings: | ||
build_pull_requests: true | ||
prefix_pull_request_fork_branch_names: false | ||
skip_pull_request_builds_for_existing_commits: true | ||
trigger_mode: none | ||
cancel_intermediate_builds: true | ||
teams: | ||
kibana-operations: | ||
access_level: MANAGE_BUILD_AND_READ | ||
appex-qa: | ||
access_level: MANAGE_BUILD_AND_READ | ||
kibana-tech-leads: | ||
access_level: MANAGE_BUILD_AND_READ | ||
everyone: | ||
access_level: BUILD_AND_READ | ||
tags: | ||
- kibana |
This file contains 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
This file contains 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
This file contains 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,82 @@ | ||
env: | ||
ELASTIC_PR_COMMENTS_ENABLED: 'true' | ||
ELASTIC_GITHUB_BUILD_COMMIT_STATUS_ENABLED: 'true' | ||
GITHUB_BUILD_COMMIT_STATUS_CONTEXT: kibana-deploy-cloud-from-pr | ||
|
||
steps: | ||
- group: 'Cloud Deployment' | ||
if: "build.env('GITHUB_PR_LABELS') =~ /(ci:cloud-deploy|ci:cloud-redeploy)/" | ||
|
||
steps: | ||
- command: .buildkite/scripts/lifecycle/pre_build.sh | ||
label: Pre-Build | ||
timeout_in_minutes: 10 | ||
agents: | ||
provider: gcp | ||
image: family/kibana-ubuntu-2004 | ||
imageProject: elastic-images-prod | ||
machineType: n2-standard-2 | ||
retry: | ||
automatic: | ||
- exit_status: '*' | ||
limit: 1 | ||
|
||
- command: | | ||
ts-node .buildkite/scripts/lifecycle/comment_on_pr.ts \ | ||
--message "PR Cloud deployment started at: $BUILDKITE_BUILD_URL" \ | ||
--context "cloud-deploy-job" \ | ||
--clear-previous | ||
label: Comment with job URL | ||
agents: | ||
provider: gcp | ||
image: family/kibana-ubuntu-2004 | ||
imageProject: elastic-images-prod | ||
machineType: n2-standard-2 | ||
timeout_in_minutes: 5 | ||
- command: .buildkite/scripts/steps/build_kibana.sh | ||
label: Build Kibana Distribution | ||
agents: | ||
provider: gcp | ||
image: family/kibana-ubuntu-2004 | ||
imageProject: elastic-images-prod | ||
machineType: n2-standard-8 | ||
preemptible: true | ||
diskSizeGb: 125 | ||
if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''" | ||
timeout_in_minutes: 90 | ||
retry: | ||
automatic: | ||
- exit_status: '-1' | ||
limit: 3 | ||
|
||
- wait: ~ | ||
|
||
- command: .buildkite/scripts/steps/cloud/build_and_deploy.sh | ||
label: 'Build and Deploy to Cloud' | ||
agents: | ||
provider: gcp | ||
image: family/kibana-ubuntu-2004 | ||
imageProject: elastic-images-prod | ||
machineType: n2-standard-2 | ||
preemptible: true | ||
timeout_in_minutes: 30 | ||
retry: | ||
automatic: | ||
- exit_status: '-1' | ||
limit: 3 | ||
|
||
- wait: ~ | ||
|
||
- command: | | ||
ts-node .buildkite/scripts/lifecycle/comment_on_pr.ts \ | ||
--message "Cloud deployment initiated, see credentials at: $BUILDKITE_BUILD_URL" \ | ||
--context "cloud-deploy-job" \ | ||
--clear-previous | ||
label: Comment with job URL | ||
agents: | ||
provider: gcp | ||
image: family/kibana-ubuntu-2004 | ||
imageProject: elastic-images-prod | ||
machineType: n2-standard-2 | ||
timeout_in_minutes: 5 |
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks broken, but works https://buildkite.com/elastic/kibana-migration-pipeline-staging/builds/199