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

P4_CHANGELIST is no longer resolved into a number (shown as "now")

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Critical Critical
    • p4-plugin
    • None
    • Jenkins v2.36 (also reproducible with v2.32.1, in fact Jenkins version is not important, I believe)
      p4-plugin v1.4.12 (issue started from v1.4.7)
      OS: Mac OSX El Capitan 10.11.1

      I've upgraded from Jenkins 1.653 to 2.36 and P4-Plugin from 1.4.2 to 1.4.12 today and immediately started facing this issue, which broken all my CI build infrstructure, since my bash scripts relay on number provided by P4_CHANGELIST variable.

      The issue is that it stores "now" instead of revision number if SCM is synced to head:

      As I understand this is only when "Pin build at Perforce Label" is set to "now", e.g. via a Parameter variable.

      From build console output:

      P4 Task: syncing files at client/label: now
      ...
      + echo P4_CHANGELIST
      now
      ...
      Set build name.
      New build name is 'now'

      Previously was:

      P4 Task: syncing files at change: 171134
      ...
      + echo P4_CHANGELIST
      171134
      ...
      Set build name.
      New build name is '171134'

      Is it some new design or a bug?
      If it is new design intent, then this makes P4 plugin almost unusable for me...

      I suppose this may have changed/been broken during changes made for env vars to work in Pipeline plugin...

      Not sure at which version it is started, going to downgrade and experiment (reverting back to 1.4.2 helped to return to previous behavior).

       

      p.s. refer to comments for more details found during a bit deeper investigation of this issue...

            Unassigned Unassigned
            ram237 Pavel Pigalov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: