Skip to content

Commit

Permalink
[JENKINS-13270] always put P4TICKET into the environment
Browse files Browse the repository at this point in the history
todo: add a separate option for P4TICKET, since some users may rightly consider the ticket as being sensitive information, and thus may want to disable it.
  • Loading branch information
Rob Petti committed Apr 3, 2012
1 parent a252310 commit 16ef60d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/hudson/plugins/perforce/PerforceSCM.java
Expand Up @@ -431,15 +431,15 @@ public void buildEnvVars(AbstractBuild build, Map<String, String> env) {
env.put("P4USER", p4User);

// if we want to allow p4 commands in script steps this helps
if (exposeP4Passwd) {
// this may help when tickets are used since we are
// not storing the ticket on the client during login
if (p4Ticket != null) {
env.put("P4TICKET", p4Ticket);
}
if (exposeP4Passwd) {
PerforcePasswordEncryptor encryptor = new PerforcePasswordEncryptor();
env.put("P4PASSWD", encryptor.decryptString(p4Passwd));
}
// this may help when tickets are used since we are
// not storing the ticket on the client during login
if (p4Ticket != null) {
env.put("P4TICKET", p4Ticket);
}

env.put("P4CLIENT", getEffectiveClientName(build));
PerforceTagAction pta = build.getAction(PerforceTagAction.class);
Expand Down

0 comments on commit 16ef60d

Please sign in to comment.