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

timestamps() randomly not recognized as a valid option

    • pipeline-model-definition 1.3.3

      timestamp() is not recognised as a valid option when job is triggered because of cron (If job is triggered manually issue it is not reproducible):

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      WorkflowScript: 8: Invalid option type "timestamps". Valid option types: [authorizationMatrix, buildDiscarder, disableConcurrentBuilds, overrideIndexTriggers, skipDefaultCheckout]
      

      I am using the plugin in a Declarative pipeline like that:

      pipeline {
          agent { label 'foo' }
      
          options {
              buildDiscarder(logRotator(daysToKeepStr: '20', numToKeepStr: '100'))
              timestamps()
          }
         
         ...
          
          triggers {
              parameterizedCron('''
                  0 7 * * 1-5 % ENVIRONMENT=bar
              ''')
          }
      
          ...    
      }
      
      

          [JENKINS-48556] timestamps() randomly not recognized as a valid option

          Victor Pascual created issue -
          Victor Pascual made changes -
          Description Original: {{timestamp()}} is not recognised as a valid option when job is triggered because of cron (If job is triggered manually issue it is not reproducible):
          {code:java}
          org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
          WorkflowScript: 8: Invalid option type "timestamps". Valid option types: [authorizationMatrix, buildDiscarder, disableConcurrentBuilds, overrideIndexTriggers, skipDefaultCheckout]
          {code}

          I am using the plugin in a Declarative pipeline like that:

          {code:groovy}
          pipeline {
              agent { label 'foo' }

              options {
                  buildDiscarder(logRotator(daysToKeepStr: '20', numToKeepStr: '100'))
                  timestamps()
              }
             
             ...
              
              triggers {
                  parameterizedCron('''
                      0 7 * * 1-5 % ENVIRONMENT=bar
                  ''')
              }

              ...
          }

          {code}

          New: {{timestamp()}} is not recognised as a valid option when job is triggered because of cron (If job is triggered manually issue it is not reproducible):
          {code:java}
          org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
          WorkflowScript: 8: Invalid option type "timestamps". Valid option types: [authorizationMatrix, buildDiscarder, disableConcurrentBuilds, overrideIndexTriggers, skipDefaultCheckout]
          {code}

          I am using the plugin in a Declarative pipeline like that:

          {code}
          pipeline {
              agent { label 'foo' }

              options {
                  buildDiscarder(logRotator(daysToKeepStr: '20', numToKeepStr: '100'))
                  timestamps()
              }
             
             ...
              
              triggers {
                  parameterizedCron('''
                      0 7 * * 1-5 % ENVIRONMENT=bar
                  ''')
              }

              ...
          }

          {code}

          R. Tyler Croy made changes -
          Link New: This issue duplicates JENKINS-48304 [ JENKINS-48304 ]
          R. Tyler Croy made changes -
          Assignee Original: Baptiste Mathus [ batmat ] New: R. Tyler Croy [ rtyler ]
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Andrew Bayer made changes -
          Assignee Original: R. Tyler Croy [ rtyler ] New: Andrew Bayer [ abayer ]
          Andrew Bayer made changes -
          Resolution Original: Duplicate [ 3 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Andrew Bayer made changes -
          Component/s New: pipeline-model-definition-plugin [ 21706 ]
          Component/s Original: parameterized-scheduler-plugin [ 21025 ]
          Andrew Bayer made changes -
          Link Original: This issue duplicates JENKINS-48304 [ JENKINS-48304 ]
          Daniel Beck made changes -
          Summary Original: timestamps() not recognized as a valid option New: timestamps() randomly not recognized as a valid option
          Andrew Bayer made changes -
          Priority Original: Blocker [ 1 ] New: Minor [ 4 ]
          Andrew Bayer made changes -
          Status Original: Reopened [ 4 ] New: In Progress [ 3 ]

            Unassigned Unassigned
            kupas Victor Pascual
            Votes:
            18 Vote for this issue
            Watchers:
            42 Start watching this issue

              Created:
              Updated: