-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
0
-
1
-
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