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

add Perforce changelist as Java system property to allow access via Maven

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Not A Defect
    • Icon: Major Major
    • p4-plugin
    • None

      Some Jenkins properties are available within Maven via Java system properties, e.g. ${BUILD_NUMBER}. Can we expose useful Perforce properties this way as well, particularly the highest changelist found when synching the workspace prior to building? I think the best place for this is the checkout() method, local variable "newestChange", right after the build counter is updated. You could do something like this:

      System.setProperty("PERFORCE_CHANGELIST", String.valueOf(newestChange));

            rpetti Rob Petti
            timdrury Tim Drury
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: