-
Notifications
You must be signed in to change notification settings - Fork 245
fix(ci): rearrange evergreen prepare function to install Node.js earlier COMPASS-9669 COMPASS-9683 COMPASS-9687 #7193
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
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 |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| #! /usr/bin/env node | ||
| 'use strict'; | ||
| const path = require('path'); | ||
| const path = require('node:path'); | ||
| const fs = require('node:fs'); | ||
|
|
||
| /* | ||
| This script writes a bash script that can be eval()'d in evergreen to modify the | ||
|
|
@@ -84,7 +84,11 @@ function printCompassEnv() { | |
| // to be a non-cygwin path | ||
| const npmCacheDir = path.resolve(__dirname, '..', '.deps', '.npm-cache'); | ||
|
|
||
| printVar('ARTIFACTS_PATH', `${newPWD}/.deps`); | ||
| const artifactsPath = path.resolve(newPWD, '.deps'); | ||
|
||
| if (!fs.existsSync(artifactsPath)) { | ||
| fs.mkdirSync(artifactsPath, { recursive: true }); | ||
| } | ||
|
|
||
| printVar('NPM_CACHE_DIR', npmCacheDir); | ||
|
|
||
| // all npm var names need to be lowercase | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,28 +2,7 @@ | |
|
|
||
| set -e | ||
|
|
||
| if [[ $OSTYPE == "cygwin" ]]; then | ||
| export PLATFORM='win32' | ||
| export IS_WINDOWS=true | ||
| export ARCH=x64 | ||
| elif [[ $(uname) == Darwin ]]; then | ||
| export PLATFORM='darwin' | ||
| export IS_OSX=true | ||
| if [ `uname -m` = x86_64 ]; then | ||
| export ARCH=x64 | ||
| else | ||
| export ARCH=arm64 | ||
| fi | ||
| else | ||
| export PLATFORM='linux' | ||
| export IS_LINUX=true | ||
| export ARCH=x64 | ||
| if [[ $(cat /etc/*release | grep ^NAME | grep Red) ]]; then | ||
| export IS_RHEL=true | ||
| elif [[ $(cat /etc/*release | grep ^NAME | grep Ubuntu) ]]; then | ||
| export IS_UBUNTU=true | ||
| fi | ||
| fi | ||
| source .evergreen/set-platform-env.sh | ||
|
|
||
| export BASHPATH="$PATH" | ||
| export OSTYPE="$OSTYPE" | ||
|
|
@@ -49,5 +28,9 @@ if [[ "${EVERGREEN_PROJECT}" == "10gen-compass-main" ]]; then | |
| fi | ||
| fi | ||
|
|
||
|
|
||
| .evergreen/print-compass-env.js | ||
| # We cannot rely on node from the PATH, as the script we're calling is setting up that PATH. | ||
|
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. 👍 |
||
| if [ -n "$IS_WINDOWS" ]; then | ||
| .deps/node.exe .evergreen/print-compass-env.js | ||
| else | ||
| .deps/bin/node .evergreen/print-compass-env.js | ||
| fi | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| echo "=========================" | ||
| echo "Important Environment Variables" | ||
| echo "=========================" | ||
| echo "PLATFORM: $PLATFORM" | ||
| echo "ARCH: $ARCH" | ||
| echo "NODE_JS_VERSION: $NODE_JS_VERSION" | ||
| echo "NPM_VERSION: $NPM_VERSION" | ||
| echo "APPDATA: $APPDATA" | ||
| echo "PATH: $PATH" | ||
|
|
||
| # these are super useful if you want to run the smoke tests locally | ||
| echo "export DEV_VERSION_IDENTIFIER=$DEV_VERSION_IDENTIFIER" | ||
| echo "export EVERGREEN_BUCKET_KEY_PREFIX=$EVERGREEN_BUCKET_KEY_PREFIX" | ||
| echo "export EVERGREEN_BUCKET_NAME=$EVERGREEN_BUCKET_NAME" | ||
|
|
||
| echo "IS_OSX: $IS_OSX" | ||
| echo "IS_LINUX: $IS_LINUX" | ||
| echo "IS_WINDOWS: $IS_WINDOWS" | ||
| echo "IS_RHEL: $IS_RHEL" | ||
| echo "IS_UBUNTU: $IS_UBUNTU" | ||
|
|
||
| echo "DOCKER_CONFIG: $DOCKER_CONFIG" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #! /usr/bin/env bash | ||
|
|
||
| if [[ $OSTYPE == "cygwin" ]]; then | ||
| export PLATFORM='win32' | ||
| export IS_WINDOWS=true | ||
| export ARCH=x64 | ||
| elif [[ $(uname) == Darwin ]]; then | ||
| export PLATFORM='darwin' | ||
| export IS_OSX=true | ||
| if [ `uname -m` = x86_64 ]; then | ||
| export ARCH=x64 | ||
| else | ||
| export ARCH=arm64 | ||
| fi | ||
| else | ||
| export PLATFORM='linux' | ||
| export IS_LINUX=true | ||
| export ARCH=x64 | ||
| if [[ $(cat /etc/*release | grep ^NAME | grep Red) ]]; then | ||
| export IS_RHEL=true | ||
| elif [[ $(cat /etc/*release | grep ^NAME | grep Ubuntu) ]]; then | ||
| export IS_UBUNTU=true | ||
| fi | ||
| fi |
Uh oh!
There was an error while loading. Please reload this page.
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.
Oof sorry. Indeed must have been a typo. All I can think of is that maybe my brain went "13 is < 14" since mongodb latest stopping being produced for mac < 14 at 8.0.6 onwards. And 11 happens to be the only version < 14 that we're running? I don't know 🤷