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

Access to currentBuild.getStartTime in Jenkins Workflow

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: pipeline
    • Labels:
      None
    • Environment:
      workflow-plugin 1.5
    • Similar Issues:

      Description

      Hi,

      my application version number relies on the build start time.
      I need to set up a BUILD_TIMESTAMP variable at the beginning of my workflow.

      It will be more convenient to give access to the currentBuild.getStartTime instead of/beside currentBuild.getStartTimeInMillis, so I can then format it directly.

      Thanks

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            JENKINS-26958 would provide the most convenient route.

            Show
            jglick Jesse Glick added a comment - JENKINS-26958 would provide the most convenient route.
            Hide
            jglick Jesse Glick added a comment -

            Or you can use the currentStartTime and whatever DateFormat you like.

            Show
            jglick Jesse Glick added a comment - Or you can use the currentStartTime and whatever DateFormat you like.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                mrcitron Metin OSMAN
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: