comparison init70-github.gradle @ 337:70a96f123a03

testing
author marc_davis <davis@ssdt-ohio.org>
date Tue, 30 May 2023 13:02:19 -0400
parents 6258c89efe9e
children 0befe249fc6f
comparison
equal deleted inserted replaced
336:6258c89efe9e 337:70a96f123a03
33 hostname = "hostname".execute().text.toLowerCase().readLines().first() 33 hostname = "hostname".execute().text.toLowerCase().readLines().first()
34 } catch (e) { 34 } catch (e) {
35 hostname = 'unknown' 35 hostname = 'unknown'
36 } 36 }
37 37
38 gradle.ext.bambooBuild = true 38 gradle.ext.bambooBuild = System.getenv().any {
39 39 it.key.toLowerCase().contains('CI')
40 //gradle.ext.bambooBuild = System.getenv().any { 40 }
41 // it.key.toLowerCase().contains('bamboo') 41
42 //} || hostname?.startsWith('ssdt-ba') 42 gradle.ext.bambooLocalBuild = false
43
44 //if (!rootProject.hasProperty("bambooLocalBuild")) {
45 // gradle.ext.bambooLocalBuild = false
46 //} else {
47 // gradle.ext.bambooLocalBuild = rootProject.bambooLocalBuild.toBoolean()
48 //}
49 //
50 //if (gradle.bambooLocalBuild) {
51 // println "Bamboo local build active"
52 //}
53 43
54 gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-') 44 gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-')
55 logger.info "Bamboo plan: ${gradle.bambooPlan}" 45 logger.info "Bamboo plan: ${gradle.bambooPlan}"
56 46
57 gradle.ext.buildTimestamp = System.currentTimeMillis().toString().padLeft(14, '0') 47 gradle.ext.buildTimestamp = System.currentTimeMillis().toString().padLeft(14, '0')
136 indy && rootProject.indyCapable() 126 indy && rootProject.indyCapable()
137 } 127 }
138 128
139 println "Indy available: ${rootProject.indyCapable()} enabled: ${rootProject.useIndy()}" 129 println "Indy available: ${rootProject.indyCapable()} enabled: ${rootProject.useIndy()}"
140 130
141 file('build-number.txt').text = "build.number=${gradle.branch.buildNumber ?: -1 }\n" 131 if (gradle.bambooBuild) {
142 logger.info "applying SSDT artifactory Gradle Settings (bamboo: $gradle.bambooBuild host: $hostname)" 132
143 apply from: resources.text.fromInsecureUri("${gradle.ssdtDevelkitLocation}/artifactory70.gradle") 133 file('build-number.txt').text = "build.number=${gradle.branch.buildNumber ?: -1 }\n"
134 logger.info "applying SSDT artifactory Gradle Settings (bamboo: $gradle.bambooBuild host: $hostname)"
135 apply from: resources.text.fromInsecureUri("${gradle.ssdtDevelkitLocation}/artifactory70.gradle")
136 }
144 137
145 if (!rootProject.hasProperty('disableMetrics')) { 138 if (!rootProject.hasProperty('disableMetrics')) {
146 apply from: resources.text.fromInsecureUri("${gradle.ssdtDevelkitLocation}/metrics70.gradle") 139 apply from: resources.text.fromInsecureUri("${gradle.ssdtDevelkitLocation}/metrics70.gradle")
147 } 140 }
148 141