php-vn-lib/Jenkinsfile

56 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2020-01-17 11:55:57 +00:00
#!/usr/bin/env groovy
pipeline {
environment {
PROJECT_NAME = 'php-vn-lib'
}
agent {
docker {
image 'registry.verdnatura.es/debuild:2.23.4-vn1'
2020-01-17 11:55:57 +00:00
registryUrl 'https://registry.verdnatura.es/'
registryCredentialsId 'docker-registry'
2022-07-07 09:20:55 +00:00
args '-v /mnt/appdata/reprepro:/reprepro'
2020-01-17 11:55:57 +00:00
}
}
stages {
stage('Checkout') {
steps {
sh 'printenv'
}
}
stage('Deploy') {
when {
branch 'master'
}
steps {
sh 'debuild -us -uc -b'
sh 'vn-includedeb bookworm'
2020-01-17 11:55:57 +00:00
}
}
}
post {
always {
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;
}
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()
}
}
}
}
}