This repository has been archived on 2024-07-12 . You can view files and clone it, but cannot push or open issues or pull requests.
2020-01-16 10:07:20 +00:00
#!/usr/bin/env groovy
pipeline {
agent any
environment {
PROJECT_NAME = 'vn-vmware'
}
stages {
stage('Checkout') {
steps {
script {
if (!env.GIT_COMMITTER_EMAIL) {
env.COMMITTER_EMAIL = sh(
script: 'git --no-pager show -s --format="%ae"',
returnStdout: true
).trim()
} else {
env.COMMITTER_EMAIL = env.GIT_COMMITTER_EMAIL;
}
}
sh 'printenv'
}
}
stage('Build') {
when {
branch 'master'
}
steps {
2020-01-16 10:15:53 +00:00
sh 'docker run --rm -v /var/lib/docker/volumes/jenkins_master/_data$(pwd):/build -v /mnt/storage/reprepro:/reprepro registry.verdnatura.es/vn-debuild stable'
2020-01-16 10:07:20 +00:00
}
}
}
post {
always {
script {
if (!env.COMMITTER_EMAIL) return
try {
mail(
to: env.COMMITTER_EMAIL,
subject: "Pipeline: ${env.JOB_NAME} (${env.BUILD_NUMBER}): ${currentBuild.currentResult}",
body: "Check status at ${env.BUILD_URL}"
)
} catch (e) {
echo e.toString()
}
}
}
}
}