Skip to content
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

[8.x] [ci] Fix yarn-offline-mirror (#196224) #197106

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .buildkite/scripts/common/setup_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ if [[ ! $(which yarn) || $(yarn --version) != "$YARN_VERSION" ]]; then
npm_install_global yarn "^$YARN_VERSION"
fi

yarn config set yarn-offline-mirror "$YARN_OFFLINE_CACHE"
grep -q 'yarn-offline-mirror ".yarn-local-mirror"' .yarnrc
sed -i "s#.yarn-local-mirror#$YARN_OFFLINE_CACHE#" .yarnrc

YARN_GLOBAL_BIN=$(yarn global bin)
export YARN_GLOBAL_BIN
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/scripts/common/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ check_for_changed_files() {

SHOULD_AUTO_COMMIT_CHANGES="${2:-}"
CUSTOM_FIX_MESSAGE="${3:-}"
GIT_CHANGES="$(git status --porcelain -- . ':!:.bazelrc' ':!:config/node.options' ':!config/kibana.yml')"
GIT_CHANGES="$(git status --porcelain -- . ':!:.bazelrc' ':!:.yarnrc' ':!:config/node.options' ':!config/kibana.yml')"

if [ "$GIT_CHANGES" ]; then
if ! is_auto_commit_disabled && [[ "$SHOULD_AUTO_COMMIT_CHANGES" == "true" && "${BUILDKITE_PULL_REQUEST:-false}" != "false" ]]; then
Expand All @@ -56,7 +56,7 @@ check_for_changed_files() {
git config --global user.name kibanamachine
git config --global user.email '[email protected]'
gh pr checkout "${BUILDKITE_PULL_REQUEST}"
git add -A -- . ':!.bazelrc' ':!WORKSPACE.bazel' ':!config/node.options' ':!config/kibana.yml'
git add -A -- . ':!.bazelrc' ':!.yarnrc' ':!WORKSPACE.bazel' ':!config/node.options' ':!config/kibana.yml'

git commit -m "$NEW_COMMIT_MESSAGE"
git push
Expand Down