2020-09-28 18:16:06 +00:00
|
|
|
library 'status-react-jenkins@v1.2.4'
|
2020-08-28 11:55:48 +00:00
|
|
|
|
|
|
|
pipeline {
|
|
|
|
agent { label 'windows' }
|
|
|
|
|
|
|
|
options {
|
|
|
|
timestamps()
|
|
|
|
/* Prevent Jenkins jobs from running forever */
|
|
|
|
timeout(time: 25, unit: 'MINUTES')
|
|
|
|
/* 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-08-28 11:55:48 +00:00
|
|
|
))
|
|
|
|
}
|
|
|
|
|
|
|
|
environment {
|
|
|
|
TARGET = 'windows'
|
|
|
|
/* Improve make performance */
|
|
|
|
MAKEFLAGS = '-j4'
|
|
|
|
/* Disable colors in Nim compiler logs */
|
|
|
|
NIMFLAGS = '--colors:off'
|
|
|
|
/* Makefile assumes the compiler folder is included */
|
|
|
|
QTDIR = '/c/Qt/5.14.2/msvc2017_64'
|
|
|
|
Qt5_DIR = '/c/Qt/5.14.2/msvc2017_64'
|
|
|
|
VCINSTALLDIR = '/c/BuildTools/VC'
|
|
|
|
/* Control output the filename */
|
|
|
|
STATUS_CLIENT_ZIP = "pkg/${utils.pkgFilename('zip')}"
|
|
|
|
/* Adjust path for correct access to build toos */
|
|
|
|
PATH = [
|
|
|
|
"${QTDIR}/bin",
|
|
|
|
'/c/ProgramData/scoop/apps/gcc/current/bin',
|
|
|
|
'/c/ProgramData/scoop/apps/git/current/bin',
|
|
|
|
'/c/ProgramData/scoop/apps/git/current/usr/bin',
|
|
|
|
'/c/BuildTools/MSBuild/Current/Bin',
|
|
|
|
'/c/BuildTools/VC/Tools/MSVC/14.27.29110/bin',
|
|
|
|
'/c/ProgramData/scoop/shims',
|
|
|
|
'/c/ProgramData/scoop/apps/pypy3/current/Scripts',
|
|
|
|
].join(':')
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
2020-09-28 19:24:21 +00:00
|
|
|
stage('Deps') {
|
2020-08-28 11:55:48 +00:00
|
|
|
steps {
|
|
|
|
/* 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-08-28 11:55:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('status-go') {
|
|
|
|
steps { sh 'make status-go' }
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Package') {
|
2020-10-29 18:26:16 +00:00
|
|
|
steps {
|
|
|
|
withCredentials([string(
|
|
|
|
credentialsId: utils.getInfuraTokenCred(),
|
|
|
|
variable: 'INFURA_TOKEN'
|
|
|
|
)]) {
|
|
|
|
sh "make ${env.STATUS_CLIENT_ZIP}"
|
|
|
|
}
|
|
|
|
}
|
2020-08-28 11:55:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stage('Parallel Upload') {
|
|
|
|
parallel {
|
|
|
|
stage('Upload') {
|
|
|
|
steps { script {
|
|
|
|
env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_ZIP)
|
2020-09-28 05:55:58 +00:00
|
|
|
jenkins.setBuildDesc(Zip: env.PKG_URL)
|
2020-08-28 11:55:48 +00:00
|
|
|
} }
|
|
|
|
}
|
|
|
|
stage('Archive') {
|
|
|
|
steps { script {
|
|
|
|
archiveArtifacts(env.STATUS_CLIENT_ZIP)
|
|
|
|
} }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
success { script { github.notifyPR(true) } }
|
|
|
|
failure { script { github.notifyPR(false) } }
|
|
|
|
always { cleanWs() }
|
|
|
|
}
|
|
|
|
}
|