From 99323e6fe495b0a847bf42bb04ab41ec81ea6289 Mon Sep 17 00:00:00 2001 From: Matthieu Baechler Date: Thu, 12 Oct 2017 17:14:29 +0200 Subject: [PATCH] Make host docker ip configurable by env variable --- README.adoc | 1 + env.file | 3 +++ workflow-job | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.adoc b/README.adoc index f195cc0..7f54562 100644 --- a/README.adoc +++ b/README.adoc @@ -51,6 +51,7 @@ You have to modify the env.file file with the following parameters: - __DOCKER_USER__: is the Docker Hub user used to publish the build, see publishing section (ex. myuser) + If not given, publishing to Docker Hub will not be enabled. - __DOCKER_PASSWORD__: is the password of the Docker Hub user + - __DOCKER_HOST__: Ip that the jenkins-docker can reach to connect to the host docker by tls Then, you can open it in your browser : diff --git a/env.file b/env.file index e597488..a6e0c15 100644 --- a/env.file +++ b/env.file @@ -11,3 +11,6 @@ GITHUB_TOKEN=token # Credentials used for publishing image on docker hub (not mandatory) #DOCKER_USER=user #DOCKER_PASSWORD=pass + +# Ip that the jenkins-docker can reach to connect to the host docker by tls +DOCKER_HOST=ip.of.the.host diff --git a/workflow-job b/workflow-job index 63edb95..bd0094e 100644 --- a/workflow-job +++ b/workflow-job @@ -10,7 +10,7 @@ import org.kohsuke.github.GHRepository // $repoURL parameter : specifies the commiter GitHub repo URL // $sha1 parameter : specifies the actual commit -def dockerIp = '62.210.100.33' +def dockerIp = System.getenv("DOCKER_HOST") def continuousDeploymentDockerIp = '62.210.101.42' def continuousDeploymentConfigurationPath = '/root/james/conf' def hostname = 'james.linagora.com'