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

          Andrew Bayer added a comment -

          I ended up deciding it was probably too much of a hassle to reproduce in a test, so hey, we'll just go with it. =) Thanks again!

          Andrew Bayer added a comment - I ended up deciding it was probably too much of a hassle to reproduce in a test, so hey, we'll just go with it. =) Thanks again!

          Shiqiang Duan added a comment -

          1.3.3 is still unreleased and all our pipeline build is failing after upgrading to 1.3.2. How come this issue can be marked as resolved?!

          Shiqiang Duan added a comment - 1.3.3 is still unreleased and all our pipeline build is failing after upgrading to 1.3.2. How come this issue can be marked as resolved?!

          Andrew Bayer added a comment -

          The issue is resolved but not yet released - that's how our JIRA flow goes. The release should be within the next few weeks.

          Andrew Bayer added a comment - The issue is resolved but not yet released - that's how our JIRA flow goes. The release should be within the next few weeks.

          yongdao xu added a comment -

           when the fix can be released? we still got similar error from Jenkins 2.121 with groovy 2.54. thanks.

           

          control.MultipleCompilationErrorsException: startup failed:
          WorkflowScript: 4: Invalid option type "timeout". Valid option types: [ansiColor, authorizationMatrix, buildDiscarder, catchError, checkoutToSubdirectory, copyArtifactPermission, disableConcurrentBuilds, disableResume, durabilityHint, newContainerPerStage, overrideIndexTriggers, preserveStashes, quietPeriod, skipDefaultCheckout, skipStagesAfterUnstable, withCredentials, ws] @ line 4, column 7.
          timeout(time: 2, unit: 'HOURS')

           

          yongdao xu added a comment -  when the fix can be released? we still got similar error from Jenkins 2.121 with groovy 2.54. thanks.   control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 4: Invalid option type "timeout". Valid option types: [ansiColor, authorizationMatrix, buildDiscarder, catchError, checkoutToSubdirectory, copyArtifactPermission, disableConcurrentBuilds, disableResume, durabilityHint, newContainerPerStage, overrideIndexTriggers, preserveStashes, quietPeriod, skipDefaultCheckout, skipStagesAfterUnstable, withCredentials, ws] @ line 4, column 7. timeout(time: 2, unit: 'HOURS')  

          Josh Woodcock added a comment -

          We are on version 1.3.4.1 now. Is this resolved and released? 

          Josh Woodcock added a comment - We are on version 1.3.4.1 now. Is this resolved and released? 

          +1 still waiting for the fix as we are intermittently seeing this issue.

          Matthias Schulz added a comment - +1 still waiting for the fix as we are intermittently seeing this issue.

          any news?

          Anatoliy Nenashev added a comment - any news?

          Devin Nusbaum added a comment -

          The fix discussed in earlier comments was released in Pipeline: Declarative 1.33, but I have seen reports from users still experiencing the problem even after that fix, so there are probably other similar problems in the codebase somewhere.

          Devin Nusbaum added a comment - The fix discussed in earlier comments was released in Pipeline: Declarative 1.33, but I have seen reports from users still experiencing the problem even after that fix, so there are probably other similar problems in the codebase somewhere.

          Varun Reddy added a comment -

          We are still facing same issue with Jenkins 2.176.2. Is there anything that we need to do? Weird thing in a multibranch one of my development branch options {timestamps()} it works fine. but same repo with a new branch created from the clone of development branch it is failing. 

          Varun Reddy added a comment - We are still facing same issue with Jenkins 2.176.2. Is there anything that we need to do? Weird thing in a multibranch one of my development branch options {timestamps()} it works fine. but same repo with a new branch created from the clone of development branch it is failing. 

          Mohan added a comment - - edited

          Is this only related to timestamps() and gets resolved if we disable the timestamps() in options? Do we have a fix available for this random issue now? 

          Mohan added a comment - - edited Is this only related to timestamps() and gets resolved if we disable the timestamps() in options? Do we have a fix available for this random issue now? 

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

              Created:
              Updated: