Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Last active November 9, 2018 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frogermcs/c6c57356cee008df42495bafe213bf88 to your computer and use it in GitHub Desktop.
Save frogermcs/c6c57356cee008df42495bafe213bf88 to your computer and use it in GitHub Desktop.
pipeline {
agent {
node { label 'mobile' }
}
environment {
PATH = "/usr/bin:" +
"/usr/local/bin:" +
"$PATH"
ANDROID_HOME = "/Users/azimoci/dev/android/"
}
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '10'))
}
triggers {
gitlab(triggerOnPush: true, branchFilterType: 'All')
}
stages {
stage("Build debug") {
when {
allOf {
not {
anyOf {
branch 'master'
branch 'release/head*'
branch 'release/automation-head*'
}
}
}
}
steps {
sh './gradlew clean assembleDebug --stacktrace'
}
}
stage("Test with coverage for debug") {...} // ./gradlew testDebugUnitTest
stage("Lint 'debug'") {...} // ./gradlew :app:lintDebug
stage('Distribute internally') {...} // ./gradlew crashlyticsUploadDistributionStaging
stage('Housecleaning') {...}
stage('Results') {
steps {
junit '**/test-results/**/*.xml'
androidLint canComputeNew: false, defaultEncoding: '', healthy: '', pattern: 'app/lint-report.xml', unHealthy: ''
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment