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

postBuildScript matrix DSL configuration problem

XMLWordPrintable

      Unable to figure out the proper format or PostBuildScript matrix job.

      Tried this:

          matrixPostBuildScript {
              buildSteps {
                  postBuildStep {
                      buildSteps {
                          shell {
                              command('/path/to/script')
                          }
                      }
                  }
              }
          }
      }
      

      and this

          matrixPostBuildScript {
              config {
                  scriptFiles {
                      scriptFile {
                          filePath('/projects/bvg-scm/work/js901158/dev/apps/jenkins/sbin/archive_regression_html_matrix /projects/BCM1000/Z9/work/svcbvgscm/BCM1000-Z9-test_matrix-matrix-multisite/work/projects/BCM1000_WRK1/Z9/work/svcbvgscm/BCM1000-Z9-test_matrix-matrix-multisite irvine atlanta')
                      }
                  }
                  markBuildUnstable(false)
              }
          }
      

      both result in:

      15:38:52 ERROR: (test.dsl, line 110) No signature of method: javaposse.jobdsl.dsl.jobs.MatrixJob.matrixPostBuildScript() is applicable for argument types: (BCM1000_Z9_test_matrix_matrix_multisite$_run_closure1$_closure10) values: [BCM1000_Z9_test_matrix_matrix_multisite$_run_closure1$_closure10@42e11c53]
      

      Example config.xml looks like:

      <publishers>
      ...
      <org.jenkinsci.plugins.postbuildscript.MatrixPostBuildScript plugin="postbuildscript@3.2.0-460.va_fda_0fa_26720">
      <config>
      <scriptFiles>
      <org.jenkinsci.plugins.postbuildscript.model.ScriptFile>
      <results>
      <string>SUCCESS</string>
      <string>NOT_BUILT</string>
      <string>ABORTED</string>
      <string>FAILURE</string>
      <string>UNSTABLE</string>
      </results>
      <role>BOTH</role>
      <executeOn>MATRIX</executeOn>
      <filePath>/path/to/script</filePath>
      <scriptType>GENERIC</scriptType>
      <sandboxed>false</sandboxed>
      </org.jenkinsci.plugins.postbuildscript.model.ScriptFile>
      </scriptFiles>
      <groovyScripts/>
      <buildSteps/>
      <markBuildUnstable>false</markBuildUnstable>
      </config>
      </org.jenkinsci.plugins.postbuildscript.MatrixPostBuildScript>
      </publishers>
      

      and if it's configured using build steps the xml looks like this:

      <org.jenkinsci.plugins.postbuildscript.MatrixPostBuildScript plugin="postbuildscript@3.2.0-460.va_fda_0fa_26720">
      <config>
      <scriptFiles/>
      <groovyScripts/>
      <buildSteps>
      <org.jenkinsci.plugins.postbuildscript.model.PostBuildStep>
      <results>
      <string>SUCCESS</string>
      <string>NOT_BUILT</string>
      <string>ABORTED</string>
      <string>FAILURE</string>
      <string>UNSTABLE</string>
      </results>
      <role>BOTH</role>
      <executeOn>MATRIX</executeOn>
      <buildSteps>
      <hudson.tasks.Shell>
      <command>${BVGSCMDIR}/apps/jenkins/sbin/archive_regression_html_matrix /projects/BCM1000_WRK1/Z9/work/svcbvgscm/BCM1000-Z9-test_matrix-matrix-multisite irvine atlanta</command>
      <configuredLocalRules/>
      </hudson.tasks.Shell>
      </buildSteps>
      <stopOnFailure>false</stopOnFailure>
      </org.jenkinsci.plugins.postbuildscript.model.PostBuildStep>
      </buildSteps>
      <markBuildUnstable>false</markBuildUnstable>
      </config>
      </org.jenkinsci.plugins.postbuildscript.MatrixPostBuildScript>
      </publishers>

      The attached is from viewing: https://myjenkinshost/plugin/job-dsl/api-viewer/index.html#path/matrixJob-publishers-matrixPostBuildScript

            dheid Daniel Heid
            jimsearle Jim Searle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: