-
Notifications
You must be signed in to change notification settings - Fork 8.5k
POC yarn-offline-mirror #21849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POC yarn-offline-mirror #21849
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| yarn-offline-mirror "../kibana-extra/kibana-offline-mirror" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,11 @@ export const BootstrapCommand: ICommand = { | |
| const batchedProjects = topologicallyBatchProjects(projects, projectGraph); | ||
|
|
||
| const frozenLockfile = options['frozen-lockfile'] === true; | ||
| const extraArgs = frozenLockfile ? ['--frozen-lockfile'] : []; | ||
| const offline = options.offline === true; | ||
| const extraArgs = [ | ||
| frozenLockfile ? '--frozen-lockfile' : '', | ||
| offline ? '--offline' : '', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it does, good call. do we use prefer-offline here, and keep it at offline for builds? the idea being that we do want to fail somewhere if we're not cached? the more it i think about it -offline sounds like maintenance nightmare. what if we based it on the release flag? |
||
| ].filter(Boolean); | ||
|
|
||
| log.write(chalk.bold('\nRunning installs in topological order:')); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ export KIBANA_DIR="$(cd "$(dirname "$SCRIPT")/../../.."; pwd)" | |
|
|
||
| # PARENT_DIR is the directory where we will checkout es and x-pack-es | ||
| export PARENT_DIR="$(cd "$KIBANA_DIR"/..; pwd)" | ||
| export KIBANA_EXTRA_DIR="$PARENT_DIR"/"kibana-extra" | ||
|
|
||
| function checkout_sibling { | ||
| project=$1 | ||
|
|
@@ -31,7 +32,7 @@ function checkout_sibling { | |
| useExisting="$(eval "echo "\$$useExistingParamName"")" | ||
|
|
||
| if [ -z ${useExisting:+x} ]; then | ||
| if [ -d "$targetDir" ]; then | ||
| if [ -d "$targetDir" ] && [ -n "$(ls "$targetDir")" ]; then | ||
| echo "I expected a clean workspace but an '${project}' sibling directory already exists in [$PARENT_DIR]!" | ||
| echo | ||
| echo "Either define '${useExistingParamName}' or remove the existing '${project}' sibling." | ||
|
|
@@ -99,3 +100,4 @@ function checkout_sibling { | |
| } | ||
|
|
||
| checkout_sibling "elasticsearch" "${PARENT_DIR}/elasticsearch" "USE_EXISTING_ES" | ||
| checkout_sibling "kibana-offline-mirror" "${KIBANA_EXTRA_DIR}/kibana-offline-mirror" "USE_EXISTING_KIBANA_OFFLINE_MIRROR" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious, why put it in the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no reason other than our previous convention. given the kibana prefix i think it makes sense to move it up one |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| ### | ||
| ### install dependencies | ||
| ### | ||
| echo " -- installing node.js dependencies" | ||
| yarn kbn bootstrap --offline | ||
|
|
||
|
|
||
| ### | ||
| ### verify no git modifications | ||
| ### | ||
|
|
||
| GIT_CHANGES="$(git ls-files --modified)" | ||
| if [ "$GIT_CHANGES" ]; then | ||
| echo -e "\n${RED}ERROR: 'yarn kbn bootstrap' caused changes to the following files:${C_RESET}\n" | ||
| echo -e "$GIT_CHANGES\n" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should replace this with a ci only config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use
yarn config set yarn-offline-mirrorduring the CI setup