package org.jenkinsci.plugins.p4_client.workspace; import java.util.HashMap; import java.util.Map; import java.util.Set; public class ClientTags { private static Map<String, String> map; static { map = new HashMap<String, String>(); map.put("node", null); map.put("project", null); map.put("hostname", null); map.put("hash", null); } public static Set<String> getTags() { return map.keySet(); } public static String getFormattedName(String format) { String name = format; for (String tag : map.keySet()) { String value = map.get(tag); if (value != null) { name = name.replace("${" + tag + "}", value); } } return name; } public static void set(String tag, String value) { map.put(tag, value); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 9495 | Paul Allen |
Fix Polling issue; using the wrong client. Removed static classes and internal referenced to PerforceScm attributes, to avoid threading issues. |
||
#1 | 8738 | Paul Allen |
Workspace Name Formatter. For Template and Stream workspaces it allows the substitution of the following tags: ${node} The name given to the slave Jenkins node. ${hostname} The hostname for the slave Jenkins node. ${project} The name of the Jenkins build Job. ${hash} Unique hash code of the Jenkins node. |