pipeline { agent { label 'master' } options { disableConcurrentBuilds() buildDiscarder(logRotator( numToKeepStr: '10', daysToKeepStr: '30', artifactNumToKeepStr: '10', )) } stages { stage('Tag') { steps { script { common = load('ci/common.groovy') /* to avoid missing build tag parallel builds */ print "Build Number: ${common.tagBuild()}" } } } stage('Build') { parallel { 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') } } } } } stage('Archive') { steps { script { sh('rm -f pkg/*') 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) archiveArtifacts('pkg/*') } } } stage('Upload') { when { expression { params.BUILD_TYPE == 'nightly' } } steps { script { 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") /* special case for iOS Diawi link */ ipaUrl = ios.getEnvironment().DIAWI_URL } } } stage('Notify') { steps { slackSend( message: ( "Build success! "+ "<${currentBuild.absoluteUrl}|${currentBuild.displayName}> "+ "(${currentBuild.durationString})\n"+ (params.BUILD_TYPE == 'nightly' ? "E2E: ${e2eUrl}\n"+ "APK: ${apkUrl}\n"+ "IPA: ${ipaUrl}\n"+ "DMG: ${dmgUrl}\n"+ "APP: ${appUrl}\n" : '') ), color: 'good' ) } } stage('Publish') { when { expression { params.BUILD_TYPE == 'nightly' } } 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'] ] ) } } } }