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

      I have been looking for the cause of a problem which has led to not matching the p4 port given by a Perforce trigger request in comparison to the registered Perforce servers. Problem has been that my trigger script (running on the Perforce server) has used the "real" name of the machine (e.g. xyzperforce01) when generating the JSON payload for the request while on the other side (inside Jenkins) the name used for the Perforce server has been perforce - being a DNS alias for xyzperforce01.

      Some analysis ...

      Inside P4Trigger.java in matchServer() the port argument is compared to credential.getP4port() by simply using equals() (i.e. string comparison).

      But P4PORT ist structured: it consists out of a hostname and a port number.

      So my improvement proposal is to parse the p4 port expression and resolve the host part to its ip address. Then the ip addresses should be compared (and port numbers of course).

          [JENKINS-38989] P4Trigger: more detailed comparison of port

          There are no comments yet on this issue.

            Unassigned Unassigned
            heiko_nardmann Heiko Nardmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: