adds lint to jenkinsfile
All checks were successful
gitea-deepak/gogmagog/pipeline/head This commit looks good
All checks were successful
gitea-deepak/gogmagog/pipeline/head This commit looks good
This commit is contained in:
parent
f947dd2912
commit
4b8fd5d78a
17
Jenkinsfile
vendored
17
Jenkinsfile
vendored
@ -6,8 +6,16 @@ pipeline {
|
||||
environment {
|
||||
GO115MODULE = 'on'
|
||||
CGO_ENABLED = 0
|
||||
GOPATH = '/tmp/gopath'
|
||||
}
|
||||
stages {
|
||||
stage('Pre Test') {
|
||||
steps {
|
||||
echo 'Installing dependencies'
|
||||
sh 'go version'
|
||||
sh 'go get -u golang.org/x/lint/golint'
|
||||
}
|
||||
}
|
||||
stage('Compile') {
|
||||
steps {
|
||||
sh 'go build'
|
||||
@ -27,6 +35,14 @@ pipeline {
|
||||
sh 'go test -v ./...'
|
||||
}
|
||||
}
|
||||
stage('lint') {
|
||||
environment {
|
||||
PATH="${env.PATH}:${env.GOPATH}/bin"
|
||||
}
|
||||
steps {
|
||||
sh 'golint ./...'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,7 +51,6 @@ pipeline {
|
||||
always {
|
||||
mail (bcc: '',
|
||||
body: "Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> Build URL: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: 'jenkins@jenkins.deepak.science', mimeType: 'text/html', replyTo: 'dmallubhotla+jenkins@gmail.com', subject: "${env.JOB_NAME} #${env.BUILD_NUMBER}: Build ${currentBuild.currentResult}", to: "dmallubhotla+ci@gmail.com")
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user