Jenkins deployment
gitea/php-vn-lib/master This commit looks good Details

This commit is contained in:
Juan Ferrer 2020-01-17 12:55:57 +01:00
parent 6dec64dec4
commit 5b0d36ada9
5 changed files with 60 additions and 6 deletions

56
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,56 @@
#!/usr/bin/env groovy
pipeline {
environment {
PROJECT_NAME = 'php-vn-lib'
}
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 {
sh 'printenv'
}
}
stage('Deploy') {
when {
branch 'master'
}
steps {
sh 'debuild -us -uc -b'
sh 'vn-includedeb'
}
}
}
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()
}
}
}
}
}

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# PHP utilities
Common utilities library for PHP.

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
php-vn-lib (2.1.6) stable; urgency=low
php-vn-lib (2.1.7) stable; urgency=low
* Initial Release.

5
deploy
View File

@ -1,5 +0,0 @@
#!/bin/bash
set -e
vn-debuild
vn-deploy root@www1.static root@www2.static