Skip to content

Commit

Permalink
enable darwin for the node installation in the CI (#51705)
Browse files Browse the repository at this point in the history
* enable darwin for the node installation in the CI

* refactor: avoid hardcode strings and customise based on the OS flavour

* fix classifier

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
v1v and elasticmachine authored Feb 3, 2020
1 parent f271365 commit c76519e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/dev/ci_setup/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,23 +56,23 @@ export KIBANA_PKG_BRANCH="$kbnBranch"
###
### download node
###
nodeVersion="$(cat "$dir/.node-version")"
nodeDir="$cacheDir/node/$nodeVersion"
nodeBin="$nodeDir/bin"
classifier="x64.tar.gz"

UNAME=$(uname)
OS="linux"
if [[ "$UNAME" = *"MINGW64_NT"* ]]; then
OS="win"
nodeBin="$HOME/node"
classifier="x64.zip"
elif [[ "$UNAME" == "Darwin" ]]; then
OS="darwin"
fi
echo " -- Running on OS: $OS"

nodeVersion="$(cat "$dir/.node-version")"
nodeDir="$cacheDir/node/$nodeVersion"

if [[ "$OS" == "win" ]]; then
nodeBin="$HOME/node"
nodeUrl="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v$nodeVersion/node-v$nodeVersion-win-x64.zip"
else
nodeBin="$nodeDir/bin"
nodeUrl="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v$nodeVersion/node-v$nodeVersion-linux-x64.tar.gz"
fi
nodeUrl="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v$nodeVersion/node-v$nodeVersion-${OS}-${classifier}"

if [[ "$installNode" == "true" ]]; then
echo " -- node: version=v${nodeVersion} dir=$nodeDir"
Expand Down

0 comments on commit c76519e

Please sign in to comment.