2018-08-14 18:09:52 +00:00
|
|
|
pipeline {
|
2018-09-05 18:17:25 +00:00
|
|
|
agent {
|
|
|
|
/* privileged mode is necessary for fuse */
|
|
|
|
docker {
|
|
|
|
label 'linux-new'
|
|
|
|
image 'statusteam/linux-desktop-ubuntu:16.04'
|
|
|
|
args (
|
|
|
|
"--privileged "+
|
|
|
|
"-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-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-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()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
|
|
|
script { desktop.buildClojureScript() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Compile') {
|
|
|
|
steps {
|
|
|
|
script { desktop.compileLinux() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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 }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|