Skip to content

Instantly share code, notes, and snippets.

@mupcakes
mupcakes / baseURL.groovy
Created November 20, 2019 16:43 — forked from fishi0x01/baseURL.groovy
This is a collection of groovy scripts I gathered and use for bootstrapping Jenkins. Most of this can also be achieved with the CasC Plugin https://github.com/jenkinsci/configuration-as-code-plugin
#!groovy
/*
* This script configures the Jenkins base URL.
*/
import jenkins.model.JenkinsLocationConfiguration
JenkinsLocationConfiguration location = Jenkins.instance.getExtensionList('jenkins.model.JenkinsLocationConfiguration')[0]
location.url = 'https://jenkins-as-code-poc.devtail.io/'