2022-02-10 13:22:41 +00:00
|
|
|
library 'status-jenkins-lib@v1.3.4'
|
2020-07-06 08:48:42 +00:00
|
|
|
|
2020-06-18 16:44:22 +00:00
|
|
|
pipeline {
|
|
|
|
agent {
|
2021-11-26 10:47:58 +00:00
|
|
|
label 'macos && x86_64'
|
2020-06-18 16:44:22 +00:00
|
|
|
}
|
|
|
|
|
2021-04-19 14:45:46 +00:00
|
|
|
parameters {
|
2022-02-09 10:52:14 +00:00
|
|
|
booleanParam(
|
|
|
|
name: 'RELEASE',
|
|
|
|
description: 'Decides whether binaries are built with debug symbols.',
|
|
|
|
defaultValue: params.RELEASE ?: false
|
2021-04-19 14:45:46 +00:00
|
|
|
)
|
2022-02-09 10:59:41 +00:00
|
|
|
choice(
|
|
|
|
name: 'VERBOSE',
|
|
|
|
description: 'Level of verbosity based on nimbus-build-system setup.',
|
|
|
|
choices: ['0', '1', '2']
|
|
|
|
)
|
2021-04-19 14:45:46 +00:00
|
|
|
}
|
|
|
|
|
2020-06-18 16:44:22 +00:00
|
|
|
options {
|
|
|
|
timestamps()
|
|
|
|
/* Prevent Jenkins jobs from running forever */
|
2022-07-01 09:52:49 +00:00
|
|
|
timeout(time: 25, 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 = 'macos'
|
2020-06-18 16:44:22 +00:00
|
|
|
/* Improve make performance */
|
2022-02-09 10:59:41 +00:00
|
|
|
MAKEFLAGS = "-j4 V=${params.VERBOSE}"
|
2020-06-18 16:44:22 +00:00
|
|
|
/* Disable colors in Nim compiler logs */
|
|
|
|
NIMFLAGS = '--colors:off'
|
|
|
|
/* Qt location is pre-defined */
|
2020-07-02 08:07:19 +00:00
|
|
|
QTDIR = '/usr/local/qt/clang_64'
|
|
|
|
PATH = "${env.QTDIR}/bin:${env.PATH}"
|
2020-06-18 16:44:22 +00:00
|
|
|
/* Control output the filename */
|
2021-09-28 11:57:19 +00:00
|
|
|
STATUS_CLIENT_DMG = "pkg/${utils.pkgFilename(ext: 'dmg')}"
|
2021-05-27 07:53:40 +00:00
|
|
|
/* Apple Team ID for Notarization */
|
|
|
|
MACOS_NOTARIZE_TEAM_ID = "DTX7Z4U3YA"
|
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-macos'
|
2022-04-15 09:17:19 +00:00
|
|
|
/* TODO: Re-add caching of Nim compiler. */
|
|
|
|
withCredentials([
|
|
|
|
usernamePassword( /* For fetching HomeBrew bottles. */
|
|
|
|
credentialsId: "status-im-auto-pkgs",
|
|
|
|
usernameVariable: 'GITHUB_USER',
|
|
|
|
passwordVariable: 'GITHUB_TOKEN'
|
|
|
|
)
|
|
|
|
]) {
|
|
|
|
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') {
|
2021-05-27 07:53:40 +00:00
|
|
|
steps { script {
|
|
|
|
macos.bundle()
|
|
|
|
} }
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Notarize') {
|
|
|
|
when { expression { utils.isReleaseBuild() } }
|
|
|
|
steps { script {
|
|
|
|
macos.notarize()
|
|
|
|
} }
|
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_DMG)
|
2020-09-28 05:55:58 +00:00
|
|
|
jenkins.setBuildDesc(Dmg: env.PKG_URL)
|
2020-07-06 08:48:42 +00:00
|
|
|
} }
|
|
|
|
}
|
|
|
|
stage('Archive') {
|
|
|
|
steps { script {
|
|
|
|
archiveArtifacts(env.STATUS_CLIENT_DMG)
|
|
|
|
} }
|
|
|
|
}
|
|
|
|
}
|
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() }
|
|
|
|
}
|
|
|
|
}
|