2021-04-15 09:20:31 +00:00
|
|
|
library 'status-jenkins-lib@v1.2.12'
|
2020-07-06 08:48:42 +00:00
|
|
|
|
2020-06-18 16:44:22 +00:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
label 'linux'
|
2020-11-06 15:50:58 +00:00
|
|
|
image 'statusteam/nim-status-client-build:1.0.1'
|
2020-06-18 16:44:22 +00:00
|
|
|
/* allows jenkins use cat and mounts '/dev/fuse' for linuxdeployqt */
|
|
|
|
args '--entrypoint="" --cap-add SYS_ADMIN --security-opt apparmor:unconfined --device /dev/fuse'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
options {
|
|
|
|
timestamps()
|
|
|
|
/* Prevent Jenkins jobs from running forever */
|
2020-07-02 16:35:24 +00:00
|
|
|
timeout(time: 15, unit: 'MINUTES')
|
2020-06-18 16:44:22 +00:00
|
|
|
/* manage how many builds we keep */
|
|
|
|
buildDiscarder(logRotator(
|
2020-11-24 18:42:31 +00:00
|
|
|
numToKeepStr: '10',
|
|
|
|
daysToKeepStr: '30',
|
2021-03-25 20:49:27 +00:00
|
|
|
artifactNumToKeepStr: '3',
|
2020-06-18 16:44:22 +00:00
|
|
|
))
|
|
|
|
}
|
|
|
|
|
|
|
|
environment {
|
2020-07-06 08:48:42 +00:00
|
|
|
TARGET = 'linux'
|
2020-06-18 16:44:22 +00:00
|
|
|
/* Improve make performance */
|
|
|
|
MAKEFLAGS = '-j4'
|
|
|
|
/* Disable colors in Nim compiler logs */
|
|
|
|
NIMFLAGS = '--colors:off'
|
2020-07-02 08:07:19 +00:00
|
|
|
/* Makefile assumes the compiler folder is included */
|
|
|
|
QTDIR = "/opt/qt/5.14.0/gcc_64"
|
2020-06-18 16:44:22 +00:00
|
|
|
/* Control output the filename */
|
2020-07-06 08:48:42 +00:00
|
|
|
STATUS_CLIENT_APPIMAGE = "pkg/${utils.pkgFilename('AppImage')}"
|
2020-06-18 16:44:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
2020-09-28 19:24:21 +00:00
|
|
|
stage('Deps') {
|
2020-06-18 16:44:22 +00:00
|
|
|
steps {
|
2021-04-14 12:44:13 +00:00
|
|
|
/* trigger fetching of git submodules */
|
|
|
|
sh 'make check-pkg-target-linux'
|
2020-06-18 16:44:22 +00:00
|
|
|
/* avoid re-compiling Nim by using cache */
|
|
|
|
cache(maxCacheSize: 250, caches: [[
|
|
|
|
$class: 'ArbitraryFileCache',
|
|
|
|
includes: '**/*',
|
|
|
|
path: 'vendor/nimbus-build-system/vendor/Nim/bin'
|
|
|
|
]]) {
|
2020-09-28 19:24:21 +00:00
|
|
|
sh 'make deps'
|
2020-06-18 16:44:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('status-go') {
|
|
|
|
steps { sh 'make status-go' }
|
|
|
|
}
|
|
|
|
|
2020-10-30 01:53:34 +00:00
|
|
|
stage('Package') {
|
|
|
|
steps {
|
2020-10-29 18:26:16 +00:00
|
|
|
withCredentials([string(
|
|
|
|
credentialsId: utils.getInfuraTokenCred(),
|
|
|
|
variable: 'INFURA_TOKEN'
|
|
|
|
)]) {
|
2020-10-30 01:53:34 +00:00
|
|
|
sh 'make pkg-linux'
|
2020-10-29 18:26:16 +00:00
|
|
|
}
|
|
|
|
}
|
2020-06-18 16:44:22 +00:00
|
|
|
}
|
|
|
|
|
2020-07-06 08:48:42 +00:00
|
|
|
stage('Parallel Upload') {
|
|
|
|
parallel {
|
|
|
|
stage('Upload') {
|
|
|
|
steps { script {
|
|
|
|
env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_APPIMAGE)
|
2020-09-28 05:55:58 +00:00
|
|
|
jenkins.setBuildDesc(AppImage: env.PKG_URL)
|
2020-07-06 08:48:42 +00:00
|
|
|
} }
|
|
|
|
}
|
|
|
|
stage('Archive') {
|
|
|
|
steps { script {
|
|
|
|
archiveArtifacts(env.STATUS_CLIENT_APPIMAGE)
|
|
|
|
} }
|
|
|
|
}
|
|
|
|
}
|
2020-06-18 16:44:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
2020-07-06 08:48:42 +00:00
|
|
|
success { script { github.notifyPR(true) } }
|
|
|
|
failure { script { github.notifyPR(false) } }
|
2020-06-18 16:44:22 +00:00
|
|
|
always { cleanWs() }
|
|
|
|
}
|
|
|
|
}
|