Status: Open (View Workflow)
Environment:Jenkins, Blue Ocean, and Pipeline:
- 1.3.0-beta-3-SNAPSHOT (private-d6b77636-kshultz)
- Core 2.78
- Declarative 1.2-beta5
- Experimental update center active
- Plain Git 2.7.4 over SSH
- Fedora Workstation 26, on a Dell XPS13 with a 4K display. It's a 13" screen at 3200x1800 resolution
- Google Chrome 61Jenkins, Blue Ocean, and Pipeline: - 1.3.0-beta-3-SNAPSHOT (private-d6b77636-kshultz) - Core 2.78 - Declarative 1.2-beta5 - Experimental update center active SCM: - Plain Git 2.7.4 over SSH Client: - Fedora Workstation 26, on a Dell XPS13 with a 4K display. It's a 13" screen at 3200x1800 resolution - Google Chrome 61
Sprint:Blue Ocean - Candidates
Given a Jenkinsfile with a parameters block in it, it's possible to have parameters with default settings defined. When a run is started, the user will be shown the parameters, and given the chance to change them. In the Classic UI, the default value is always set to whatever is in the Jenkinsfile. But in Blue Ocean, the default value is set to whatever the user attempted previously.
100% of the time.
Steps to recreate:
1. Create a Jenkinsfile in a remote repository, with a parameters section defined. In this, use a string parameter to define the agent label on which you want the Pipeline to run. In my case, this is linux, and I have a remote agent connected with that label assigned:
2. Because of JENKINS-41929, you will need to have run, and then canceled, this Pipeline at least once. Otherwise it'll try to run on an agent of label null, and we know that won't work.
6. After stopping the ill-fated run you kicked off in step 5, click the Run triangle again. This is the issue: notice that the AGENT_NAME label is set to what you previously changed it to. It should say linux, which is what's in the Jenkinsfile:
7. This behavior feels incorrect for a couple of reasons. Mostly, because it's not really honoring the default setting you've provided in the Jenkinsfile. Secondarily, the Classic UI always defaults to whatever the Jenkinsfile says. Same exact steps, done entirely through Classic, produce this screen every time:
8. While writing this up, I decided to try different kinds of parameters. And they are all affected by this same issue: they default to whatever the user last did in Blue Ocean, as opposed to defaulting to the values listed in the Jenkinsfile. Example: