Added conditional to disable tests when CORDA_DOCS_ONLY_BUILD envvar is present (#2371)

This commit is contained in:
Clinton 2018-01-17 13:08:00 +00:00 committed by GitHub
parent 6e817f014d
commit a19b213d7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -329,3 +329,30 @@ artifactory {
task generateApi(type: net.corda.plugins.GenerateApi){
baseName = "api-corda"
}
// This exists to reduce CI build time when the envvar is set (can save up to 40 minutes)
if(System.getenv('CORDA_DOCS_ONLY_BUILD') != null) {
logger.info("Tests are disabled due to presence of envvar CORDA_DOCS_ONLY_BUILD")
allprojects {
test {
exclude '*/**'
}
it.afterEvaluate {
if(it.tasks.findByName("integrationTest") != null) {
integrationTest {
exclude '*/**'
}
}
}
it.afterEvaluate {
if(it.tasks.findByName("smokeTest") != null) {
smokeTest {
exclude '*/**'
}
}
}
}
}