Jenkins deploy test
gitea/vn-vmware/master There was a failure building this commit Details

This commit is contained in:
Juan Ferrer 2020-01-16 16:57:37 +01:00
parent 06c71df9c2
commit b178ce5279
1 changed files with 18 additions and 28 deletions

46
Jenkinsfile vendored
View File

@ -4,38 +4,27 @@ pipeline {
agent any
environment {
PROJECT_NAME = 'vn-vmware'
IMAGE = 'registry.verdnatura.es/vn-debuild'
}
agent {
docker {
image 'registry.verdnatura.es/vn-debuild'
registryUrl 'https://registry.verdnatura.es/'
registryCredentialsId 'docker-registry'
args '-v /mnt/storage/reprepro:/reprepro'
}
}
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'
sh 'whoami'
}
}
stage('Deploy') {
when {
branch 'master'
}
agent {
docker {
image 'registry.verdnatura.es/vn-debuild'
registryUrl 'https://registry.verdnatura.es/'
registryCredentialsId 'docker-registry'
}
}
steps {
sh 'ls /var/jenkins_home'
sh 'debuild -us -uc -b'
}
}
@ -43,14 +32,6 @@ pipeline {
when {
branch 'master'
}
agent {
docker {
image 'registry.verdnatura.es/vn-debuild'
registryUrl 'https://registry.verdnatura.es/'
registryCredentialsId 'docker-registry'
args '-u www-data -v /mnt/storage/reprepro:/reprepro'
}
}
steps {
sh 'vn-include "$WORKSPACE"'
}
@ -59,6 +40,15 @@ pipeline {
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(