mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[CI] Trigger pipeline deploy when versions.json changes (#134387)
This commit is contained in:
parent
0d2e8e62ab
commit
b32052e66a
3 changed files with 23 additions and 5 deletions
|
@ -11,9 +11,23 @@ steps:
|
|||
automatic:
|
||||
- exit_status: '*'
|
||||
limit: 1
|
||||
|
||||
- wait
|
||||
|
||||
- label: 'Triggering changes-based pipelines'
|
||||
branches: main
|
||||
agents:
|
||||
queue: kibana-default
|
||||
plugins:
|
||||
- chronotc/monorepo-diff#v2.0.4:
|
||||
watch:
|
||||
- path:
|
||||
- 'versions.json'
|
||||
config:
|
||||
command: 'node .buildkite/scripts/steps/trigger_pipeline.js kibana-buildkite-pipelines-deploy main'
|
||||
label: 'Trigger pipeline deploy'
|
||||
agents:
|
||||
queue: 'kibana-default'
|
||||
|
||||
- command: .buildkite/scripts/steps/on_merge_build_and_metrics.sh
|
||||
label: Build Kibana Distribution and Plugins
|
||||
agents:
|
||||
|
|
|
@ -15,5 +15,5 @@ node "$(dirname "${0}")/promote_manifest.js" "$ES_SNAPSHOT_MANIFEST"
|
|||
|
||||
if [[ "$BUILDKITE_BRANCH" == "main" ]]; then
|
||||
echo "--- Trigger agent packer cache pipeline"
|
||||
node .buildkite/scripts/steps/trigger_packer_cache.js
|
||||
node .buildkite/scripts/steps/trigger_pipeline.js kibana-agent-packer-cache main
|
||||
fi
|
||||
|
|
|
@ -8,12 +8,16 @@
|
|||
|
||||
const { BuildkiteClient } = require('kibana-buildkite-library');
|
||||
|
||||
const pipelineSlug = process.argv[2];
|
||||
const branch = process.argv[3] || 'main';
|
||||
const commit = process.argv[4] || 'HEAD';
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
const client = new BuildkiteClient();
|
||||
const build = await client.triggerBuild('kibana-agent-packer-cache', {
|
||||
commit: 'HEAD',
|
||||
branch: 'main',
|
||||
const build = await client.triggerBuild(pipelineSlug, {
|
||||
commit,
|
||||
branch,
|
||||
ignore_pipeline_branch_filters: true, // Required because of a Buildkite bug
|
||||
});
|
||||
console.log(`Triggered build: ${build.web_url}`);
|
Loading…
Add table
Add a link
Reference in a new issue