Skip to content
Permalink
Browse files
Merge pull request #126 from jglick/export-JENKINS-50777
[JENKINS-50777] Export the SCMSource(s) from a MultiBranchProject
  • Loading branch information
jglick committed Apr 20, 2018
2 parents e53a2a9 + c1bb523 commit bd62524703191938798a676ad70ea4b9e103a1f0
Showing with 7 additions and 1 deletion.
  1. +1 −1 pom.xml
  2. +4 −0 src/main/java/jenkins/branch/BranchSource.java
  3. +2 −0 src/main/java/jenkins/branch/MultiBranchProject.java
@@ -66,7 +66,7 @@

<properties>
<jenkins.version>1.642.3</jenkins.version>
<scm-api.version>2.2.6</scm-api.version>
<scm-api.version>2.2.7</scm-api.version>
<git-plugin.version>3.3.0</git-plugin.version>
</properties>

@@ -36,13 +36,16 @@

import java.util.List;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.ExportedBean;

/**
* A source of branches, which consists of a source and a strategy for creating properties of the branches from this
* source.
*
* @author Stephen Connolly
*/
@ExportedBean
public class BranchSource extends AbstractDescribableImpl<BranchSource> {
/**
* The source.
@@ -87,6 +90,7 @@ private Object readResolve() {
*
* @return the source.
*/
@Exported
@NonNull
public SCMSource getSource() {
return source;
@@ -114,6 +114,7 @@
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import org.kohsuke.stapler.export.Exported;

/**
* Abstract base class for multiple-branch based projects.
@@ -365,6 +366,7 @@ public synchronized void setProjectFactory(BranchProjectFactory<P, R> projectFac
*
* @return the sources of branches.
*/
@Exported
@NonNull
public List<BranchSource> getSources() {
if (sources != null) {

0 comments on commit bd62524

Please sign in to comment.