Make it so Jenkins can actually build
Some checks failed
timw4mail/gilo/pipeline/head There was a failure building this commit
Some checks failed
timw4mail/gilo/pipeline/head There was a failure building this commit
This commit is contained in:
parent
538bc79cad
commit
d251362776
56
Jenkinsfile
vendored
56
Jenkinsfile
vendored
@ -1,25 +1,33 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent any
|
||||||
docker {
|
tools {
|
||||||
image 'golang:latest'
|
go 'go1.16'
|
||||||
args '--privileged'
|
}
|
||||||
}
|
environment {
|
||||||
}
|
GO114MODULE = 'on'
|
||||||
environment {
|
CGO_ENABLED = 0
|
||||||
GO114MODULE = 'on'
|
GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}"
|
||||||
CGO_ENABLED = 0
|
}
|
||||||
GOPATH = "${JENKINS_HOME}/workspace/${JOB_NAME}/builds/${BUILD_ID}"
|
stages {
|
||||||
}
|
stage('Pre Test') {
|
||||||
stages {
|
steps {
|
||||||
stage('Build') {
|
echo 'Installing dependencies'
|
||||||
steps {
|
sh 'go version'
|
||||||
sh "go build"
|
sh 'go get -u golang.org/x/lint/golint'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Test') {
|
|
||||||
steps {
|
stage('Build') {
|
||||||
sh "go test ./... -v"
|
steps {
|
||||||
}
|
echo 'Compiling and building'
|
||||||
}
|
sh 'go build'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Test') {
|
||||||
|
steps {
|
||||||
|
sh "go test ./... -v"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user