-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Prevent console.log in pipeline.ts (#204724)
## Summary ~Logging to stdout from this file would result uploading the logged string to buildkite as a pipeline definition, causing errors (https://buildkite.com/elastic/kibana-pull-request/builds/261721#0193d94b-f05c-41d6-9865-3d3c331a6cc4)~ Adds an inline eslint rule to warn about `console.log/stdout` usage, as this has happened before by oversight. Overlaps with: #204672 --------- Co-authored-by: kibanamachine <[email protected]>
- Loading branch information
1 parent
23c28eb
commit ae6d046
Showing
3 changed files
with
32 additions
and
6 deletions.
There are no files selected for viewing
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,13 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the "Elastic License | ||
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
* Public License v 1"; you may not use this file except in compliance with, at | ||
* your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
* License v3.0 only", or the "Server Side Public License, v 1". | ||
*/ | ||
|
||
export function emitPipeline(pipelineSteps: string[]) { | ||
const pipelineStr = [...new Set(pipelineSteps)].join('\n'); | ||
console.log(pipelineStr); | ||
} |
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 |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
|
||
export * from './client'; | ||
export * from './types'; | ||
export * from './emitPipeline'; |
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