Skip to content

Instantly share code, notes, and snippets.

@t3knoid
Last active February 13, 2018 19:47
Show Gist options
  • Save t3knoid/421de8a103f8bc7cba2fd700c2070682 to your computer and use it in GitHub Desktop.
Save t3knoid/421de8a103f8bc7cba2fd700c2070682 to your computer and use it in GitHub Desktop.
Jenkins get the Jenkins URL from the configuration
// 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