diff --git a/.buildkite/scripts/pipelines/pull_request/pipeline.ts b/.buildkite/scripts/pipelines/pull_request/pipeline.ts index 215f6114d9d19..4065d3b915fe7 100644 --- a/.buildkite/scripts/pipelines/pull_request/pipeline.ts +++ b/.buildkite/scripts/pipelines/pull_request/pipeline.ts @@ -20,8 +20,8 @@ if (!prConfig) { } const GITHUB_PR_LABELS = process.env.GITHUB_PR_LABELS ?? ''; -const REQUIRED_PATHS = prConfig.always_require_ci_on_changed.map((r) => new RegExp(r, 'i')); -const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed.map((r) => new RegExp(r, 'i')); +const REQUIRED_PATHS = prConfig.always_require_ci_on_changed!.map((r) => new RegExp(r, 'i')); +const SKIPPABLE_PR_MATCHERS = prConfig.skip_ci_on_only_changed!.map((r) => new RegExp(r, 'i')); const getPipeline = (filename: string, removeSteps = true) => { const str = fs.readFileSync(filename).toString(); @@ -39,6 +39,9 @@ const getPipeline = (filename: string, removeSteps = true) => { return; } + pipeline.push(getAgentImageConfig({ returnYaml: true })); + pipeline.push(getPipeline('.buildkite/pipelines/pull_request/base.yml', false)); + if (await doAnyChangesMatch([/^packages\/kbn-handlebars/])) { pipeline.push(getPipeline('.buildkite/pipelines/pull_request/kbn_handlebars.yml')); }