package org.jenkinsci.plugins.p4.swarmAPI; import org.jenkinsci.plugins.p4.scm.P4Path; import java.util.ArrayList; import java.util.List; public class SwarmProjectAPI { private Project project; public SwarmProjectAPI() { } public SwarmProjectAPI(Project project) { this.project = project; } public Project getProject() { return project; } public static class Project { private List<Branch> branches; public Project(List<Branch> branches) { this.branches = branches; } public List<Branch> getBranches() { return branches; } } public static class Branch { private String id; private String name; private List<String> paths; public Branch(String id, String name, List<String> paths) { this.id = id; this.name = name; this.paths = paths; } public String getId() { return id; } public String getName() { return name; } /** * Return list of paths from a branch, but strip '/...' * * @return List of paths */ public List<P4Path> getPaths() { List<P4Path> list = new ArrayList<>(); for(String path : paths) { if (path.endsWith("/...")) { path = path.substring(0, path.lastIndexOf("/...")); } list.add(new P4Path(path)); } return list; } } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#7 | 30143 | Sandeep Kumar |
Merge pull request #[197] from [skumar7322/SwarmAPI] Change Swarm API version to v11 |
||
#6 | 25628 | Paul Allen |
BlueOcean support to create MultiBranch Pipelines. Add filter for Swarm Project list. |
||
#5 | 25624 | Paul Allen |
Swarm project query endpoint for BlueOcean support. For example: GET request on http://localhost:8080/swarm/projects/?credential=myid returns a JSON list of Swarm project IDs: |
||
#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 | 24529 | Paul Allen |
Swarm Commit Event support, refactoring and test. JENKINS-52605 (Fix doc in 'Includes' help bubble for MultiBranch) JENKINS-52066 (Improve Swarm Commit and Branch Event support) |
||
#2 | 24454 | Paul Allen |
Exclude and Include mapping support. Refactored P4Path usage and added P4SwarmPath. JENKINS-49804 |
||
#1 | 22875 | Paul Allen | Refactor P4Path and Swarm API | ||
//guest/perforce_software/p4jenkins/main/src/main/java/org/jenkinsci/plugins/p4/scm/swarm/SwarmProjectAPI.java | |||||
#2 | 22678 | Paul Allen |
MultiBranch support for Helix4Git (GitHub PR model). Update MultiBranch product names to Helix. |
||
#1 | 22396 | Paul Allen |
MultiBranch support for Perforce Swarm Reviews. A work in progress - adds Swarm API support to find branches and reviews from a Swarm project. #review-22354 |