Skip to content

Commit

Permalink
Merge pull request MovingBlocks#635 from Nanoware/develop
Browse files Browse the repository at this point in the history
Improve associated Android Git selection and add credential
  • Loading branch information
BenjaminAmos authored Nov 3, 2021
2 parents ca0dc74 + 086c207 commit b1afc79
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@ node ("android") {
if (env.PUBLISH_ORG) {
androidGitPath = androidGitPath.replace("MovingBlocks", env.PUBLISH_ORG)
println "Updated target Android Git path to: " + androidGitPath
println "And going to use branch " + env.BRANCH_NAME
} else {
println "Not varying the Android path from default " + androidGitPath
}
checkout scm: [$class: 'GitSCM', branches: [[name: env.BRANCH_NAME]], extensions: [], userRemoteConfigs: [[url: androidGitPath]]]
// Figure out a suitable target brand in the Android repo
def androidBranch = "develop"
if (env.BRANCH_NAME.equalsIgnoreCase("master") || env.BRANCH_NAME.startsWith("android/")) {
println "Going to use target unusual Android branch " + env.BRANCH_NAME
androidBranch = env.BRANCH_NAME
} else {
println "Going to use target Android branch 'develop' - not building 'master' nor anything starting with 'android/'"
}
checkout scm: [$class: 'GitSCM', branches: [[name: androidBranch]], extensions: [], userRemoteConfigs: [[credentialsId: 'GooeyHub', url: androidGitPath]]]
}
sh './gradlew --console=plain :android:assembleDebug'
archiveArtifacts 'android/build/outputs/apk/debug/android-debug.apk'
Expand Down

0 comments on commit b1afc79

Please sign in to comment.