2018-08-14 18:09:52 +00:00
|
|
|
pipeline {
|
2018-09-25 17:01:48 +00:00
|
|
|
agent {
|
2018-09-05 18:17:25 +00:00
|
|
|
/* privileged mode is necessary for fuse */
|
|
|
|
docker {
|
|
|
|
label 'linux-new'
|
2018-09-28 16:29:13 +00:00
|
|
|
image 'statusteam/linux-desktop-ubuntu:qt-5.11.2'
|
2018-09-05 18:17:25 +00:00
|
|
|
args (
|
2018-09-25 17:01:48 +00:00
|
|
|
"--privileged "+
|
2018-09-05 18:17:25 +00:00
|
|
|
"-v /dev/fuse:/dev/fuse "+
|
|
|
|
"-v /var/tmp/lein:/var/tmp/lein:rw "+
|
|
|
|
"-v /var/tmp/npm:/var/tmp/npm:rw "+
|
|
|
|
"-v /opt/StatusImAppImage.zip:/opt/StatusImAppImage.zip:ro"
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
2018-08-14 18:09:52 +00:00
|
|
|
|
|
|
|
options {
|
|
|
|
buildDiscarder(logRotator(
|
2018-08-29 12:56:14 +00:00
|
|
|
numToKeepStr: '30',
|
2018-08-14 18:09:52 +00:00
|
|
|
daysToKeepStr: '30',
|
2018-08-29 12:56:14 +00:00
|
|
|
artifactNumToKeepStr: '30',
|
2018-08-14 18:09:52 +00:00
|
|
|
))
|
|
|
|
}
|
2018-09-25 17:01:48 +00:00
|
|
|
|
2018-09-05 18:17:25 +00:00
|
|
|
/**
|
|
|
|
* WARNING: Jenkins ignores PATH changes in Docker
|
|
|
|
* https://issues.jenkins-ci.org/browse/JENKINS-49076
|
|
|
|
**/
|
2018-08-14 18:09:52 +00:00
|
|
|
environment {
|
|
|
|
LANG = 'en_US.UTF-8'
|
|
|
|
LANGUAGE = 'en_US.UTF-8'
|
|
|
|
LC_ALL = 'en_US.UTF-8'
|
2018-09-05 18:17:25 +00:00
|
|
|
NPM_CONFIG_CACHE = '/var/tmp/npm'
|
|
|
|
LEIN_HOME = '/var/tmp/lein'
|
2018-09-28 16:29:13 +00:00
|
|
|
QT_PATH = '/opt/qt'
|
2018-09-13 09:44:33 +00:00
|
|
|
STATUSIM_APPIMAGE = '/opt/StatusImAppImage.zip'
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
2018-09-25 17:01:48 +00:00
|
|
|
|
2018-08-14 18:09:52 +00:00
|
|
|
stages {
|
|
|
|
stage('Prep') {
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
/* Necessary to load methods */
|
|
|
|
desktop = load 'ci/desktop.groovy'
|
2018-08-29 07:43:21 +00:00
|
|
|
cmn = load 'ci/common.groovy'
|
2018-09-05 18:17:25 +00:00
|
|
|
sh 'env'
|
2018-08-14 18:09:52 +00:00
|
|
|
desktop.prepDeps()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-09-25 17:01:48 +00:00
|
|
|
stage('Lint') {
|
|
|
|
steps {
|
|
|
|
script { cmn.runLint() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Tests') {
|
|
|
|
steps {
|
|
|
|
script { cmn.runTests() }
|
|
|
|
}
|
|
|
|
}
|
2018-08-14 18:09:52 +00:00
|
|
|
stage('Build') {
|
|
|
|
steps {
|
|
|
|
script { desktop.buildClojureScript() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Compile') {
|
|
|
|
steps {
|
2018-09-13 09:44:33 +00:00
|
|
|
script { desktop.compile() }
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Bundle') {
|
|
|
|
steps {
|
2018-08-29 07:43:21 +00:00
|
|
|
script { app = desktop.bundleLinux(cmn.getBuildType()) }
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Archive') {
|
|
|
|
steps { archiveArtifacts app }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|