Use tools section for Jenkins
This commit is contained in:
parent
23d586e99d
commit
fdc5c5cc61
1 changed files with 4 additions and 4 deletions
8
Jenkinsfile
vendored
8
Jenkinsfile
vendored
|
@ -17,12 +17,12 @@ limitations under the License.
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any
|
||||||
|
|
||||||
def root = tool type: 'go', name: 'Go 1.16'
|
tools {
|
||||||
|
go "Go 1.16"
|
||||||
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
GOROOT= "${root}"
|
GO11MODULE = "on"
|
||||||
GOPATH = "${pwd(tmp: true)}/gocode"
|
|
||||||
PATH = "${root}/bin:${PATH}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
|
Loading…
Reference in a new issue