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

Add windows support to ci_setup/setup script. #22259

Merged
merged 5 commits into from
Aug 31, 2018

Conversation

liza-mae
Copy link
Contributor

Add windows support. Part of issue: #21315

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@liza-mae liza-mae requested a review from spalger August 22, 2018 18:41
@snide snide removed the v6.4.0 label Aug 23, 2018
@tylersmalley tylersmalley self-requested a review August 28, 2018 16:34
@liza-mae
Copy link
Contributor Author

Please review :)

@@ -30,13 +30,26 @@ fi
###
### download node
###
UNAME=`uname`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we stick with the "$(uname)" syntax? Shellcheck recommends it, and I assume for a good reason.

if [[ "$UNAME" = *"MINGW64_NT"* ]]; then
OS='win'
fi
echo "Running on OS: $OS"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind throwing -- before this log message so it matches the other messages after "Setting up node.js and yarn in $dir"?

if [[ $OS == 'win' ]]; then
export PATH="$PATH:$nodeBin"
else
export PATH="$nodeBin:$PATH"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we prepend, vs append on Linux?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was getting node path errors if the node bin dir it was not listed at the end of the windows path

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not seeing any errors with setting it first - if anything I would expect an issue if there was a node executable already in your path. Setting it first would give it precedence. What is the exact error you're seeing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why :) It was this type of error:
Error: 'module' is undefined
Code: 800A1391
Source: Microsoft JScript runtime error

It is possible I had another node version installed when the problem occurred, I can't recall right now. I will remove it for now and if the problem comes up again we can fix it at that time.

nodeDir="$cacheDir/node/$nodeVersion"
nodeBin="$nodeDir/bin"
nodeUrl="https://nodejs.org/download/release/v$nodeVersion/node-v$nodeVersion-linux-x64.tar.gz"
if [[ $OS == 'win' ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we if/else this like we're doing on line 62?

@tylersmalley
Copy link
Contributor

LGTM on green.

@elasticmachine

This comment has been minimized.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@liza-mae
Copy link
Contributor Author

jenkins test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@liza-mae
Copy link
Contributor Author

The CI failures are not due to my change - known flaky tests

@liza-mae liza-mae merged commit 89bb8dc into elastic:master Aug 31, 2018
@liza-mae liza-mae deleted the fix/issue-21315-a branch August 31, 2018 00:40
liza-mae added a commit to liza-mae/kibana that referenced this pull request Aug 31, 2018
* Add windows support to ci_setup/setup script.

* Update uname syntax

* Update echo statement to match rest

* Update if statement for node package

* Revert path variable
liza-mae added a commit to liza-mae/kibana that referenced this pull request Aug 31, 2018
* Add windows support to ci_setup/setup script.

* Update uname syntax

* Update echo statement to match rest

* Update if statement for node package

* Revert path variable
liza-mae added a commit that referenced this pull request Aug 31, 2018
* Add windows support to ci_setup/setup script.

* Update uname syntax

* Update echo statement to match rest

* Update if statement for node package

* Revert path variable
liza-mae added a commit that referenced this pull request Aug 31, 2018
* Add windows support to ci_setup/setup script.

* Update uname syntax

* Update echo statement to match rest

* Update if statement for node package

* Revert path variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants