mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
[buildkite] Add more logging and debug information to PR pipeline generation (#100709)
This commit is contained in:
parent
731c253058
commit
81a441e636
4 changed files with 182 additions and 149 deletions
|
@ -6,13 +6,19 @@ import { generatePipelines } from "./pipeline";
|
|||
const pipelines = generatePipelines();
|
||||
|
||||
for (const pipeline of pipelines) {
|
||||
if (!process.env.CI) {
|
||||
// Just for local debugging purposes
|
||||
const yaml = stringify(pipeline.pipeline);
|
||||
|
||||
console.log(`--- Generated pipeline: ${pipeline.name}`);
|
||||
console.log(yaml);
|
||||
|
||||
// Only do the pipeline upload if we're actually in CI
|
||||
// This lets us run the tool locally and see the output
|
||||
if (process.env.CI) {
|
||||
console.log("");
|
||||
console.log(stringify(pipeline));
|
||||
} else {
|
||||
console.log("Uploading pipeline...");
|
||||
|
||||
execSync(`buildkite-agent pipeline upload`, {
|
||||
input: stringify(pipeline),
|
||||
input: yaml,
|
||||
stdio: ["pipe", "inherit", "inherit"],
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue