Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,16 @@
</dependency>

</dependencies>

</project>


<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>http://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ public SharedObjectType[] call() throws EnvInjectException {
restrictionActivated = false;
}

// find out if profile name is a job argument
Map<String, String> envVars = build.getEnvironment(listener);
String real_profile = Util.replaceMacro(profiles, envVars);

if (restrictionActivated) {
logger.info(String.format("Restricting shared objects to the following usage %s", profiles));
logger.info(String.format("Restricting shared objects to the following usage %s", real_profile));
}

for (SharedObjectType type : sharedObjectTypes) {
Expand All @@ -88,7 +92,7 @@ public SharedObjectType[] call() throws EnvInjectException {
addSharedObject(result, type, build, logger);
continue;
}
if (restrictionActivated && isProfileActivated(profiles, type)) {
if (restrictionActivated && isProfileActivated(real_profile, type)) {
addSharedObject(result, type, build, logger);
continue;
}
Expand Down