Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

ci: setup: always install/update golang on setup#1465

Merged
jodh-intel merged 1 commit intokata-containers:masterfrom
grahamwhaley:20190412_install_golang
Apr 15, 2019
Merged

ci: setup: always install/update golang on setup#1465
jodh-intel merged 1 commit intokata-containers:masterfrom
grahamwhaley:20190412_install_golang

Conversation

@grahamwhaley
Copy link
Copy Markdown
Contributor

Always try to install/update the version of golang.sh we have when
running setup.sh. For Jenkins, this is done already by the jenkins
specific script, but for other CIs and for hand-running the setup
it would be nice to always try to do it before we do anything else.

Fixes: #1464

Signed-off-by: Graham Whaley graham.whaley@intel.com

@grahamwhaley grahamwhaley requested a review from chavafg April 12, 2019 10:35
@grahamwhaley
Copy link
Copy Markdown
Contributor Author

/test
As I want to see if this breaks any of the existing CIs.

@grahamwhaley
Copy link
Copy Markdown
Contributor Author

OOh, it didn't immediately explode!
I think the SLES failure is unrelated:

12:18:12 Summarizing 1 Failure:
12:18:12 
12:18:12 [Fail] [Serial Test] Update number of CPUs Update CPU constraint [It] should have 2 CPUs 
12:18:12 /tmp/jenkins/workspace/kata-containers-tests-sles-12-PR/go/src/github.com/kata-containers/tests/integration/docker/cpu_test.go:299
12:18:12 
12:18:12 Ran 19 of 247 Specs in 107.619 seconds
12:18:12 FAIL! -- 18 Passed | 1 Failed | 0 Pending | 228 Skipped --- FAIL: TestIntegration (107.62s)
12:18:12 FAIL

Ah, but I think I need to add some args to the install call:

11:36:54 /tmp/install-go-tmp.EsABHBpOdq ~/workspace/workspace/kata-metrics-tests-ubuntu-16-04-PR/go/src/github.com/kata-containers/tests
11:36:54 Missing go version or -p option
11:36:54 Usage:
11:36:54 
11:36:54 install_go.sh [options] <args>
11:36:54 
11:36:54 Args:
11:36:54 <go-version> : Install a specific go version.
11:36:54 
11:36:54 Example:
11:36:54 install_go.sh 1.10
11:36:54 
11:36:54 Options
11:36:54 -d <path> : destination path, path where go will be installed.
11:36:54 -f        : Force remove old go version and install the specified one.
11:36:54 -h        : Show this help
11:36:54 -p        : Install go defined in Kata Containers versions file.

@grahamwhaley grahamwhaley force-pushed the 20190412_install_golang branch from d76dec5 to 923f00a Compare April 12, 2019 12:33
@grahamwhaley
Copy link
Copy Markdown
Contributor Author

/test
updated. try again...

Always try to install/update the version of golang.sh we have when
running setup.sh. For Jenkins, this is done already by the jenkins
specific script, but for other CIs and for hand-running the setup
it would be nice to always try to do it before we do anything else.

Fixes: kata-containers#1464

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
@grahamwhaley grahamwhaley force-pushed the 20190412_install_golang branch from 923f00a to a248610 Compare April 12, 2019 14:19
@grahamwhaley
Copy link
Copy Markdown
Contributor Author

/test
heh, so, here is a funny thing - I had put:

       bash -f "${cidir}/install_go.sh -p -f"

and the opts inside the double quotes then make those opts part of the command, and the file is not found... duh.
Reworked to put the opts after the closing "...

Here is the question - what does -f on the bash commandline do? It obviously looks like it is saying 'execute this file', but staring at the bash manual, I'm not sure it is. I suspect it is setting 'disable pathname expansion', like set -f would..... can anybody tell me that I'm being stupid, or that we do/don't want that @chavafg @jodh-intel ?
/me going slightly mad...

@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Apr 12, 2019

@grahamwhaley yes, I think it is the same as set -f.
I think in this case, it would be the same to use only bash "${cidir}/install_go.sh" -p -f

@grahamwhaley
Copy link
Copy Markdown
Contributor Author

right. I think we have bash -f xxx.sh all over our scripts - and maybe we don't need any of them. But, that is for another PR/day...

@jodh-intel jodh-intel merged commit ab9a4e8 into kata-containers:master Apr 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: always install/update golang

4 participants