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

Expose the ability to use an existing p4 client (workspace)

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • None

      I have been using p4groovy with Jenkins pipelines for a while now, and this is becoming more and more cumbersome.

      In order to instantiate a p4 object (to run any sort of p4 command), you must define a workspace which p4groovy attempts to create. There doesn't seem to be a way (that I can tell) to just use an existing workspace.

      Here is an example of why this is cumbersome. I have a shared function called `get_latest_change()` which simply runs the command `p4 changes -m1 //depot/...`. This command doesn't need a workspace to run, but since p4groovy seems to require one, I have to manually instantiate a workspace and pass it into the function every time I want to call it (and I need to go to great pains to make sure the ws object I create matches the existing workspace so I don't accidentally change things).

          [JENKINS-49967] Expose the ability to use an existing p4 client (workspace)

          Jay Spang created issue -

            Unassigned Unassigned
            jayspang Jay Spang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: