2018-08-14 18:09:52 +00:00
|
|
|
pipeline {
|
|
|
|
agent { label 'master' }
|
|
|
|
|
|
|
|
options {
|
|
|
|
disableConcurrentBuilds()
|
|
|
|
buildDiscarder(logRotator(
|
|
|
|
numToKeepStr: '10',
|
|
|
|
daysToKeepStr: '30',
|
|
|
|
artifactNumToKeepStr: '10',
|
|
|
|
))
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Tag') {
|
|
|
|
steps { script {
|
|
|
|
common = load('ci/common.groovy')
|
2018-08-21 15:17:25 +00:00
|
|
|
/* to avoid missing build tag parallel builds */
|
2018-08-14 18:09:52 +00:00
|
|
|
print "Build Number: ${common.tagBuild()}"
|
|
|
|
} }
|
|
|
|
}
|
|
|
|
stage('Build') {
|
|
|
|
parallel {
|
2018-08-21 15:17:25 +00:00
|
|
|
stage('MacOS') { steps { script {
|
|
|
|
osx = common.buildBranch('status-react/combined/desktop-macos')
|
|
|
|
} } }
|
|
|
|
stage('Linux') { steps { script {
|
|
|
|
nix = common.buildBranch('status-react/combined/desktop-linux')
|
|
|
|
} } }
|
|
|
|
stage('iOS') { steps { script {
|
|
|
|
ios = common.buildBranch('status-react/combined/mobile-ios')
|
|
|
|
} } }
|
|
|
|
stage('Android') { steps { script {
|
|
|
|
dro = common.buildBranch('status-react/combined/mobile-android')
|
|
|
|
} } }
|
|
|
|
stage('Android e2e') { steps { script {
|
|
|
|
e2e = common.buildBranch('status-react/combined/mobile-android', 'e2e')
|
|
|
|
} } }
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Archive') {
|
2018-08-21 15:17:25 +00:00
|
|
|
steps { script {
|
2018-08-14 18:09:52 +00:00
|
|
|
sh('rm -f pkg/*')
|
2018-08-21 15:17:25 +00:00
|
|
|
common.copyArts('status-react/combined/desktop-macos', osx.number)
|
|
|
|
common.copyArts('status-react/combined/desktop-linux', nix.number)
|
|
|
|
common.copyArts('status-react/combined/mobile-android', dro.number)
|
|
|
|
common.copyArts('status-react/combined/mobile-android', e2e.number)
|
2018-08-14 18:09:52 +00:00
|
|
|
archiveArtifacts('pkg/*')
|
2018-08-21 15:17:25 +00:00
|
|
|
} }
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
stage('Upload') {
|
2018-08-21 15:17:25 +00:00
|
|
|
when { expression { params.BUILD_TYPE == 'nightly' } }
|
2018-08-14 18:09:52 +00:00
|
|
|
steps { script {
|
2018-08-22 12:43:51 +00:00
|
|
|
def pkg = "StatusIm-${GIT_COMMIT.take(6)}"
|
|
|
|
e2eUrl = common.uploadArtifact('pkg', "${pkg}-e2e.apk")
|
|
|
|
apkUrl = common.uploadArtifact('pkg', "${pkg}.apk")
|
|
|
|
dmgUrl = common.uploadArtifact('pkg', "${pkg}.dmg")
|
|
|
|
appUrl = common.uploadArtifact('pkg', "${pkg}.AppImage")
|
2018-08-21 15:17:25 +00:00
|
|
|
/* special case for iOS Diawi link */
|
2018-08-22 18:28:16 +00:00
|
|
|
ipaUrl = ios.getBuildVariables().get('DIAWI_URL')
|
2018-08-14 18:09:52 +00:00
|
|
|
} }
|
|
|
|
}
|
|
|
|
stage('Notify') {
|
|
|
|
steps {
|
|
|
|
slackSend(
|
|
|
|
message: (
|
|
|
|
"Build success! "+
|
|
|
|
"<${currentBuild.absoluteUrl}|${currentBuild.displayName}> "+
|
|
|
|
"(${currentBuild.durationString})\n"+
|
2018-08-21 15:17:25 +00:00
|
|
|
(params.BUILD_TYPE == 'nightly' ?
|
|
|
|
"E2E: ${e2eUrl}\n"+
|
2018-08-14 18:09:52 +00:00
|
|
|
"APK: ${apkUrl}\n"+
|
|
|
|
"IPA: ${ipaUrl}\n"+
|
|
|
|
"DMG: ${dmgUrl}\n"+
|
|
|
|
"APP: ${appUrl}\n"
|
|
|
|
: '')
|
|
|
|
),
|
|
|
|
color: 'good'
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Publish') {
|
2018-08-21 15:17:25 +00:00
|
|
|
when { expression { params.BUILD_TYPE == 'nightly' } }
|
2018-08-14 18:09:52 +00:00
|
|
|
steps {
|
|
|
|
build(
|
|
|
|
job: 'misc/status-im.github.io-update_env',
|
|
|
|
parameters: [
|
|
|
|
[name: 'APK_URL', value: apkUrl, $class: 'StringParameterValue'],
|
|
|
|
[name: 'IOS_URL', value: ipaUrl, $class: 'StringParameterValue'],
|
|
|
|
[name: 'DMG_URL', value: dmgUrl, $class: 'StringParameterValue'],
|
|
|
|
[name: 'NIX_URL', value: appUrl, $class: 'StringParameterValue']
|
|
|
|
]
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|