fix names of stages to fit what they do better

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2018-12-06 11:52:44 +01:00
parent 469556a04b
commit 0002218a6f
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
4 changed files with 15 additions and 12 deletions

View File

@ -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') {

View File

@ -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') {

View File

@ -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 {

View File

@ -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'