changeset 348:aa5e8be335d6

add println to see env props
author Marc Davis <marc.davis@mcoecn.org>
date Tue, 25 Jul 2023 15:58:59 -0400
parents 1d55012b6af3
children 45fc06cbb6b2
files init70-github.gradle
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/init70-github.gradle	Tue Jul 25 15:20:58 2023 -0400
+++ b/init70-github.gradle	Tue Jul 25 15:58:59 2023 -0400
@@ -35,9 +35,13 @@
     hostname = 'unknown'
 }
 
+println "System Env"
+System.getenv().each {
+    "    -> " + it.toString()
+}
+
 //Determine if the build is a CI build.
 gradle.ext.bambooBuild = System.getenv().any {
-    println it.toString()
     it.key.toLowerCase().contains('ci') ||
             it.key.toLowerCase().contains('github')
 }
@@ -703,7 +707,7 @@
 }
 
 void setBranchInfo() {
-    gradle.ext.branch = new BranchInfo(System.getenv('head_ref'))
+    gradle.ext.branch = new BranchInfo(System.getenv('ssdt_head_ref'))
     gradle.ext.branchName = gradle.branch.name
     gradle.ext.branchStream = gradle.branch.stream
     gradle.ext.branchHash = gradle.branch.hash
@@ -729,8 +733,8 @@
         }
         this.name = this.name.replace('@', '-')
         determineStream()
-        buildNumber = System.getenv('run_number') ?: ""
-        changeset = System.getenv('sha') ?: ""
+        buildNumber = System.getenv('ssdt_run_number') ?: ""
+        changeset = System.getenv('ssdt_sha') ?: ""
     }
 
     String getDefaultDependencyStatus() {
@@ -783,7 +787,7 @@
     private Version findSnapshotVersion() {
         println "findSnapshotVersion()"
         try {
-            def repositoryUrl = System.getenv('repositoryUrl')
+            def repositoryUrl = System.getenv('ssdt_repositoryUrl')
             if (repositoryUrl) {
                 println "git pull $repositoryUrl".execute().text
             }