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

Expose P4_CLIENT, P4_USER and P4_PORT as the environment variables P4CLIENT, P4USER and P4PORT for scripts

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

      The old community P4 plugin used to expose the variables P4PORT, P4USER and P4CLIENT as environment variables for scripts to use. The new plugin on purpose uses different variables to ensure we dont override variables that are already set in the environment. Would be good if we had the option to also automatically set P4PORT=P4_PORT, P4USER=P4_USER and P4CLIENT=P4_CLIENT.

          [JENKINS-62008] Expose P4_CLIENT, P4_USER and P4_PORT as the environment variables P4CLIENT, P4USER and P4PORT for scripts

          Karl Wirth added a comment -

          Please see JENKINS-61943 for workarounds.

          Karl Wirth added a comment - Please see JENKINS-61943 for workarounds.

          Would it be possible to implement a flag in P4 plugin to make this behavior configurable (e.g. if the overwrite option is checked, that should pass all the environmental variables to the build steps following perforce sync)?

          We are currently migrating all our jobs from old Perforce plugin to new P4 plugin and setting up global variables as per workaround, e.g. P4CLIENT= ${P$4_CLIENT} breaks old Perforce plugin functionality

          Sylwia Kludacz added a comment - Would it be possible to implement a flag in P4 plugin to make this behavior configurable (e.g. if the overwrite option is checked, that should pass all the environmental variables to the build steps following perforce sync)? We are currently migrating all our jobs from old Perforce plugin to new P4 plugin and setting up global variables as per workaround, e.g. P4CLIENT= ${P$4_CLIENT} breaks old Perforce plugin functionality

            Unassigned Unassigned
            p4karl Karl Wirth
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: