2021-06-07 08:55:16 +00:00
|
|
|
library 'status-jenkins-lib@v1.2.18'
|
2020-08-28 11:55:48 +00:00
|
|
|
|
|
|
|
pipeline {
|
|
|
|
agent { label 'windows' }
|
|
|
|
|
2021-04-19 14:45:46 +00:00
|
|
|
parameters {
|
|
|
|
string(
|
|
|
|
name: 'BUILD_TYPE',
|
|
|
|
description: 'Specify build type. Values: pr / nightly / release',
|
|
|
|
defaultValue: 'pr',
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2020-08-28 11:55:48 +00:00
|
|
|
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 */
|
2021-07-01 17:59:03 +00:00
|
|
|
MAKEFLAGS = '-j4 V=1'
|
2020-08-28 11:55:48 +00:00
|
|
|
/* Disable colors in Nim compiler logs */
|
|
|
|
NIMFLAGS = '--colors:off'
|
|
|
|
/* Control output the filename */
|
|
|
|
STATUS_CLIENT_ZIP = "pkg/${utils.pkgFilename('zip')}"
|
2021-04-19 14:45:46 +00:00
|
|
|
/* RFC 3161 timestamping URL for DigiCert */
|
|
|
|
WINDOWS_CODESIGN_TIMESTAMP_URL = 'http://timestamp.digicert.com'
|
2020-08-28 11:55:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
2020-09-28 19:24:21 +00:00
|
|
|
stage('Deps') {
|
2020-08-28 11:55:48 +00:00
|
|
|
steps {
|
2021-04-14 12:44:13 +00:00
|
|
|
/* trigger fetching of git submodules */
|
|
|
|
sh 'make check-pkg-target-windows'
|
2020-08-28 11:55:48 +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-08-28 11:55:48 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('status-go') {
|
|
|
|
steps { sh 'make status-go' }
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Package') {
|
2021-04-19 14:45:46 +00:00
|
|
|
steps { script {
|
|
|
|
windows.bundle()
|
|
|
|
} }
|
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() }
|
|
|
|
}
|
|
|
|
}
|