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

Timer triggers with comments do not work after copy

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins Version: 1.480
    • Similar Issues:

      Description

      We have Jobs with timer trigger and SCM timer trigger.
      Every trigger has an comment like this:

      # every 30 minutes
      */30 * * * *

      If we copy jobs with these triggers by URL(<Jenkins-URL>/createItem?name=copyOfJob) and config.xml as post data, then the triggers are not activ. Jenkins handles

      # every 30 minutes
      */30 * * * *

      as a whole comment.

      If the trigger configuration ist like:

      */30 * * * *
      # every 30 minutes

      then copy by URL ist not possible. Jenkins gives an Exception (see Attachment)

        Attachments

          Activity

          huttraeger Mathias Steinbach created issue -
          huttraeger Mathias Steinbach made changes -
          Field Original Value New Value
          Description We have Jobs with timer trigger and SCM timer trigger.
          Every trigger has an comment like this:

          # every 30 minutes
          */30 * * * *

          If we copy jobs with these triggers by URL(<Jenkins-URL>/createItem?name=copyOfJob) and config.xml as post data, then the triggers are not activ. Jenkins handles

          # every 30 minutes
          */30 * * * *

          as a whole comment.

          If the trigger configuration ist like:

          */30 * * * *
          # every 30 minutes

          then copy by URL ist not possible. Jenkins gives an Exception (see Attachment)
           
          We have Jobs with timer trigger and SCM timer trigger.
          Every trigger has an comment like this:

          ## every 30 minutes
          */30 * * * *

          If we copy jobs with these triggers by URL(<Jenkins-URL>/createItem?name=copyOfJob) and config.xml as post data, then the triggers are not activ. Jenkins handles

          ## every 30 minutes
          */30 * * * *

          as a whole comment.

          If the trigger configuration ist like:

          */30 * * * *
          ## every 30 minutes

          then copy by URL ist not possible. Jenkins gives an Exception (see Attachment)
           
          huttraeger Mathias Steinbach made changes -
          Description We have Jobs with timer trigger and SCM timer trigger.
          Every trigger has an comment like this:

          ## every 30 minutes
          */30 * * * *

          If we copy jobs with these triggers by URL(<Jenkins-URL>/createItem?name=copyOfJob) and config.xml as post data, then the triggers are not activ. Jenkins handles

          ## every 30 minutes
          */30 * * * *

          as a whole comment.

          If the trigger configuration ist like:

          */30 * * * *
          ## every 30 minutes

          then copy by URL ist not possible. Jenkins gives an Exception (see Attachment)
           
          We have Jobs with timer trigger and SCM timer trigger.
          Every trigger has an comment like this:

          \# every 30 minutes
          */30 * * * *

          If we copy jobs with these triggers by URL(<Jenkins-URL>/createItem?name=copyOfJob) and config.xml as post data, then the triggers are not activ. Jenkins handles

          \# every 30 minutes
          */30 * * * *

          as a whole comment.

          If the trigger configuration ist like:

          */30 * * * *
          \# every 30 minutes

          then copy by URL ist not possible. Jenkins gives an Exception (see Attachment)
           
          oleg_nenashev Oleg Nenashev made changes -
          Component/s core [ 15593 ]
          Component/s plugin-proposals [ 15491 ]
          Hide
          danielbeck Daniel Beck added a comment - - edited

          Confirmed (with different but similarly broken behavior) on 1.583; if the timer spec contains a comment, the timer will silently be discarded.

          Show
          danielbeck Daniel Beck added a comment - - edited Confirmed (with different but similarly broken behavior) on 1.583; if the timer spec contains a comment, the timer will silently be discarded.
          danielbeck Daniel Beck made changes -
          Labels jenkins trigger trigger
          Hide
          danielbeck Daniel Beck added a comment -

          Not a defect, only happens when you use e.g. curl --data @config.xml rather than curl --data-binary @config.xml. Only the latter retains line breaks, which are essential for this format:

          * * * * * # foo

          is invalid.

          # foo * * * * *

          is all comment, and the trigger is stripped from the job.

          Show
          danielbeck Daniel Beck added a comment - Not a defect, only happens when you use e.g. curl --data @config.xml rather than curl --data-binary @config.xml . Only the latter retains line breaks, which are essential for this format: * * * * * # foo is invalid. # foo * * * * * is all comment, and the trigger is stripped from the job.
          danielbeck Daniel Beck made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Not A Defect [ 7 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 146973 ] JNJira + In-Review [ 192169 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              huttraeger Mathias Steinbach
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: