From 470ab98562ebd7a84b54306fd955154c79a6f315 Mon Sep 17 00:00:00 2001 From: hyokeun Date: Tue, 6 Jun 2017 09:36:15 +0900 Subject: [PATCH] Setup system jenkins url at first bootup Change-Id: I036228b3a74edf575c2c22a1aff247c60dde24bf --- groovy_init_scripts/Module_LocationConfig | 1 + groovy_init_scripts/init.groovy | 2 +- groovy_init_scripts/setup.properties.example | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/groovy_init_scripts/Module_LocationConfig b/groovy_init_scripts/Module_LocationConfig index 546111b..b689e3b 100755 --- a/groovy_init_scripts/Module_LocationConfig +++ b/groovy_init_scripts/Module_LocationConfig @@ -3,6 +3,7 @@ def set_location_configuration = { instance, admin_email_addr='', location_url='' -> def jenkinsLocationConfiguration = jenkins.model.JenkinsLocationConfiguration.get() jenkinsLocationConfiguration.setAdminAddress(admin_email_addr) + jenkinsLocationConfiguration.setUrl(location_url) jenkinsLocationConfiguration.save() } diff --git a/groovy_init_scripts/init.groovy b/groovy_init_scripts/init.groovy index 8379af3..cb505c3 100755 --- a/groovy_init_scripts/init.groovy +++ b/groovy_init_scripts/init.groovy @@ -58,7 +58,7 @@ if (properties.ADMIN_EMAIL != null && properties.ADMIN_EMAIL != '') { set_location_configuration( instance = j, admin_email_addr = properties.ADMIN_EMAIL, - location_url = '' + location_url = properties.JENKINS_LOCATION_URL ) instance.save() } diff --git a/groovy_init_scripts/setup.properties.example b/groovy_init_scripts/setup.properties.example index 5ece325..b782e68 100755 --- a/groovy_init_scripts/setup.properties.example +++ b/groovy_init_scripts/setup.properties.example @@ -7,6 +7,7 @@ REPLYTO_ADDR= # Admin email address ADMIN_EMAIL= +JENKINS_LOCATION_URL= # Ldap configuration LDAP_ADDR= -- 2.7.4