aboutsummaryrefslogtreecommitdiff
path: root/Jenkinsfile
diff options
context:
space:
mode:
authorMarius Gripsgard <mariogrip@ubuntu.com>2017-12-27 07:11:56 +0100
committerMarius Gripsgard <mariogrip@ubuntu.com>2017-12-27 07:11:56 +0100
commit3463ebed954adaa1f4487dd4aa4c028536cbbb99 (patch)
tree979c1eeadd1969ec8d244f5ce76dfd26b8972442 /Jenkinsfile
parent760d505485037b53e13313622599dd939f910f85 (diff)
downloadqmenumodel-3463ebed954adaa1f4487dd4aa4c028536cbbb99.tar.gz
qmenumodel-3463ebed954adaa1f4487dd4aa4c028536cbbb99.tar.bz2
qmenumodel-3463ebed954adaa1f4487dd4aa4c028536cbbb99.zip
Add Jenkinsfile
Diffstat (limited to 'Jenkinsfile')
-rw-r--r--Jenkinsfile65
1 files changed, 65 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..a122443
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,65 @@
+pipeline {
+ agent any
+ stages {
+ stage('Build source') {
+ steps {
+ sh '/usr/bin/build-source.sh'
+ stash(name: 'source', includes: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt')
+ cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
+ }
+ }
+ stage('Build binary - armhf') {
+ steps {
+ parallel(
+ "Build binary - armhf": {
+ node(label: 'arm64') {
+ cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
+ unstash 'source'
+ sh '''export architecture="armhf"
+build-binary.sh'''
+ stash(includes: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt', name: 'build-armhf')
+ cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
+ }
+
+
+ },
+ "Build binary - arm64": {
+ node(label: 'arm64') {
+ cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
+ unstash 'source'
+ sh '''export architecture="arm64"
+ build-binary.sh'''
+ stash(includes: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt', name: 'build-arm64')
+ cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
+ }
+ },
+ "Build binary - amd64": {
+ node(label: 'amd64') {
+ cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
+ unstash 'source'
+ sh '''export architecture="amd64"
+ build-binary.sh'''
+ stash(includes: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt', name: 'build-amd64')
+ cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
+ }
+ }
+ )
+ }
+ }
+ stage('Results') {
+ steps {
+ cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
+ unstash 'build-armhf'
+ unstash 'build-arm64'
+ unstash 'build-amd64'
+ archiveArtifacts(artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo', fingerprint: true, onlyIfSuccessful: true)
+ sh '''/usr/bin/build-repo.sh'''
+ }
+ }
+ stage('Cleanup') {
+ steps {
+ cleanWs(cleanWhenAborted: true, cleanWhenFailure: true, cleanWhenNotBuilt: true, cleanWhenSuccess: true, cleanWhenUnstable: true, deleteDirs: true)
+ }
+ }
+ }
+}