Skip to content

Commit

Permalink
chore(NA): enable yarn prefer offline and local mirror for development (
Browse files Browse the repository at this point in the history
#84124)

* chore(NA): enable --prefer-offline by default

* chore(NA): use prefer offline in the yarnrc

* chore(NA): update kbn pm

* chore(NA): add yarn offline mirror integration

* chore(NA): remove non wanted prune feature due to switching between branches

* chore(NA): re-introduce babel require hook
  • Loading branch information
mistic authored Nov 25, 2020
1 parent a1b568b commit aa8ec78
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .ci/packer_cache_for_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ tar -cf "$HOME/.kibana/bootstrap_cache/$branch.tar" \
.chromium \
.es \
.chromedriver \
.geckodriver;
.geckodriver \
.yarn-local-mirror;

echo "created $HOME/.kibana/bootstrap_cache/$branch.tar"

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ report.asciidoc

# TS incremental build cache
*.tsbuildinfo

# Yarn local mirror content
.yarn-local-mirror
5 changes: 5 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Configure an offline yarn mirror in the data folder
yarn-offline-mirror ".yarn-local-mirror"

# Always look into the cache first before fetching online
--install.prefer-offline true
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
"moment": "^2.24.0",
"moment-duration-format": "^2.3.2",
"moment-timezone": "^0.5.27",
"monaco-editor": "~0.17.0",
"monaco-editor": "^0.17.0",
"mustache": "^2.3.2",
"ngreact": "^0.5.1",
"nock": "12.0.3",
Expand Down Expand Up @@ -589,7 +589,7 @@
"babel-loader": "^8.0.6",
"babel-plugin-add-module-exports": "^1.0.2",
"babel-plugin-istanbul": "^6.0.0",
"babel-plugin-require-context-hook": "npm:babel-plugin-require-context-hook-babel7@1.0.0",
"babel-plugin-require-context-hook": "^1.0.0",
"babel-plugin-styled-components": "^1.10.7",
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
"backport": "5.6.0",
Expand Down Expand Up @@ -775,7 +775,7 @@
"react-fast-compare": "^2.0.4",
"react-grid-layout": "^0.16.2",
"react-markdown": "^4.3.1",
"react-monaco-editor": "~0.27.0",
"react-monaco-editor": "^0.27.0",
"react-popper-tooltip": "^2.10.1",
"react-resize-detector": "^4.2.0",
"react-reverse-portal": "^1.0.4",
Expand Down
2 changes: 1 addition & 1 deletion src/dev/ci_setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ echo " -- TEST_ES_SNAPSHOT_VERSION='$TEST_ES_SNAPSHOT_VERSION'"
### install dependencies
###
echo " -- installing node.js dependencies"
yarn kbn bootstrap --prefer-offline
yarn kbn bootstrap

###
### Download es snapshots
Expand Down
4 changes: 2 additions & 2 deletions vars/kibanaCoverage.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def generateReports(title) {
source src/dev/ci_setup/setup_env.sh true
# bootstrap from x-pack folder
cd x-pack
yarn kbn bootstrap --prefer-offline
yarn kbn bootstrap
# Return to project root
cd ..
. src/dev/code_coverage/shell_scripts/extract_archives.sh
Expand All @@ -172,7 +172,7 @@ def uploadCombinedReports() {
def ingestData(jobName, buildNum, buildUrl, previousSha, teamAssignmentsPath, title) {
kibanaPipeline.bash("""
source src/dev/ci_setup/setup_env.sh
yarn kbn bootstrap --prefer-offline
yarn kbn bootstrap
# Using existing target/kibana-coverage folder
. src/dev/code_coverage/shell_scripts/generate_team_assignments_and_ingest_coverage.sh '${jobName}' ${buildNum} '${buildUrl}' '${previousSha}' '${teamAssignmentsPath}'
""", title)
Expand Down
2 changes: 1 addition & 1 deletion vars/kibanaTeamAssign.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
def generateTeamAssignments(teamAssignmentsPath, title) {
kibanaPipeline.bash("""
source src/dev/ci_setup/setup_env.sh
yarn kbn bootstrap --prefer-offline
yarn kbn bootstrap
# Build team assignments dat file
node scripts/generate_team_assignments.js --verbose --dest '${teamAssignmentsPath}'
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7849,7 +7849,7 @@ babel-plugin-react-docgen@^4.1.0:
react-docgen "^5.0.0"
recast "^0.14.7"

babel-plugin-require-context-hook@^1.0.0, "babel-plugin-require-context-hook@npm:babel-plugin-require-context-hook-babel7@1.0.0":
babel-plugin-require-context-hook@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/babel-plugin-require-context-hook-babel7/-/babel-plugin-require-context-hook-babel7-1.0.0.tgz#1273d4cee7e343d0860966653759a45d727e815d"
integrity sha512-kez0BAN/cQoyO1Yu1nre1bQSYZEF93Fg7VQiBHFfMWuaZTy7vJSTT4FY68FwHTYG53Nyt0A7vpSObSVxwweQeQ==
Expand Down Expand Up @@ -20267,7 +20267,7 @@ moment-timezone@^0.5.27:
resolved "https://registry.yarnpkg.com/moment/-/moment-2.28.0.tgz#cdfe73ce01327cee6537b0fafac2e0f21a237d75"
integrity sha512-Z5KOjYmnHyd/ukynmFd/WwyXHd7L4J9vTI/nn5Ap9AVUgaAE15VvQ9MOGmJJygEUklupqIrFnor/tjTwRU+tQw==

monaco-editor@~0.17.0:
monaco-editor@^0.17.0:
version "0.17.1"
resolved "https://registry.yarnpkg.com/monaco-editor/-/monaco-editor-0.17.1.tgz#8fbe96ca54bfa75262706e044f8f780e904aa45c"
integrity sha512-JAc0mtW7NeO+0SwPRcdkfDbWLgkqL9WfP1NbpP9wNASsW6oWqgZqNIWt4teymGjZIXTElx3dnQmUYHmVrJ7HxA==
Expand Down Expand Up @@ -23323,7 +23323,7 @@ react-moment-proptypes@^1.7.0:
dependencies:
moment ">=1.6.0"

react-monaco-editor@~0.27.0:
react-monaco-editor@^0.27.0:
version "0.27.0"
resolved "https://registry.yarnpkg.com/react-monaco-editor/-/react-monaco-editor-0.27.0.tgz#2dbf47b8fd4d8e4763934051f07291d9b128bb89"
integrity sha512-Im40xO4DuFlQ6kVcSBHC+p70fD/5aErUy1uyLT9RZ4nlehn6BOPpwmcw/2IN/LfMvy8X4WmLuuvrNftBZLH+vA==
Expand Down

0 comments on commit aa8ec78

Please sign in to comment.