Uploaded image for project: 'Bamboo'
  1. Bamboo
  2. BAM-18264

Set Perforce environment variables, and execute p4 login from Linked repository configuration



    • Suggestion
    • Resolution: Unresolved
    • None
    • Repository (Perforce)
    • None
    • 0
    • 1
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.


      Problem Definition

      When a Perforce repository is linked to Bamboo, we do not set the Perforce environment variables that are required to override the defaults. These include:

      • P4PORT
      • P4USER
      • P4PASSWD

      We set these values in the Linked repository settings, but if the environment variable is not present, we use the defaults. Under the hood, this is because Bamboo triggers the Perforce commands with a script.

      Suggested Solution

      Implement a solution to set the values in Linked repository settings as their respective environment variables.

      Linked repository setting P4 environment variable
      Port P4PORT
      Username P4USER
      Password P4PASSWD
      Client (workspace) P4CLIENT

      Run p4 login when the repository is added, and then on startup.


      Please set these as environment variables from your command line

      export P4PORT=<Port>
      export P4USER=<Username>
      export P4CLIENT=<Client>

      Run p4 login – this also allows your password to not be an environment variable, which may be desirable.

      If you are running Bamboo and Perforce on the same server:
      On Unix machines, you can also run configure-helix-p4d.sh to configure the Perforce Daemon. This will configure /etc/perforce/p4dctl.conf.d/master.conf which the Daemon uses to set its variables on startup




            Unassigned Unassigned
            ezeidan Elias Zeidan (they/them)
            1 Vote for this issue
            1 Start watching this issue