Skip to content

Commit

Permalink
Jenkins file to build/push packages
Browse files Browse the repository at this point in the history
  • Loading branch information
william-gr committed Nov 29, 2019
1 parent 002f046 commit 13baad1
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Jenkinsfile-Debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
pipeline {
agent {
node {
label 'FreeNAS-webui'
}
}
stages {
stage('Checkout') {
steps {
dir('src') {
checkout scm
}
sh 'git clone http://github.com/truenas/repo-mgmt mgmt || ( cd mgmt ; git pull )'
}
}
stage('Cleanup') {
steps {
sh 'cd src && rm -rf * && git reset --hard HEAD'
}
}
stage('Build') {
steps {
sh 'env DEB_SIGN_KEYID=92B8B783F95A684C0A3B643073CF445610D143A1 ./mgmt/scripts/debuilder --path src/debian -D bullseye-truenas-unstable -vvv'
sh 'env DEB_SIGN_KEYID=92B8B783F95A684C0A3B643073CF445610D143A1 ./mgmt/scripts/debuilder --path src/src/middlewared -D bullseye-truenas-unstable -vvv'
sh 'env DEB_SIGN_KEYID=92B8B783F95A684C0A3B643073CF445610D143A1 ./mgmt/scripts/debuilder --path src/src/freenas -D bullseye-truenas-unstable -vvv'
}
}
stage('Push to buildd') {
steps {
withCredentials([file(credentialsId: 'dput.cf', variable: 'dputcfg')]) {
sh "dput -c \"${dputcfg}\" mini-buildd-mini-buildd-host src/truenas*.changes"
sh "dput -c \"${dputcfg}\" mini-buildd-mini-buildd-host src/src/middlewared*.changes"
sh "dput -c \"${dputcfg}\" mini-buildd-mini-buildd-host src/src/truenas-files*.changes"
}
}
}
}
post {
failure {
mail bcc: '', body: "<b>Jenkins: Middleware Build Failure</b><br>Project: ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br> URL build: ${env.BUILD_URL}", cc: '', charset: 'UTF-8', from: '', mimeType: 'text/html', replyTo: '', subject: "ERROR CI: Project name -> ${env.JOB_NAME}", to: "[email protected]";
}
}
}

0 comments on commit 13baad1

Please sign in to comment.