This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
2018-09-21 09:55:10 +02:00
|
|
|
pipeline {
|
|
|
|
|
|
|
|
agent {
|
|
|
|
docker { image 'golang:1.11' }
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
|
|
|
|
stage('Prepare environment') {
|
|
|
|
steps {
|
|
|
|
script {
|
2019-02-12 10:17:06 +01:00
|
|
|
sh 'make deps'
|
2018-09-21 09:55:10 +02:00
|
|
|
sh 'make vendor'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Run unit tests') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
sh 'make test'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Run lint') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
try {
|
2018-09-26 12:08:29 +02:00
|
|
|
sh 'make LINT_ARGS="--new-from-rev=HEAD~" lint'
|
2018-09-21 09:55:10 +02:00
|
|
|
} catch(ex) {
|
|
|
|
currentBuild.result = "UNSTABLE"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
script {
|
|
|
|
if (currentBuild.currentResult != 'SUCCESS') {
|
|
|
|
emailext (
|
|
|
|
subject: "${currentBuild.currentResult} - Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
|
|
|
|
body: """
|
|
|
|
Voir les étapes du job: ${env.BUILD_URL}flowGraphTable
|
|
|
|
|
|
|
|
Projet: ${env.GIT_URL}
|
|
|
|
Branche: ${env.GIT_BRANCH}
|
|
|
|
Commit: ${env.GIT_COMMIT}
|
|
|
|
""",
|
|
|
|
recipientProviders: [developers(), requestor()],
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|