Ignore Desktop builds for release.

Currently, we don't release desktop betas and it isn't given that the
release schedule will be synchronized. So, for simplicity of support,
let's not build desktop against release branches.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Igor Mandrigin 2018-09-04 08:31:28 +02:00 committed by Jakub Sokołowski
parent 990aa20d8b
commit d2d8e43535
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 39 additions and 17 deletions

View File

@ -24,10 +24,14 @@ pipeline {
} }
stage('Build') { stage('Build') {
parallel { parallel {
stage('MacOS') { steps { script { stage('MacOS') {
when { expression { cmn.getBuildType() != 'release' } }
steps { script {
osx = cmn.buildBranch('status-react/combined/desktop-macos', cmn.getBuildType()) osx = cmn.buildBranch('status-react/combined/desktop-macos', cmn.getBuildType())
} } } } } }
stage('Linux') { steps { script { stage('Linux') {
when { expression { cmn.getBuildType() != 'release' } }
steps { script {
nix = cmn.buildBranch('status-react/combined/desktop-linux', cmn.getBuildType()) nix = cmn.buildBranch('status-react/combined/desktop-linux', cmn.getBuildType())
} } } } } }
stage('iOS') { steps { script { stage('iOS') { steps { script {
@ -44,8 +48,11 @@ pipeline {
stage('Archive') { stage('Archive') {
steps { script { steps { script {
sh('rm -f pkg/*') sh('rm -f pkg/*')
if (cmn.getBuildType() != 'release') {
cmn.copyArts('status-react/combined/desktop-macos', osx.number) cmn.copyArts('status-react/combined/desktop-macos', osx.number)
cmn.copyArts('status-react/combined/desktop-linux', nix.number) cmn.copyArts('status-react/combined/desktop-linux', nix.number)
}
cmn.copyArts('status-react/combined/mobile-android', dro.number) cmn.copyArts('status-react/combined/mobile-android', dro.number)
cmn.copyArts('status-react/combined/mobile-android', e2e.number) cmn.copyArts('status-react/combined/mobile-android', e2e.number)
archiveArtifacts('pkg/*') archiveArtifacts('pkg/*')
@ -55,14 +62,22 @@ pipeline {
steps { script { steps { script {
e2eUrl = cmn.uploadArtifact(findFiles(glob: 'pkg/*e2e.apk')[0].path) e2eUrl = cmn.uploadArtifact(findFiles(glob: 'pkg/*e2e.apk')[0].path)
apkUrl = cmn.uploadArtifact(findFiles(glob: "pkg/*${cmn.getBuildType()}.apk")[0].path) apkUrl = cmn.uploadArtifact(findFiles(glob: "pkg/*${cmn.getBuildType()}.apk")[0].path)
if (cmn.getBuildType() != 'release') {
dmgUrl = cmn.uploadArtifact(findFiles(glob: 'pkg/*.dmg')[0].path) dmgUrl = cmn.uploadArtifact(findFiles(glob: 'pkg/*.dmg')[0].path)
appUrl = cmn.uploadArtifact(findFiles(glob: 'pkg/*.AppImage')[0].path) appUrl = cmn.uploadArtifact(findFiles(glob: 'pkg/*.AppImage')[0].path)
} else {
dmgUrl = null
appUrl = null
}
/* special case for iOS Diawi links */ /* special case for iOS Diawi links */
ipaUrl = ios.getBuildVariables().get('DIAWI_URL') ipaUrl = ios.getBuildVariables().get('DIAWI_URL')
} } } }
} }
stage('Notify') { stage('Notify') {
steps { script { steps { script {
def dmgLink = "<${dmgUrl}|MacOS>"
def appLink = "<${appUrl}|AppImage>"
def message = ( def message = (
(env.CHANGE_ID != null ? (env.CHANGE_ID != null ?
"Build PR #${BRANCH_NAME}(${CHANGE_BRANCH}) success! " : "Build PR #${BRANCH_NAME}(${CHANGE_BRANCH}) success! " :
@ -70,13 +85,17 @@ pipeline {
)+ )+
"<${currentBuild.absoluteUrl}|${currentBuild.displayName}> "+ "<${currentBuild.absoluteUrl}|${currentBuild.displayName}> "+
"(${currentBuild.durationString})\n"+ "(${currentBuild.durationString})\n"+
"Packages: "+ "Packages: <${apkUrl}|Android>, (<${e2eUrl}|e2e>), <${ipaUrl}|iOS>"
"<${apkUrl}|Android>, "+
"(<${e2eUrl}|e2e>), "+
"<${ipaUrl}|iOS>, "+
"<${dmgUrl}|MacOS>, "+
"<${appUrl}|AppImage>"
) )
if (dmgUrl != null) {
message = message + ", <${dmgUrl}|MacOS>"
}
if (appUrl != null) {
message = message + ", <${appUrl}|AppImage>"
}
slackSend( slackSend(
message: message, message: message,
color: 'good' color: 'good'

View File

@ -134,11 +134,14 @@ def githubNotify(apkUrl, e2eUrl, ipaUrl, dmgUrl, appUrl, changeId) {
"Jenkins job: [${currentBuild.displayName}](${currentBuild.absoluteUrl})\\n"+ "Jenkins job: [${currentBuild.displayName}](${currentBuild.absoluteUrl})\\n"+
"##### Mobile\\n" + "##### Mobile\\n" +
"* [Android](${apkUrl}), ([e2e](${e2eUrl}))\\n" + "* [Android](${apkUrl}), ([e2e](${e2eUrl}))\\n" +
"* [iOS](${ipaUrl})\\n" + "* [iOS](${ipaUrl})\\n")
if (dmgUrl != null && appUrl != null) {
message = message +
"##### Desktop\\n" + "##### Desktop\\n" +
"* [MacOS](${dmgUrl})\\n" + "* [MacOS](${dmgUrl})\\n" +
"* [AppImage](${appUrl})" "* [AppImage](${appUrl})"
) }
def script = ( def script = (
"curl "+ "curl "+
"-u status-im:${githubToken} " + "-u status-im:${githubToken} " +