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

trigger properties in scripted pipeline require 2 builds to get registered

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • workflow-job-plugin
    • None

      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).

       

          [JENKINS-49502] trigger properties in scripted pipeline require 2 builds to get registered

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

            Unassigned Unassigned
            varmenise valentina armenise
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: