diff --git a/Jenkinsfile b/Jenkinsfile index c47e89f..de977cf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -69,10 +69,9 @@ // Define lazyStages lazyStage { name = 'validate' + onlyif = (! deployBranches.contains(lazyConfig['branch']) ) tasks = [ run: { - def currentVersion = androidVersion() - currentBuild.displayName = "#${env.BUILD_NUMBER} ${currentVersion.string}-${currentVersion.number}" fastLane('android', 'test') }, on: 'android', @@ -83,6 +82,8 @@ name = 'package' tasks = [ run: { + def currentVersion = androidVersion() + currentBuild.displayName = "#${env.BUILD_NUMBER} ${currentVersion.string}-${currentVersion.number}" fastLane('android', 'build') }, post: { @@ -105,8 +106,7 @@ run: { def currentVersion = androidVersion() gitAuth('bot-ci-dgm', { - // Fork a release branch as requested - echo("Git logs since last tag:\n" + gitLog()) + // Define next version based on optional input def nextVersion = [ string: currentVersion.string, number: currentVersion.number + 1 ] if (env.lazyInput) { nextVersion = [ string: env.lazyInput, number: nextVersion.number ] @@ -143,12 +143,11 @@ tasks = [ pre: { unarchive(mapping:["${buildDir}/" : '.']) - sh("ls -lA ${buildDir}") }, run: { - def currentVersion = androidVersion() - echo("currentVersion = ${currentVersion.toString()}") - if ( !lazyConfig.env.DRYRUN ) fastLane('android', 'alpha') + if ( !lazyConfig.env.DRYRUN ) { + fastLane('android', 'alpha') + } }, on: 'android', ] @@ -157,14 +156,15 @@ lazyStage { name = 'beta' onlyif = ( deployBranches.contains(lazyConfig['branch']) ) - input = 'Deploy to beta users?' + input = 'Promote to beta users?' tasks = [ pre: { unarchive(mapping:["${buildDir}/" : '.']) - sh("ls -lA ${buildDir}") }, run: { - if ( !lazyConfig.env.DRYRUN ) fastLane('android', 'beta') + if ( !lazyConfig.env.DRYRUN ) { + fastLane('android', 'beta') + } }, on: 'android', ] @@ -173,14 +173,15 @@ lazyStage { name = 'production' onlyif = ( deployBranches.contains(lazyConfig['branch']) ) - input = 'Promote beta to production?' + input = 'Promote to production users?' tasks = [ pre: { unarchive(mapping:["${buildDir}/" : '.']) - sh("ls -lA ${buildDir}") }, run: { - if ( !lazyConfig.env.DRYRUN ) fastLane('android', 'production') + if ( !lazyConfig.env.DRYRUN ) { + fastLane('android', 'production') + } }, on: 'android', ]