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

timestamps() randomly not recognized as a valid option

XMLWordPrintable

    • 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
              ''')
          }
      
          ...    
      }
      
      

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

              Created:
              Updated: