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

Missing <triggers> XML Configuration in Job Definition after Post request

      • Problem: After updating the CloudBees Folder Plugin from version 6.955.v81e2a_35c08d3 to 6.959.v4ed5cc9e2dd4, the <triggers> section of our job configuration XML is not being processed correctly when submitted. We send job configurations as XML via a POST request using the URL:
        {host}/{project}/createItem?name={project}
        

        The XML part with triggers section looks like:

        <triggers>
             <com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger plugin="cloudbees-folder@6.9">
               <spec>PLACEHOLDER_PERIODIC_FOLDER_TRIGGER_SPEC</spec>
               <interval>PLACEHOLDER_PERIODIC_FOLDER_TRIGGER_INTERVAL</interval>
             </com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger>
           </triggers>
         

        and it's missing in the configuration that Jenkins receives. Instead, only <triggers/> appears, which then defaults to a 1-day interval.

      • Temporary Solution: After the job is initially created, we can manually update the <triggers> section by sending an updated XML configuration via a POST request to:
         {host}/{project}/job/{project}/config.xml 

        This allows us to set the correct trigger configuration, but the initial creation does not process the triggers as expected.

      • Expected Behavior: The complete <triggers> XML snippet should be processed and reflected in the job configuration upon initial creation.
      • Actual Behavior: The <triggers> section is omitted during initial creation, requiring a manual update to set the correct configuration.
      • Jenkins Version: 2.479.3
      • Plugin Version: 6.980.v5a_cc0cb_25881

          [JENKINS-75183] Missing <triggers> XML Configuration in Job Definition after Post request

          Diana created issue -
          Diana made changes -
          Description Original: * {*}Problem{*}: After updating the CloudBees Folder Plugin from version 6.955.v81e2a_35c08d3 to 6.959.v4ed5cc9e2dd4, the {{<triggers>}} section of our job configuration XML is not being processed correctly when submitted. We send job configurations as XML via a POST request using the URL: {code:python}
          {host}/{project}/createItem?name={projectkey}
          {code}
          The XML part with triggers section looks like:
          {code:xml}
          <triggers>
               <com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger plugin="cloudbees-folder@6.9">
                 <spec>PLACEHOLDER_PERIODIC_FOLDER_TRIGGER_SPEC</spec>
                 <interval>PLACEHOLDER_PERIODIC_FOLDER_TRIGGER_INTERVAL</interval>
               </com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger>
             </triggers>
           {code}
          and it's missing in the configuration that Jenkins receives. Instead, only {{<triggers/>}} appears, which then defaults to a 1-day interval.

          * {*}Temporary Solution{*}: After the job is initially created, we can manually update the {{<triggers>}} section by sending an updated XML configuration via a POST request to:
            {code:python} {host}/{project}/job/{project}/config.xml {code}
          This allows us to set the correct trigger configuration, but the initial creation does not process the triggers as expected.

          * {*}Expected Behavior{*}: The complete {{<triggers>}} XML snippet should be processed and reflected in the job configuration upon initial creation.

          * {*}Actual Behavior{*}: The {{<triggers>}} section is omitted during initial creation, requiring a manual update to set the correct configuration.

          * {*}Jenkins Version{*}: 2.479.3

          * {*}Plugin Version{*}: 6.980.v5a_cc0cb_25881
          New: * {*}Problem{*}: After updating the CloudBees Folder Plugin from version 6.955.v81e2a_35c08d3 to 6.959.v4ed5cc9e2dd4, the {{<triggers>}} section of our job configuration XML is not being processed correctly when submitted. We send job configurations as XML via a POST request using the URL:
          {code:python}
          {host}/{project}/createItem?name={project}
          {code}
          The XML part with triggers section looks like:
          {code:xml}
          <triggers>
               <com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger plugin="cloudbees-folder@6.9">
                 <spec>PLACEHOLDER_PERIODIC_FOLDER_TRIGGER_SPEC</spec>
                 <interval>PLACEHOLDER_PERIODIC_FOLDER_TRIGGER_INTERVAL</interval>
               </com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger>
             </triggers>
           {code}
          and it's missing in the configuration that Jenkins receives. Instead, only {{<triggers/>}} appears, which then defaults to a 1-day interval.

           * {*}Temporary Solution{*}: After the job is initially created, we can manually update the {{<triggers>}} section by sending an updated XML configuration via a POST request to:
          {code:python}
           {host}/{project}/job/{project}/config.xml {code}
          This allows us to set the correct trigger configuration, but the initial creation does not process the triggers as expected.

           * {*}Expected Behavior{*}: The complete {{<triggers>}} XML snippet should be processed and reflected in the job configuration upon initial creation.

           * {*}Actual Behavior{*}: The {{<triggers>}} section is omitted during initial creation, requiring a manual update to set the correct configuration.

           * {*}Jenkins Version{*}: 2.479.3

           * {*}Plugin Version{*}: 6.980.v5a_cc0cb_25881

            Unassigned Unassigned
            dia_na17 Diana
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: