@@ -14,69 +14,49 @@ pipeline {
1414 stage('Tag') {
1515 steps { script {
1616 common = load('ci/common.groovy')
17- /* to avoid race conditions in parallel builds */
17+ /* to avoid missing build tag parallel builds */
1818 print "Build Number: ${common.tagBuild()}"
1919 } }
2020 }
2121 stage('Build') {
2222 parallel {
23- stage('MacOS') {
24- steps { script {
25- osx = build('status-react/combined/desktop-macos')
26- } }
27- }
28- stage('Linux') {
29- steps { script {
30- nix = build('status-react/combined/desktop-linux')
31- } }
32- }
33- stage('iOS') {
34- steps { script {
35- ios = build('status-react/combined/mobile-ios')
36- } }
37- }
38- stage('Android') {
39- steps { script {
40- dro = build('status-react/combined/mobile-android')
41- } }
42- }
43- stage('Android e2e') {
44- steps {
45- build('status-react/combined/mobile-android-e2e')
46- }
47- }
23+ stage('MacOS') { steps { script {
24+ osx = common.buildBranch('status-react/combined/desktop-macos')
25+ } } }
26+ stage('Linux') { steps { script {
27+ nix = common.buildBranch('status-react/combined/desktop-linux')
28+ } } }
29+ stage('iOS') { steps { script {
30+ ios = common.buildBranch('status-react/combined/mobile-ios')
31+ } } }
32+ stage('Android') { steps { script {
33+ dro = common.buildBranch('status-react/combined/mobile-android')
34+ } } }
35+ stage('Android e2e') { steps { script {
36+ e2e = common.buildBranch('status-react/combined/mobile-android', 'e2e')
37+ } } }
4838 }
4939 }
5040 stage('Archive') {
51- steps {
41+ steps { script {
5242 sh('rm -f pkg/*')
53- copyArtifacts(
54- projectName: 'status-react/combined/mobile-ios', target: 'pkg',
55- flatten: true, selector: specific("${ios.number}")
56- )
57- copyArtifacts(
58- projectName: 'status-react/combined/mobile-android', target: 'pkg',
59- flatten: true, selector: specific("${dro.number}")
60- )
61- copyArtifacts(
62- projectName: 'status-react/combined/desktop-macos', target: 'pkg',
63- flatten: true, selector: specific("${osx.number}")
64- )
65- copyArtifacts(
66- projectName: 'status-react/combined/desktop-linux', target: 'pkg',
67- flatten: true, selector: specific("${nix.number}")
68- )
43+ common.copyArts('status-react/combined/desktop-macos', osx.number)
44+ common.copyArts('status-react/combined/desktop-linux', nix.number)
45+ common.copyArts('status-react/combined/mobile-android', dro.number)
46+ common.copyArts('status-react/combined/mobile-android', e2e.number)
6947 archiveArtifacts('pkg/*')
70- }
48+ } }
7149 }
7250 stage('Upload') {
73- when { expression { params.PUBLISH } }
51+ when { expression { params.BUILD_TYPE == 'nightly' } }
7452 steps { script {
75- def pkg = "StatusIm-${GIT_COMMIT.take(6)}"
76- apkUrl = common.uploadArtifact('pkg', "${pkg}.apk")
77- ipaUrl = common.uploadArtifact('pkg', "${pkg}.ipa")
78- dmgUrl = common.uploadArtifact('pkg', "${pkg}.dmg")
79- appUrl = common.uploadArtifact('pkg', "${pkg}.AppImage")
53+ def pkg = "pkg/StatusIm-${GIT_COMMIT.take(6)}"
54+ e2eUrl = common.uploadArtifact("${pkg}-e2e.apk")
55+ apkUrl = common.uploadArtifact("${pkg}.apk")
56+ dmgUrl = common.uploadArtifact("${pkg}.dmg")
57+ appUrl = common.uploadArtifact("${pkg}.AppImage")
58+ /* special case for iOS Diawi link */
59+ ipaUrl = ios.getEnvironment().DIAWI_URL
8060 } }
8161 }
8262 stage('Notify') {
@@ -86,7 +66,8 @@ pipeline {
8666 "Build success! "+
8767 "<${currentBuild.absoluteUrl}|${currentBuild.displayName}> "+
8868 "(${currentBuild.durationString})\n"+
89- (params.PUBLISH ?
69+ (params.BUILD_TYPE == 'nightly' ?
70+ "E2E: ${e2eUrl}\n"+
9071 "APK: ${apkUrl}\n"+
9172 "IPA: ${ipaUrl}\n"+
9273 "DMG: ${dmgUrl}\n"+
@@ -98,7 +79,7 @@ pipeline {
9879 }
9980 }
10081 stage('Publish') {
101- when { expression { params.PUBLISH } }
82+ when { expression { params.BUILD_TYPE == 'nightly' } }
10283 steps {
10384 build(
10485 job: 'misc/status-im.github.io-update_env',
0 commit comments