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

trigger properties in scripted pipeline require 2 builds to get registered

    Details

    • Similar Issues:

      Description

      When defining trigger in a declarative pipeline, it will suffice to write

      pipeline {
       agent any
      
       triggers {
         cron('H H(0-7) * * *')
       }
      }

      and build once. 

      After the first build accessing the job config UI will show the trigger configuration.

      However if you do the same thing with a scripted pipeline

       

      node {
          properties([pipelineTriggers([cron('H H(0-7) * * *')])])
      }
      

       

      you need two builds to register the trigger (it won't appear in the UI and won't be working until the second manual build).

       

        Attachments

          Activity

          varmenise valentina armenise created issue -
          varmenise valentina armenise made changes -
          Field Original Value New Value
          Summary trigger properties in scripted pipeline require 2 builds to be registered in the UI trigger properties in scripted pipeline require 2 builds to get registered
          mikecirioli mike cirioli made changes -
          Assignee mike cirioli [ mikecirioli ]
          mikecirioli mike cirioli made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Cannot Reproduce [ 5 ]
          liamrae Liam Rae-McLauchlan made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Assignee mike cirioli [ mikecirioli ]

            People

            • Assignee:
              Unassigned
              Reporter:
              varmenise valentina armenise
            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: