Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72105

Scriptler Script's parameter not created with Job DSL

      After 2.6.0 of active-choices-plugin`, the plugin use scriptlerBuilder, and so I added `DataBoundConstructor` on ScriptlerBuilder (https://github.com/jenkinsci/scriptler-plugin/pull/80).

      But when I run this job dsl script,

      scriptlerScript {
          scriptlerBuilder {
              builderId('org.jenkinsci.plugins.scriptler.builder.ScriptlerBuilder')
              scriptId('TestImageTags.groovy')
              propagateParams(true)
              parameters {
                  parameter {
                      name 'PROJECT_NAME'
                      value '$PROJECT_NAME'
                  }
                  parameter {
                      name 'CLOUD_HOST_TYPE'
                      value '$CLOUD_HOST_TYPE'
                  }
                  parameter {
                      name 'PROFILE'
                      value '$TEST_PROFILE'
                  }
              }
          }
          isSandboxed(false)
      }
      

      there is no parameters in new jobs.


       

          [JENKINS-72105] Scriptler Script's parameter not created with Job DSL

          Code is super easy to review, but I was not able to reproduce it. The example here are useful, but they seem to be missing some information so others can reproduce.

          Please add a minimal reproducible example so that anyone can either import it (e.g. config.xml), or follow the instructions (e.g. "Install plug-in A, configure this field like this, invoke this job, you should see this, etc.").

          Bruno P. Kinoshita added a comment - Code is super easy to review, but I was not able to reproduce it. The example here are useful, but they seem to be missing some information so others can reproduce. Please add a minimal reproducible example so that anyone can either import it (e.g. config.xml), or follow the instructions (e.g. "Install plug-in A, configure this field like this, invoke this job, you should see this, etc.").

          Junyeong Yim (임준영) added a comment - - edited

          kinow 

          I can't list all because i use a lot of plugins, but I think this is the core plugins for reproduce this issue.

          and This is the reproduction steps.

           

          1. Go to scriptler script manage page (https://<jenkins-url>/manage/scriptler/) and add the Cascade.groovy like this.

          2. Add new freestyle project item, which name `job` (or anything)

          3. `Build Steps` -> choose `Process Job DSLs` -> choose `Use the provided DSL script`, and paste the scriptler_test.groovy.

          4. Run the `job` job, and then the `Scriptler Test` job will be created.

          5. Go to `Scriptler Test` job's configure, and you can see this.

          6. Install fixed version plugin. (I build on my local with `mvn install` command, and install `target/uno-choice.hpi`)

          7. Re-run the `job` job, and go to `Scriptler Test`'s configure.

          Junyeong Yim (임준영) added a comment - - edited kinow   I can't list all because i use a lot of plugins, but I think this is the core plugins for reproduce this issue. Active Choices Plug-in 2.8.0 Scriptler 334.v29792d5a_c058 Job DSL 1.87 and This is the reproduction steps.   Go to scriptler script manage page (https://<jenkins-url>/manage/scriptler/) and add the Cascade.groovy like this. 2. Add new freestyle project item, which name `job` (or anything) 3. `Build Steps` -> choose `Process Job DSLs` -> choose `Use the provided DSL script`, and paste the scriptler_test.groovy . 4. Run the `job` job, and then the `Scriptler Test` job will be created. 5. Go to `Scriptler Test` job's configure, and you can see this. 6. Install fixed version plugin. (I build on my local with `mvn install` command, and install `target/uno-choice.hpi`) 7. Re-run the `job` job, and go to `Scriptler Test`'s configure.

          Thanks for the steps to reproduce it.

          Unit test written, fixed build hiccups, released with 2.8.1

          Bruno P. Kinoshita added a comment - Thanks for the steps to reproduce it. Unit test written, fixed build hiccups, released with 2.8.1

            juny Junyeong Yim (임준영)
            juny Junyeong Yim (임준영)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: