diff init20.gradle @ 254:4e57e2edb2ad

calculate docker engine url
author smith@nwoca.org
date Thu, 17 May 2018 20:56:47 +0100
parents 01c6387bc240
children 37e1c910c8f5
line wrap: on
line diff
--- a/init20.gradle	Thu Feb 01 21:17:20 2018 +0000
+++ b/init20.gradle	Thu May 17 20:56:47 2018 +0100
@@ -74,6 +74,14 @@
 
 gradle.ext.runtimeInfo = new RuntimeInfo()
 
+
+if (System.env.DOCKER_HOST ) {       
+    if (System.env.DOCKER_HOST.contains('tcp:')) {
+        gradle.ext.dockerEngineUrl = "https:${System.env.DOCKER_HOST?.minus('tcp:')}"
+    }
+    gradle.ext.dockerEngineUrl = System.env.DOCKER_HOST
+}
+
 setBranchInfo()
 
 loadEnvironments()
@@ -682,6 +690,7 @@
     println "${gradle.hgRepositoryUrl} ${gradle.branch} ${gradle.branch.version}"
 }
 
+
 @ToString(includes=['name','shortName','buildVersion','imageId','deployName'],includeNames= true)
 class BranchInfo {
     def name