From 5a5c02458c4cf2e7a816a9c9e1438e1efbab26b3 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 26 Nov 2019 11:58:10 +0000 Subject: [PATCH 1/3] enable darwin for the node installation in the CI --- src/dev/ci_setup/setup_env.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dev/ci_setup/setup_env.sh b/src/dev/ci_setup/setup_env.sh index 6cfcaca5843b3..31d9a26d184a6 100644 --- a/src/dev/ci_setup/setup_env.sh +++ b/src/dev/ci_setup/setup_env.sh @@ -58,6 +58,8 @@ UNAME=$(uname) OS="linux" if [[ "$UNAME" = *"MINGW64_NT"* ]]; then OS="win" +elif [[ "$UNAME" == "Darwin" ]]; then + OS="darwin" fi echo " -- Running on OS: $OS" @@ -69,7 +71,7 @@ if [[ "$OS" == "win" ]]; then 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" + nodeUrl="https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v$nodeVersion/node-v$nodeVersion-${OS}-x64.tar.gz" fi if [[ "$installNode" == "true" ]]; then From 003a36103d7c12c7d971bf2c47f28bf39a0a3a7a Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 9 Dec 2019 14:09:01 +0000 Subject: [PATCH 2/3] refactor: avoid hardcode strings and customise based on the OS flavour --- src/dev/ci_setup/setup_env.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/dev/ci_setup/setup_env.sh b/src/dev/ci_setup/setup_env.sh index 9af20dc01c493..d62ba61365362 100644 --- a/src/dev/ci_setup/setup_env.sh +++ b/src/dev/ci_setup/setup_env.sh @@ -56,25 +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-${OS}-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" From 0763b9caa944aa04e6a029a1f32074f0d781e88f Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 3 Feb 2020 12:41:21 +0000 Subject: [PATCH 3/3] fix classifier --- src/dev/ci_setup/setup_env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dev/ci_setup/setup_env.sh b/src/dev/ci_setup/setup_env.sh index b974a06af7f3f..823c70e80fe7c 100644 --- a/src/dev/ci_setup/setup_env.sh +++ b/src/dev/ci_setup/setup_env.sh @@ -59,14 +59,14 @@ export KIBANA_PKG_BRANCH="$kbnBranch" nodeVersion="$(cat "$dir/.node-version")" nodeDir="$cacheDir/node/$nodeVersion" nodeBin="$nodeDir/bin" -classifier="-x64.tar.gz" +classifier="x64.tar.gz" UNAME=$(uname) OS="linux" if [[ "$UNAME" = *"MINGW64_NT"* ]]; then OS="win" nodeBin="$HOME/node" - classifier="-x64.zip" + classifier="x64.zip" elif [[ "$UNAME" == "Darwin" ]]; then OS="darwin" fi