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

PROMOTED_ID doesn't expose timestamp after JENKINS-24380

      Before, Run.getId() was returning something like 2012-04-12_17-13-03, but with the change of JENKINS-24380 this is returning just the same than PROMOTED_NUMBER env var.

      So PROMOTED_NUMBER= PROMOTED_NUMBER

              e.put("PROMOTED_URL",rootUrl+target.getUrl());
              e.put("PROMOTED_JOB_NAME", target.getParent().getName());
              e.put("PROMOTED_JOB_FULL_NAME", target.getParent().getFullName());
              e.put("PROMOTED_NUMBER", Integer.toString(target.getNumber()));
              e.put("PROMOTED_ID", target.getId());
              e.put("PROMOTED_DISPLAY_NAME", target.getDisplayName());
              e.put("PROMOTED_USER_NAME", getUserName());
              e.put("PROMOTED_USER_ID", getUserId());
      

      The correct fix is to maintain PROMOTED_ID for backward compatibility and create a new env var called PROMOTED_TIMESTAMP which will now expose the timestamp on a standard way, something like 2016-02-17T10:46:14Z

          [JENKINS-32993] PROMOTED_ID doesn't expose timestamp after JENKINS-24380

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/hudson/plugins/promoted_builds/Promotion.java
          http://jenkins-ci.org/commit/promoted-builds-plugin/66e9432878c161530522d54ca62e5188e2783b5e
          Log:
          Merge pull request #85 from fbelzunc/JENKINS-32993

          [FIXED JENKINS-32993] Expose PROMOTED_TIMESTAMP

          Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/fa29d01baf12...66e9432878c1

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/hudson/plugins/promoted_builds/Promotion.java http://jenkins-ci.org/commit/promoted-builds-plugin/66e9432878c161530522d54ca62e5188e2783b5e Log: Merge pull request #85 from fbelzunc/ JENKINS-32993 [FIXED JENKINS-32993] Expose PROMOTED_TIMESTAMP Compare: https://github.com/jenkinsci/promoted-builds-plugin/compare/fa29d01baf12...66e9432878c1

            fbelzunc Félix Belzunce Arcos
            fbelzunc Félix Belzunce Arcos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: