• Icon: New Feature New Feature
    • Resolution: Won't Do
    • Icon: Minor Minor
    • p4-plugin
    • None

      (This is sort of related to JENKINS-2947, but doesn't really belong there.)

      The Perforce configuration for a job doesn't provide much flexibility if you want to run a job on various slaves.

      The path to the executable means that the job becomes fixed to an OS (more or less), and doesn't allow for slaves configured with Perforce in a different location.

      The P4PORT setting is also a problem (for me). We have slaves that run in various locations, each of which may have their own local p4 proxy which would be optimal. As it stands now, we have to choose one server that is the best compromise for all locations.

          [JENKINS-5120] Support node-specific Perforce configuration

          oeuftete added a comment -

          To me, it looks like the easiest way to support this would be for the plugin to support using existing environment variables. P4PORT, P4USER, and P4PASSWD could be used from the environment if left empty in the job configuration. Make up an environment variable name for the application path, maybe? I don't know.

          oeuftete added a comment - To me, it looks like the easiest way to support this would be for the plugin to support using existing environment variables. P4PORT , P4USER , and P4PASSWD could be used from the environment if left empty in the job configuration. Make up an environment variable name for the application path, maybe? I don't know.

          Rob Petti added a comment -

          You can actually leave the path to p4 blank, and it will just use the PATH, I believe. I find that we rarely have to specify it explicitly (and in fact this will be going away entirely when the p4java version is completed)

          A work-around for your issue would be to make the hostname:port for the proxies the same at all sites. If you can't set that up (hostname collisions etc.), then you can edit the 'hosts' file on the slaves to create a hostname that resolves to the appropriate server for each machine, then as long as you set up the port numbers to be the same on every proxy, then you should be good.

          I think JENKINS-2947 is actually a good solution if we also allow node-level overrides for globally defined perforce servers. It would take quite a bit of work though, so don't expect a solution anytime soon. See what you can do about making your setup a bit more consistent across the board in the meantime.

          Rob Petti added a comment - You can actually leave the path to p4 blank, and it will just use the PATH, I believe. I find that we rarely have to specify it explicitly (and in fact this will be going away entirely when the p4java version is completed) A work-around for your issue would be to make the hostname:port for the proxies the same at all sites. If you can't set that up (hostname collisions etc.), then you can edit the 'hosts' file on the slaves to create a hostname that resolves to the appropriate server for each machine, then as long as you set up the port numbers to be the same on every proxy, then you should be good. I think JENKINS-2947 is actually a good solution if we also allow node-level overrides for globally defined perforce servers. It would take quite a bit of work though, so don't expect a solution anytime soon. See what you can do about making your setup a bit more consistent across the board in the meantime.

          oeuftete added a comment -

          I appreciate the workaround suggestions, although I don't think that's within the scope of this ticket.

          I just want the plugin to be better, so I opened the ticket. If I need workarounds, I'll go to the users list.

          oeuftete added a comment - I appreciate the workaround suggestions, although I don't think that's within the scope of this ticket. I just want the plugin to be better, so I opened the ticket. If I need workarounds, I'll go to the users list.

          Rob Petti added a comment -

          Fair enough. I was just trying to help with your immediate problem while I work on the ticket.

          Rob Petti added a comment - Fair enough. I was just trying to help with your immediate problem while I work on the ticket.

          Rob Petti added a comment -

          Unassigning due to time constraints on my end. If someone else wants to work on this, be my guest.

          Rob Petti added a comment - Unassigning due to time constraints on my end. If someone else wants to work on this, be my guest.

          ltyphair added a comment -

          Leaving the p4 path does not work. Is there a environment variable I can set per node that will work? leaving it blank leaves the command blank even though p4 is in my path.

          ltyphair added a comment - Leaving the p4 path does not work. Is there a environment variable I can set per node that will work? leaving it blank leaves the command blank even though p4 is in my path.

          Rob Petti added a comment -

          Sorry, set it to "p4" rather than leave it blank.

          Rob Petti added a comment - Sorry, set it to "p4" rather than leave it blank.

          Josh Clausen added a comment -

          I have the same use case: multiple locations, each of which has its own p4 proxy (different IPs in every location).

          Right now, the plugin clobbers P4HOST and P4PORT, rather than first checking if there are any existing environment variables by those names.

          So, that would be my recommendation - use any already-set environment variables rather than clobbering those environment variables with whatever happens to be in the form for the credential.

          Josh Clausen added a comment - I have the same use case: multiple locations, each of which has its own p4 proxy (different IPs in every location). Right now, the plugin clobbers P4HOST and P4PORT, rather than first checking if there are any existing environment variables by those names. So, that would be my recommendation - use any already-set environment variables rather than clobbering those environment variables with whatever happens to be in the form for the credential.

          Rob Petti added a comment -

          This ticket looks like it was made against the perforce-plugin before it was deprecated, and was erroneously moved to p4-plugin. Perforce-plugin is no longer being maintained and has been decommissioned.

          If you are having this issue with the p4-plugin, I recommend opening a new ticket with as much detail as possible so they can resolve the issue.

          Rob Petti added a comment - This ticket looks like it was made against the perforce-plugin before it was deprecated, and was erroneously moved to p4-plugin. Perforce-plugin is no longer being maintained and has been decommissioned. If you are having this issue with the p4-plugin, I recommend opening a new ticket with as much detail as possible so they can resolve the issue.

            Unassigned Unassigned
            oeuftete oeuftete
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: