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

Job DSL Seed job fails on ClassCastException

XMLWordPrintable

      Running this Job DSL

      job('a-test-build') {
        properties {
          promotions {
            promotion {
              name('Deploy a-test to Production')
              icon('star-gold')
              conditions {
                manual('bob')
              }
              actions {
                actions {
                    triggerBuilder {
                    configs {
                      blockableBuildTriggerConfig {
                        projects('a-test-deploy-prod')
                        block {
                          buildStepFailureThreshold('FAILURE')
                          failureThreshold('FAILURE')
                          unstableThreshold('UNSTABLE')
                        }
                        configs {
                          predefinedBuildParameters {
                            properties('X=Y')
                            textParamValueOnNewLine(false)
                          }
                        }
                      }
                    }
                    }
                }
              }
            }
          }
        }
      }

       

      Results in

      java.lang.ClassCastException: java.lang.String cannot be cast to groovy.util.Node

      Using

      actions {

        steps {

        ...

        }

      }

      Runs without errors, but is not the desired job result I need. Using a single "steps{}" also results in same ClassCastException.

       

      Any help is very much appreciated.

       

            jamietanna Jamie Tanna
            jkie Jeremy Kie
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: