Last active
February 13, 2018 19:47
-
-
Save t3knoid/421de8a103f8bc7cba2fd700c2070682 to your computer and use it in GitHub Desktop.
Jenkins get the Jenkins URL from the configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The following snippet shows how to get the Jenkins Application URL | |
// from the Jenkins configuration settings. | |
// The following must be approved in the Jenkins In-process Script Approval | |
// | |
// staticMethod jenkins.model.JenkinsLocationConfiguration get | |
// method jenkins.model.JenkinsLocationConfiguration getUrl | |
jlc=JenkinsLocationConfiguration.get() | |
echo jlc.getUrl() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment