Skip to content

Instantly share code, notes, and snippets.

@metametadata
Created February 6, 2018 03:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save metametadata/b0c84e158bf7293f0f7fa6379f878cb7 to your computer and use it in GitHub Desktop.
Save metametadata/b0c84e158bf7293f0f7fa6379f878cb7 to your computer and use it in GitHub Desktop.
Read port from "Jenkins URL" field that is set in http://<jenkins>/configure.def
def jenkinsPort = new URI(jenkins.model.JenkinsLocationConfiguration.get().getUrl()).port
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment