comparison init40-github.gradle @ 361:7b6d30651db7

Cygwin has an ENV that container 'CI'. Causing build issues. Just check for 'github' to determine if it is a local build
author davis@ssdt-ohio.org
date Thu, 16 Nov 2023 15:52:40 -0500
parents 45fc06cbb6b2
children de8c350c511a
comparison
equal deleted inserted replaced
360:8238fff451c9 361:7b6d30651db7
34 hostname = "hostname".execute().text.toLowerCase().readLines().first() 34 hostname = "hostname".execute().text.toLowerCase().readLines().first()
35 } catch (e) { 35 } catch (e) {
36 hostname = 'unknown' 36 hostname = 'unknown'
37 } 37 }
38 38
39 gradle.ext.bambooBuild = System.getenv().any { 39 gradle.ext.bambooBuild = System.getenv().any { it.key.toLowerCase().contains('github') }
40 it.key.toLowerCase().contains('ci') ||
41 it.key.toLowerCase().contains('github')
42 }
43 40
44 gradle.ext.bambooLocalBuild = false 41 gradle.ext.bambooLocalBuild = false
45 42
46 gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-') 43 gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-')
47 logger.info "Bamboo plan: ${gradle.bambooPlan}" 44 logger.info "Bamboo plan: ${gradle.bambooPlan}"