package org.jenkinsci.plugins.p4.scm; import java.io.Serializable; public class P4Path implements Serializable { private static final long serialVersionUID = 1L; private final String path; private final String revision; public P4Path(String path, String revision) { this.path = path; this.revision = revision; } public P4Path(String path) { this.path = path; this.revision = null; } public String getPathBuilder(String file) { String filePath = path + "/" + file; if (getRevision() == null) { return filePath; } else { return filePath + "@" + getRevision(); } } public String getName() { String p = getPath(); if (p.startsWith("//")) { p = p.substring("//".length()); p = p.replaceAll("/", "."); } String r = getRevision(); if (r != null) { if(r.startsWith("refs/pull/")) { r = r.substring("refs/pull/".length()); } r = r.replaceAll("/", "."); } return p + "." + r; } public String getPath() { return path; } public String getRevision() { if (revision != null && revision.startsWith("refs/heads/")) { return revision.substring("refs/heads/".length()); } return revision; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#4 | 25006 | Paul Allen |
Support for remote Jenkinsfiles in a MultiBranch project. Jenkinsfile are idenitified by the Include branches path (e.g. //depot/Remote/...), but you must add a Mapping in the BranchSource->Advanced->View Mappings to locate the projects source and use a special ${BRANCH_NAME} in the path. e.g. //depot/ProjectA/${BRANCH_NAME}/... JENKINS-53936 |
||
#3 | 24670 | Paul Allen |
Swarm review support for MultiBranch scanning. Changed TempClient view map to add Jenkinsfile at the bottom. |
||
#2 | 24492 | Paul Allen |
Initial work for MultiBranch Event trigger. JENKINS-52066 (Triggered Events and not Polling per change) |
||
#1 | 22875 | Paul Allen | Refactor P4Path and Swarm API | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/scm/swarm/P4Path.java | |||||
#3 | 22758 | Paul Allen |
Use '/' in getPathBuilder. Depot syntax will always be '/' only local syntax requires File.separator. JENKINS-46414 |
||
#2 | 22681 | Paul Allen |
Fix FindBug Errors. P4Path needed to be Serializable and null check protection for replaceAll. |
||
#1 | 22678 | Paul Allen |
MultiBranch support for Helix4Git (GitHub PR model). Update MultiBranch product names to Helix. |