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

timestamps() randomly not recognized as a valid option

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      pipeline-model-definition 1.3.3

      Description

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

        Attachments

          Issue Links

            Activity

            Hide
            xuyongdao 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')

             

            Show
            xuyongdao 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')  
            Hide
            mrjoshwoodcock Josh Woodcock added a comment -

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

            Show
            mrjoshwoodcock Josh Woodcock added a comment - We are on version 1.3.4.1 now. Is this resolved and released? 
            Hide
            historus Matthias Schulz added a comment -

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

            Show
            historus Matthias Schulz added a comment - +1 still waiting for the fix as we are intermittently seeing this issue.
            Hide
            das999 Anatoliy Nenashev added a comment -

            any news?

            Show
            das999 Anatoliy Nenashev added a comment - any news?
            Hide
            dnusbaum 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.

            Show
            dnusbaum 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.

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                kupas Victor Pascual
              • Votes:
                16 Vote for this issue
                Watchers:
                39 Start watching this issue

                Dates

                • Created:
                  Updated: