Forked from
ICS Control System Infrastructure / csentry
459 commits behind the upstream repository.
-
Benjamin Bertrand authored
This reverts commit 8d6acd19. See https://issues.jenkins-ci.org/browse/JENKINS-46736
Benjamin Bertrand authoredThis reverts commit 8d6acd19. See https://issues.jenkins-ci.org/browse/JENKINS-46736
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Jenkinsfile 1.45 KiB
pipeline {
agent { label 'docker-compose' }
environment {
GIT_TAG = sh(returnStdout: true, script: 'git describe --exact-match || true').trim()
}
stages {
stage('Refresh') {
steps {
slackSend (color: 'good', message: "STARTED: <${env.BUILD_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>")
sh 'make clean'
sh 'make refresh'
}
}
stage('Build') {
steps {
ansiColor('xterm') {
sh 'make build'
}
}
}
stage('Test') {
steps {
sh 'make db_image'
/* let the time to postgres to start */
sh 'sleep 5'
sh 'make test_image'
}
}
stage('Push') {
when {
not { environment name: 'GIT_TAG', value: '' }
}
steps {
sh 'make tag'
sh 'make push'
}
}
}
post {
always {
sh 'make clean'
/* clean up the workspace */
deleteDir()
}
failure {
slackSend (color: 'danger', message: "FAILED: <${env.BUILD_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>")
}
success {
slackSend (color: 'good', message: "SUCCESSFUL: <${env.BUILD_URL}|${env.JOB_NAME} [${env.BUILD_NUMBER}]>")
}
}
}