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
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
@ -1,21 +1,29 @@
|
|||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent any
|
||||||
docker {
|
tools {
|
||||||
image 'golang:latest'
|
go 'go1.16'
|
||||||
args '--privileged'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
environment {
|
environment {
|
||||||
GO114MODULE = 'on'
|
GO114MODULE = 'on'
|
||||||
CGO_ENABLED = 0
|
CGO_ENABLED = 0
|
||||||
GOPATH = "${JENKINS_HOME}/workspace/${JOB_NAME}/builds/${BUILD_ID}"
|
GOPATH = "${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}"
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
|
stage('Pre Test') {
|
||||||
|
steps {
|
||||||
|
echo 'Installing dependencies'
|
||||||
|
sh 'go version'
|
||||||
|
sh 'go get -u golang.org/x/lint/golint'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
sh "go build"
|
echo 'Compiling and building'
|
||||||
|
sh 'go build'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
steps {
|
steps {
|
||||||
sh "go test ./... -v"
|
sh "go test ./... -v"
|
||||||
|
Loading…
Reference in New Issue
Block a user