Can we have Jenkins server to be listened at example.com/jenkins?
If I can achieve this, I can do path based routing in ALB & do some cost savings.
Let me know if we can achieve this.
Can we have Jenkins server to be listened at example.com/jenkins?
If I can achieve this, I can do path based routing in ALB & do some cost savings.
Let me know if we can achieve this.
E.g.:
--prefix=/jenkins
See: https://www.jenkins.io/doc/book/installing/initial-settings/
When you configure ALB to mask the port 8080, you also have to set the Jenkins URL correctly to point to example.com/jenkins in the global settings.
Back then I've done this with Groovy on startup:
import jenkins.model.*
JenkinsLocationConfiguration location = jenkins.getExtensionList(jenkins.model.JenkinsLocationConfiguration).get(0)
try {
location.setUrl("http://example.com/jenkins")
} catch (MissingMethodException e) {
logger.severe("+++++++++++++++++++++ Error setting Jenkins URL! +++++++++++++++++++++++++")
jenkins.doSafeExit(null)
System.exit(1)
}
See: https://www.jenkins.io/doc/book/managing/groovy-hook-scripts/
But meanwhile there may be better solutions like Config as Code Plugin.