|
When Jenkins is freshly installed, the value printed by the groovy post-build script containing:
is null (empty).
When going to the Jenkins -> Manage Jenkins -> Configure System page, the Jenkins Url parameter is set to http://localhost:8080/
Clearly, inside of Jenkins the value is null, but the UI says it is not null (the localhost:8080 is not a null value).
Steps to reproduce:
1. Download Jenkins and do a fresh install, and launch
2. Download the Groovy Postbuild plugin
3. Create a freestyle job, add a groovy postbuild step, and paste the one line manager.listener.logger.println(manager.hudson.rootUrl) in the box
4. Run the job, look at the Console, it will say "null" (instead of the Url)
5. Go to the main Jenkins Configuration page http://localhost:8080/configure, scroll to the bottom and save the page
6. Re-run the job, look at the console. The value of manager.hudson.rootUrl is now set.
This is a bug because the internal value is null when the UI says it is not. This is an initial condition problem.
|