Skip to content
Permalink
Browse files

Merge pull request #37 from cchong/master

[FIXED JENKINS-16063] Added PROMOTED_USER_NAME environment variable
  • Loading branch information
stephenc committed Mar 5, 2014
2 parents fd95bf4 + 5f8e473 commit eeb9e6549399d9a3bce6d842db7976d8ed59a7ed
@@ -100,7 +100,8 @@ public EnvVars getEnvironment(TaskListener listener) throws IOException, Interru
e.put("PROMOTED_JOB_FULL_NAME", target.getParent().getFullName());
e.put("PROMOTED_NUMBER", Integer.toString(target.getNumber()));
e.put("PROMOTED_ID", target.getId());
EnvVars envScm = new EnvVars();
e.put("PROMOTED_USER_NAME", getUserName());
EnvVars envScm = new EnvVars();
target.getProject().getScm().buildEnvVars( target, envScm );
for ( Entry<String, String> entry : envScm.entrySet() )
{
@@ -63,7 +63,8 @@ public void shouldSetJobAndJobFullNames() throws Descriptor.FormException, IOExc
// Assert
assertEquals("Folder/Project", env.get("PROMOTED_JOB_FULL_NAME"));
assertEquals("Project", env.get("PROMOTED_JOB_NAME"));

assertEquals("SYSTEM", env.get("PROMOTED_USER_NAME"));

project.delete();
parent.delete();
}

0 comments on commit eeb9e65

Please sign in to comment.
You can’t perform that action at this time.