Skip to content

Commit

Permalink
fix(NA): propagation of env vars on forced yarn installs (elastic#128021
Browse files Browse the repository at this point in the history
) (elastic#128034)

Co-authored-by: kibanamachine <[email protected]>
(cherry picked from commit 6e52d0d)

# Conflicts:
#	packages/kbn-pm/dist/index.js
#	packages/kbn-pm/src/commands/bootstrap.ts

Co-authored-by: Tiago Costa <[email protected]>
  • Loading branch information
Spencer and mistic authored Mar 18, 2022
1 parent c01b7d8 commit b0c153e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/kbn-pm/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8933,7 +8933,12 @@ const BootstrapCommand = {

if (forceInstall) {
const forceInstallStartTime = Date.now();
await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["runBazel"])(['run', '@nodejs//:yarn'], runOffline);
await Object(_utils_bazel__WEBPACK_IMPORTED_MODULE_9__["runBazel"])(['run', '@nodejs//:yarn'], runOffline, {
env: {
SASS_BINARY_SITE: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass',
RE2_DOWNLOAD_MIRROR: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2'
}
});
timings.push({
id: 'force install dependencies',
ms: Date.now() - forceInstallStartTime
Expand Down
9 changes: 8 additions & 1 deletion packages/kbn-pm/src/commands/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ export const BootstrapCommand: ICommand = {

if (forceInstall) {
const forceInstallStartTime = Date.now();
await runBazel(['run', '@nodejs//:yarn'], runOffline);
await runBazel(['run', '@nodejs//:yarn'], runOffline, {
env: {
SASS_BINARY_SITE:
'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-sass',
RE2_DOWNLOAD_MIRROR:
'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2',
},
});
timings.push({
id: 'force install dependencies',
ms: Date.now() - forceInstallStartTime,
Expand Down

0 comments on commit b0c153e

Please sign in to comment.