postBuildScript plugin triggeredBuild seems to require block when generating DSL job.

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major
    • Component/s: postbuildscript-plugin
    • None
    • Environment:
      3.2.0-460.va_fda_0fa_26720

      When trying to generate a job using DSL using postBuildScript, triggeredBuild. The block is not optional and must be specified. When the job is generated, I can manually disable it but there is no way to make it disable by default.

      job("Tests/Alfred/CommonJobTemplate") {
          disabled(false)
          description('Common Job Template PostBuildScripts')
        publishers {
          osSuccess = true
          shouldBlock = true
          postBuildScript {
              markBuildUnstable(false)
              buildSteps {
                 postBuildStep {
                   osSuccess ? results(['SUCCESS']) : results(['FAILURE'])
                   buildSteps {
                     triggerBuilder {
                       configs {
                         blockableBuildTriggerConfig {
                           projects('Tests/Alfred/get_token')
                           /*
                           block {
                             if (shouldBlock)

      Unknown macro: {                         buildStepFailureThreshold('FAILURE')                         failureThreshold('FAILURE')                         unstableThreshold('UNSTABLE')                       }

      else

      Unknown macro: {                         buildStepFailureThreshold('never')                         failureThreshold('never')                         unstableThreshold('never')                       }

                           }
                           */
                           configFactories {
                             allNodesForLabelBuildParameterFactory

      Unknown macro: {                         name("Target_Nodes")                         nodeLabel('sync-phx-target && pre-submit && unit && linux && native-cpp')                         ignoreOfflineNodes(true)                       }

                           }
                           configs

      Unknown macro: {                       currentBuildParameters()                     }

                         }
                       }
                     }
                     stopOnFailure(false)
                   }
                 }
              }
            }      
          }

            Assignee:
            Daniel Heid
            Reporter:
            Alfred Wong
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: