Skip to content

Commit d2d8e43

Browse files
mandriginjakubgs
authored andcommitted
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 <[email protected]>
1 parent 990aa20 commit d2d8e43

File tree

2 files changed

+39
-17
lines changed

2 files changed

+39
-17
lines changed

ci/Jenkinsfile.combined

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ pipeline {
2424
}
2525
stage('Build') {
2626
parallel {
27-
stage('MacOS') { steps { script {
27+
stage('MacOS') {
28+
when { expression { cmn.getBuildType() != 'release' } }
29+
steps { script {
2830
osx = cmn.buildBranch('status-react/combined/desktop-macos', cmn.getBuildType())
2931
} } }
30-
stage('Linux') { steps { script {
32+
stage('Linux') {
33+
when { expression { cmn.getBuildType() != 'release' } }
34+
steps { script {
3135
nix = cmn.buildBranch('status-react/combined/desktop-linux', cmn.getBuildType())
3236
} } }
3337
stage('iOS') { steps { script {
@@ -44,8 +48,11 @@ pipeline {
4448
stage('Archive') {
4549
steps { script {
4650
sh('rm -f pkg/*')
47-
cmn.copyArts('status-react/combined/desktop-macos', osx.number)
48-
cmn.copyArts('status-react/combined/desktop-linux', nix.number)
51+
52+
if (cmn.getBuildType() != 'release') {
53+
cmn.copyArts('status-react/combined/desktop-macos', osx.number)
54+
cmn.copyArts('status-react/combined/desktop-linux', nix.number)
55+
}
4956
cmn.copyArts('status-react/combined/mobile-android', dro.number)
5057
cmn.copyArts('status-react/combined/mobile-android', e2e.number)
5158
archiveArtifacts('pkg/*')
@@ -55,28 +62,40 @@ pipeline {
5562
steps { script {
5663
e2eUrl = cmn.uploadArtifact(findFiles(glob: 'pkg/*e2e.apk')[0].path)
5764
apkUrl = cmn.uploadArtifact(findFiles(glob: "pkg/*${cmn.getBuildType()}.apk")[0].path)
58-
dmgUrl = cmn.uploadArtifact(findFiles(glob: 'pkg/*.dmg')[0].path)
59-
appUrl = cmn.uploadArtifact(findFiles(glob: 'pkg/*.AppImage')[0].path)
65+
66+
if (cmn.getBuildType() != 'release') {
67+
dmgUrl = cmn.uploadArtifact(findFiles(glob: 'pkg/*.dmg')[0].path)
68+
appUrl = cmn.uploadArtifact(findFiles(glob: 'pkg/*.AppImage')[0].path)
69+
} else {
70+
dmgUrl = null
71+
appUrl = null
72+
}
6073
/* special case for iOS Diawi links */
6174
ipaUrl = ios.getBuildVariables().get('DIAWI_URL')
6275
} }
6376
}
6477
stage('Notify') {
6578
steps { script {
79+
def dmgLink = "<${dmgUrl}|MacOS>"
80+
def appLink = "<${appUrl}|AppImage>"
6681
def message = (
6782
(env.CHANGE_ID != null ?
6883
"Build PR #${BRANCH_NAME}(${CHANGE_BRANCH}) success! " :
6984
"Build ${cmn.getBuildType()} success! "
7085
)+
7186
"<${currentBuild.absoluteUrl}|${currentBuild.displayName}> "+
7287
"(${currentBuild.durationString})\n"+
73-
"Packages: "+
74-
"<${apkUrl}|Android>, "+
75-
"(<${e2eUrl}|e2e>), "+
76-
"<${ipaUrl}|iOS>, "+
77-
"<${dmgUrl}|MacOS>, "+
78-
"<${appUrl}|AppImage>"
88+
"Packages: <${apkUrl}|Android>, (<${e2eUrl}|e2e>), <${ipaUrl}|iOS>"
7989
)
90+
91+
if (dmgUrl != null) {
92+
message = message + ", <${dmgUrl}|MacOS>"
93+
}
94+
95+
if (appUrl != null) {
96+
message = message + ", <${appUrl}|AppImage>"
97+
}
98+
8099
slackSend(
81100
message: message,
82101
color: 'good'

ci/common.groovy

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,14 @@ def githubNotify(apkUrl, e2eUrl, ipaUrl, dmgUrl, appUrl, changeId) {
134134
"Jenkins job: [${currentBuild.displayName}](${currentBuild.absoluteUrl})\\n"+
135135
"##### Mobile\\n" +
136136
"* [Android](${apkUrl}), ([e2e](${e2eUrl}))\\n" +
137-
"* [iOS](${ipaUrl})\\n" +
138-
"##### Desktop\\n" +
139-
"* [MacOS](${dmgUrl})\\n" +
140-
"* [AppImage](${appUrl})"
141-
)
137+
"* [iOS](${ipaUrl})\\n")
138+
139+
if (dmgUrl != null && appUrl != null) {
140+
message = message +
141+
"##### Desktop\\n" +
142+
"* [MacOS](${dmgUrl})\\n" +
143+
"* [AppImage](${appUrl})"
144+
}
142145
def script = (
143146
"curl "+
144147
"-u status-im:${githubToken} " +

0 commit comments

Comments
 (0)