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

Support node-specific Perforce configuration

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      (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.

        Attachments

          Issue Links

            Activity

            Hide
            oeuftete 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.

            Show
            oeuftete 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.
            Hide
            rpetti 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.

            Show
            rpetti 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.
            Hide
            oeuftete 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.

            Show
            oeuftete 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.
            Hide
            rpetti Rob Petti added a comment -

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

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

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

            Show
            rpetti Rob Petti added a comment - Unassigning due to time constraints on my end. If someone else wants to work on this, be my guest.
            Hide
            ltyphair 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.

            Show
            ltyphair 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.
            Hide
            rpetti Rob Petti added a comment -

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

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

              People

              • Assignee:
                Unassigned
                Reporter:
                oeuftete oeuftete
              • Votes:
                2 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: