diff --git a/Jenkinsfile b/Jenkinsfile index e9bba0b..d3577c7 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -71,7 +71,7 @@ name = 'validate' onlyif = (! deployBranches.contains(lazyConfig['branch']) ) tasks = [ - run: { + pre: { def currentVersion = androidVersion() currentBuild.displayName = "#${env.BUILD_NUMBER} ${currentVersion.string}-${currentVersion.number}" // Try to see if we can still merge the deploy branches @@ -80,26 +80,30 @@ } // Go back to working branch for validation sh("git checkout ${lazyConfig['branch']}") - fastLane('android', 'test') + }, + run: { + fastLane('android', 'test') }, in: [ 'centos7' ], - on: 'android', + on: 'android', ] } lazyStage { name = 'package' tasks = [ - run: { + pre: { def currentVersion = androidVersion() currentBuild.displayName = "#${env.BUILD_NUMBER} ${currentVersion.string}-${currentVersion.number}" - fastLane('android', 'build') }, - post: { - archiveArtifacts(artifacts: "${buildDir}/**", allowEmptyArchive: false) + run: { + fastLane('android', 'build') }, in: [ 'centos7' ], on: 'android', + post: { + archiveArtifacts(artifacts: "${buildDir}/**", allowEmptyArchive: false) + }, ] }