@@ -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'
0 commit comments