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

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

    XMLWordPrintable

Details

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

    Description

      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.

      Workaround

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: