From 0002218a6f96824c847cac2981ee9f3f279e3eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 6 Dec 2018 11:52:44 +0100 Subject: [PATCH] fix names of stages to fit what they do better MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ci/Jenkinsfile.android | 4 ++-- ci/Jenkinsfile.ios | 4 ++-- ci/android.groovy | 10 +++++----- ci/ios.groovy | 9 ++++++--- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/ci/Jenkinsfile.android b/ci/Jenkinsfile.android index 9d867e5442..8a2b98a2a2 100644 --- a/ci/Jenkinsfile.android +++ b/ci/Jenkinsfile.android @@ -66,9 +66,9 @@ pipeline { script { mobile.leinBuild('android') } } } - stage('Compile') { + stage('Bundle') { steps { - script { apk = mobile.android.compile(cmn.getBuildType()) } + script { apk = mobile.android.bundle(cmn.getBuildType()) } } } stage('Archive') { diff --git a/ci/Jenkinsfile.ios b/ci/Jenkinsfile.ios index 4ee70c950c..fa153c08d8 100644 --- a/ci/Jenkinsfile.ios +++ b/ci/Jenkinsfile.ios @@ -63,9 +63,9 @@ pipeline { script { mobile.leinBuild('ios') } } } } - stage('Compile') { + stage('Bundle') { steps { nvm(env.NODE_VERSION) { - script { api = mobile.ios.compile(cmn.getBuildType()) } + script { api = mobile.ios.bundle(cmn.getBuildType()) } } } } stage('Archive') { diff --git a/ci/android.groovy b/ci/android.groovy index 083ff56e63..5283394a99 100644 --- a/ci/android.groovy +++ b/ci/android.groovy @@ -1,15 +1,15 @@ -common = load 'ci/common.groovy' +cmn = load 'ci/common.groovy' -def compile(type = 'nightly') { +def bundle(type = 'nightly') { /* Disable Gradle Daemon https://stackoverflow.com/questions/38710327/jenkins-builds-fail-using-the-gradle-daemon */ def gradleOpt = "-PbuildUrl='${currentBuild.absoluteUrl}' -Dorg.gradle.daemon=false " if (type == 'release') { - gradleOpt += "-PreleaseVersion='${common.version()}'" + gradleOpt += "-PreleaseVersion='${cmn.version()}'" } dir('android') { sh "./gradlew assembleRelease ${gradleOpt}" } - def pkg = common.pkgFilename(type, 'apk') + def pkg = cmn.pkgFilename(type, 'apk') sh "cp android/app/build/outputs/apk/release/app-release.apk ${pkg}" return pkg } @@ -24,7 +24,7 @@ def uploadToPlayStore(type = 'nightly') { } def uploadToSauceLabs() { - def changeId = common.getParentRunEnv('CHANGE_ID') + def changeId = cmn.getParentRunEnv('CHANGE_ID') if (changeId != null) { env.SAUCE_LABS_NAME = "${changeId}.apk" } else { diff --git a/ci/ios.groovy b/ci/ios.groovy index 8ccbaf1b83..2b69648220 100644 --- a/ci/ios.groovy +++ b/ci/ios.groovy @@ -4,7 +4,10 @@ def plutil(name, value) { sh "plutil -replace ${name} -string ${value} ios/StatusIm/Info.plist" } -def compile(type = 'nightly') { +def bundle(type) { + if (!type) { + type = cmn.getBuildType() + } def target switch (type) { case 'release': target = 'release'; break; @@ -13,8 +16,8 @@ def compile(type = 'nightly') { default: target = 'nightly'; } /* configure build metadata */ - plutil('CFBundleShortVersionString', common.version()) - plutil('CFBundleVersion', common.buildNumber()) + plutil('CFBundleShortVersionString', cmn.version()) + plutil('CFBundleVersion', cmn.buildNumber()) plutil('CFBundleBuildUrl', currentBuild.absoluteUrl) /* the dir might not exist */ sh 'mkdir -p status-e2e'