diff --git a/.gitignore b/.gitignore index cef4bfe3..f52449eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ /target /work +.settings/ .DS_Store +.classpath +.project diff --git a/pom.xml b/pom.xml index a012d876..e6677d07 100644 --- a/pom.xml +++ b/pom.xml @@ -1,54 +1,51 @@ - + 4.0.0 org.jenkins-ci.plugins plugin - 1.403 + 1.465 - - + + jenkins-multijob-plugin - 1.1-SNAPSHOT + 1.2-SNAPSHOT hpi Jenkins Multijob plugin Enabling full hierarchy of Jenkins jobs http://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin - - maven.jenkins-ci.org - http://maven.jenkins-ci.org:8081/content/repositories/releases/ - - + + maven.jenkins-ci.org + http://maven.jenkins-ci.org:8081/content/repositories/releases/ + + - + + + alex-n + Alex Nickolaevsky + alex@tikalk.com + - alex-n - Alex Nickolaevsky - alex@tikalk.com - - - ronil - Roni Licht - roni@tikalk.com - + ronil + Roni Licht + roni@tikalk.com + - itaior - Itai Or - itai@tikalk.com - - + itaior + Itai Or + itai@tikalk.com + + scm:git:git://github.com:jenkinsci/tikal-multijob-plugin.git - scm:git:git@github.com:jenkinsci/tikal-multijob-plugin.git - https://github.com/jenkinsci/tikal-multijob-plugin.git + scm:git:git@github.com:jenkinsci/tikal-multijob-plugin.git + https://github.com/jenkinsci/tikal-multijob-plugin.git @@ -62,19 +59,17 @@ - - - repo.jenkins-ci.org - http://repo.jenkins-ci.org/public/ - - - - - - repo.jenkins-ci.org - http://repo.jenkins-ci.org/public/ - - - - + + + repo.jenkins-ci.org + http://repo.jenkins-ci.org/public/ + + + + + repo.jenkins-ci.org + http://repo.jenkins-ci.org/public/ + + + \ No newline at end of file diff --git a/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java b/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java index 57fd7e86..7345a8a0 100644 --- a/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java +++ b/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobBuilder.java @@ -53,7 +53,9 @@ public MultiJobBuilder(String phaseName, List phaseJobs, this.phaseJobs = Util.fixNull(phaseJobs); this.continuationCondition = continuationCondition; } - + + + @Override @SuppressWarnings("rawtypes") public boolean perform(AbstractBuild build, Launcher launcher, @@ -78,6 +80,7 @@ public boolean perform(AbstractBuild build, Launcher launcher, "Starting build job %s.\n", HyperlinkNote.encodeTo('/' + project.getUrl(), project.getFullName())); + PhaseJobsConfig projectConfig = projects.get(project); List actions = new ArrayList(); prepareActions(build, project, projectConfig, listener, actions); @@ -87,6 +90,7 @@ public boolean perform(AbstractBuild build, Launcher launcher, if (future != null) { futuresList.add(future); } + } boolean failed = false; for (Future future : futuresList) { @@ -95,9 +99,11 @@ public boolean perform(AbstractBuild build, Launcher launcher, } try { AbstractBuild jobBuild = (AbstractBuild) future.get(); + Result result = jobBuild.getResult(); ChangeLogSet changeLogSet = jobBuild.getChangeSet(); + //jobBuild.getArtifacts() if (changeLogSet != null) { ((MultiJobBuild) build).addChangeLogSet(changeLogSet); } @@ -175,6 +181,8 @@ public boolean phaseNameExist(String phaseName){ } return false; } + + @Extension public static class DescriptorImpl extends BuildStepDescriptor { @@ -203,6 +211,9 @@ public boolean configure(StaplerRequest req, JSONObject formData) { } } + + + @SuppressWarnings("rawtypes") public void buildDependencyGraph(AbstractProject owner, @@ -285,6 +296,8 @@ public String getLabel() { return label; } } + + public ContinuationCondition getContinuationCondition() { return continuationCondition; diff --git a/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobProject.java b/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobProject.java index 9df1a79c..bd8b5ab5 100644 --- a/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobProject.java +++ b/src/main/java/com/tikal/jenkins/plugins/multijob/MultiJobProject.java @@ -1,11 +1,17 @@ package com.tikal.jenkins.plugins.multijob; +import java.io.IOException; +import java.util.Map; + import hudson.Extension; import hudson.model.DependencyGraph; import hudson.model.ItemGroup; import hudson.model.TopLevelItem; import hudson.model.Hudson; import hudson.model.Project; +import hudson.scm.SCM; +import hudson.triggers.Trigger; +import hudson.triggers.TriggerDescriptor; import com.tikal.jenkins.plugins.multijob.views.MultiJobView; @@ -19,17 +25,17 @@ private MultiJobProject(ItemGroup parent, String name) { public MultiJobProject(Hudson parent, String name) { super(parent, name); } - + @Override protected Class getBuildClass() { return MultiJobBuild.class; } - + @Override public Hudson getParent() { return Hudson.getInstance(); } - + public DescriptorImpl getDescriptor() { return DESCRIPTOR; } diff --git a/src/main/java/com/tikal/jenkins/plugins/multijob/PhaseJobsConfig.java b/src/main/java/com/tikal/jenkins/plugins/multijob/PhaseJobsConfig.java index 9cfcda1b..7707e856 100644 --- a/src/main/java/com/tikal/jenkins/plugins/multijob/PhaseJobsConfig.java +++ b/src/main/java/com/tikal/jenkins/plugins/multijob/PhaseJobsConfig.java @@ -2,12 +2,33 @@ import hudson.EnvVars; import hudson.Extension; -import hudson.model.*; +import hudson.model.Action; +import hudson.model.AutoCompletionCandidates; +import hudson.model.Describable; +import hudson.model.JobProperty; +import hudson.model.JobPropertyDescriptor; +import hudson.model.ParameterValue; +import hudson.model.TaskListener; +import hudson.model.AbstractBuild; +import hudson.model.AbstractProject; +import hudson.model.BooleanParameterDefinition; +import hudson.model.ChoiceParameterDefinition; +import hudson.model.Descriptor; +import hudson.model.FileParameterValue; +import hudson.model.Hudson; +import hudson.model.ParameterDefinition; +import hudson.model.ParametersAction; +import hudson.model.ParametersDefinitionProperty; +import hudson.model.StringParameterDefinition; +import hudson.model.StringParameterValue; +//import hudson.scm.SubversionSCM; +//import hudson.scm.SubversionSCM.ModuleLocation; import hudson.tasks.Builder; import hudson.util.FormValidation; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Properties; @@ -16,12 +37,23 @@ import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.QueryParameter; +//import com.tikal.jenkins.plugins.multijob.scm.MultiJobScm; + public class PhaseJobsConfig implements Describable { private String jobName; private String jobProperties; private boolean currParams; + private boolean exposedSCM; + public boolean isExposedSCM() { + return currParams; + } + + public void setExposedSCM(boolean exposedSCM) { + this.exposedSCM = exposedSCM; + } + public boolean isCurrParams() { return currParams; } @@ -91,11 +123,14 @@ public FormValidation doCheckJobName(@QueryParameter String value) { } return result; } + + private void savePhaseJobConfigParameters(String localJobName) { AbstractProject project = ((AbstractProject) Hudson.getInstance().getItem(localJobName)); List parameterDefinitions = getParameterDefinition(project); StringBuilder sb = new StringBuilder(); + // ArrayList scmLocation = null; for (ParameterDefinition pdef : parameterDefinitions) { String paramValue = null; if (pdef instanceof StringParameterDefinition) { @@ -107,6 +142,7 @@ private void savePhaseJobConfigParameters(String localJobName) { } sb.append(pdef.getName()).append("=").append(paramValue).append("\n"); } + AbstractProject item = getCurrentJob(); if (item instanceof MultiJobProject) { @@ -120,13 +156,29 @@ private void savePhaseJobConfigParameters(String localJobName) { for (PhaseJobsConfig phaseJob : phaseJobs) { if (phaseJob.getJobName().equals(localJobName)) { phaseJob.setJobProperties(sb.toString()); +// if (phaseJob.isExposedSCM()){ +// if (parentProject.getScm().getType().equals(MultiJobScm.class.getName())){ +// ((MultiJobScm)parentProject.getScm()).addScm(project, project.getScm()); +// } +// } save(); } } } } + } +// if (parentProject.getScm().getType().equals(MultiJobScm.class.getName()) && scmLocation !=null){ +// scmLocation.addAll(Arrays.asList(((SubversionSCM)parentProject.getScm()).getLocations())); +// SubversionSCM scm =new SubversionSCM(scmLocation, ((SubversionSCM)parentProject.getScm()).getWorkspaceUpdater(),((SubversionSCM)parentProject.getScm()).getBrowser(),((SubversionSCM)parentProject.getScm()).getExcludedRegions(),((SubversionSCM)parentProject.getScm()).getExcludedUsers(), ((SubversionSCM)parentProject.getScm()).getExcludedRevprop(),((SubversionSCM)parentProject.getScm()).getExcludedCommitMessages(), ((SubversionSCM)parentProject.getScm()).getIncludedRegions()); +// try { +// parentProject.setScm(scm); +// } catch (IOException e) { +// e.fillInStackTrace(); +// } +// } } + } private AbstractProject getCurrentJob() { diff --git a/src/main/java/com/tikal/jenkins/plugins/multijob/views/MultiJobView.java b/src/main/java/com/tikal/jenkins/plugins/multijob/views/MultiJobView.java index 75cec6e7..e41b2d82 100644 --- a/src/main/java/com/tikal/jenkins/plugins/multijob/views/MultiJobView.java +++ b/src/main/java/com/tikal/jenkins/plugins/multijob/views/MultiJobView.java @@ -29,7 +29,6 @@ import javax.servlet.ServletException; - import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.QueryParameter; import org.kohsuke.stapler.StaplerRequest; @@ -42,8 +41,8 @@ public class MultiJobView extends ListView { - private DescribableList> columns = new DescribableList>(this, - MultiJobListViewColumn.createDefaultInitialColumnList()); + private DescribableList> columns = new DescribableList>( + this, MultiJobListViewColumn.createDefaultInitialColumnList()); @DataBoundConstructor public MultiJobView(String name) { @@ -55,7 +54,7 @@ public MultiJobView(String name, ViewGroup owner) { } @Override - public Iterable getColumns() { + public DescribableList> getColumns() { return columns; } @@ -68,7 +67,8 @@ public String getDisplayName() { /** * Checks if the include regular expression is valid. */ - public FormValidation doCheckIncludeRegex(@QueryParameter String value) throws IOException, ServletException, InterruptedException { + public FormValidation doCheckIncludeRegex(@QueryParameter String value) + throws IOException, ServletException, InterruptedException { String v = Util.fixEmpty(value); if (v != null) { try { @@ -102,34 +102,44 @@ public List getRootItem(MultiJobProject multiJobProject) { return out; } - private void addTopLevelProject(MultiJobProject project, List out) { + private void addTopLevelProject(MultiJobProject project, + List out) { addMultiProject(null, project, createBuildState(project), 0, null, out); } @SuppressWarnings("rawtypes") - private void addMultiProject(MultiJobProject parent, MultiJobProject project, BuildState buildState, int nestLevel, String phaseName, List out) { + private void addMultiProject(MultiJobProject parent, + MultiJobProject project, BuildState buildState, int nestLevel, + String phaseName, List out) { out.add(new ProjectWrapper(parent, project, buildState, nestLevel)); List builders = project.getBuilders(); for (Builder builder : builders) { int phaseNestLevel = nestLevel + 1; if (builder instanceof MultiJobBuilder) { MultiJobBuilder reactorBuilder = (MultiJobBuilder) builder; - List subProjects = reactorBuilder.getPhaseJobs(); + List subProjects = reactorBuilder + .getPhaseJobs(); String currentPhaseName = reactorBuilder.getPhaseName(); - PhaseWrapper phaseWrapper = new PhaseWrapper(phaseNestLevel, currentPhaseName); + PhaseWrapper phaseWrapper = new PhaseWrapper(phaseNestLevel, + currentPhaseName); out.add(phaseWrapper); for (PhaseJobsConfig projectConfig : subProjects) { - TopLevelItem tli = Hudson.getInstance().getItem(projectConfig.getJobName()); + TopLevelItem tli = Hudson.getInstance().getItem( + projectConfig.getJobName()); if (tli instanceof MultiJobProject) { MultiJobProject subProject = (MultiJobProject) tli; - BuildState jobBuildState = createBuildState(buildState, project, subProject); + BuildState jobBuildState = createBuildState(buildState, + project, subProject); phaseWrapper.addChildBuildState(jobBuildState); - addMultiProject(project, subProject, jobBuildState, phaseNestLevel + 1, currentPhaseName, out); + addMultiProject(project, subProject, jobBuildState, + phaseNestLevel + 1, currentPhaseName, out); } else { AbstractProject subProject = (AbstractProject) tli; - BuildState jobBuildState = createBuildState(buildState, project, subProject); + BuildState jobBuildState = createBuildState(buildState, + project, subProject); phaseWrapper.addChildBuildState(jobBuildState); - addSimpleProject(project, subProject, jobBuildState, phaseNestLevel + 1, out); + addSimpleProject(project, subProject, jobBuildState, + phaseNestLevel + 1, out); } } } @@ -137,20 +147,27 @@ private void addMultiProject(MultiJobProject parent, MultiJobProject project, Bu } @SuppressWarnings("rawtypes") - private void addSimpleProject(MultiJobProject parent, AbstractProject project, BuildState buildState, int nestLevel, List out) { + private void addSimpleProject(MultiJobProject parent, + AbstractProject project, BuildState buildState, int nestLevel, + List out) { out.add(new ProjectWrapper(parent, project, buildState, nestLevel)); } @SuppressWarnings({ "rawtypes" }) - private BuildState createBuildState(BuildState parentBuildState, MultiJobProject multiJobProject, AbstractProject project) { + private BuildState createBuildState(BuildState parentBuildState, + MultiJobProject multiJobProject, AbstractProject project) { int previousBuildNumber = 0; int lastBuildNumber = 0; int lastSuccessBuildNumber = 0; int lastFailureBuildNumber = 0; - MultiJobBuild previousParentBuild = multiJobProject.getBuildByNumber(parentBuildState.getPreviousBuildNumber()); - MultiJobBuild lastParentBuild = multiJobProject.getBuildByNumber(parentBuildState.getLastBuildNumber()); - MultiJobBuild lastParentSuccessBuild = multiJobProject.getBuildByNumber(parentBuildState.getLastSuccessBuildNumber()); - MultiJobBuild lastParentFailureBuild = multiJobProject.getBuildByNumber(parentBuildState.getLastFailureBuildNumber()); + MultiJobBuild previousParentBuild = multiJobProject + .getBuildByNumber(parentBuildState.getPreviousBuildNumber()); + MultiJobBuild lastParentBuild = multiJobProject + .getBuildByNumber(parentBuildState.getLastBuildNumber()); + MultiJobBuild lastParentSuccessBuild = multiJobProject + .getBuildByNumber(parentBuildState.getLastSuccessBuildNumber()); + MultiJobBuild lastParentFailureBuild = multiJobProject + .getBuildByNumber(parentBuildState.getLastFailureBuildNumber()); if (previousParentBuild != null) { List subBuilds = previousParentBuild.getSubBuilds(); for (SubBuild subBuild : subBuilds) { @@ -171,12 +188,16 @@ private BuildState createBuildState(BuildState parentBuildState, MultiJobProject List subBuilds = lastParentSuccessBuild.getSubBuilds(); for (SubBuild subBuild : subBuilds) { if (subBuild.getJobName().equals(project.getName())) { - AbstractBuild build = (AbstractBuild) project.getBuildByNumber(subBuild.getBuildNumber()); - if (build != null && Result.SUCCESS.equals(build.getResult())) { + AbstractBuild build = (AbstractBuild) project + .getBuildByNumber(subBuild.getBuildNumber()); + if (build != null + && Result.SUCCESS.equals(build.getResult())) { lastSuccessBuildNumber = subBuild.getBuildNumber(); break; } else { - lastParentSuccessBuild = multiJobProject.getBuildByNumber(parentBuildState.getPreviousBuildNumber()); + lastParentSuccessBuild = multiJobProject + .getBuildByNumber(parentBuildState + .getPreviousBuildNumber()); } } } @@ -185,38 +206,53 @@ private BuildState createBuildState(BuildState parentBuildState, MultiJobProject List subBuilds = lastParentFailureBuild.getSubBuilds(); for (SubBuild subBuild : subBuilds) { if (subBuild.getJobName().equals(project.getName())) { - AbstractBuild build = (AbstractBuild) project.getBuildByNumber(subBuild.getBuildNumber()); - if (build != null && Result.FAILURE.equals(((AbstractBuild)build).getResult())) { + AbstractBuild build = (AbstractBuild) project + .getBuildByNumber(subBuild.getBuildNumber()); + if (build != null + && Result.FAILURE.equals(((AbstractBuild) build) + .getResult())) { lastFailureBuildNumber = subBuild.getBuildNumber(); break; } else { - lastParentFailureBuild = multiJobProject.getBuildByNumber(parentBuildState.getPreviousBuildNumber()); + lastParentFailureBuild = multiJobProject + .getBuildByNumber(parentBuildState + .getPreviousBuildNumber()); } } } } - return new BuildState(project.getName(), previousBuildNumber, lastBuildNumber, lastSuccessBuildNumber, lastFailureBuildNumber); + return new BuildState(project.getName(), previousBuildNumber, + lastBuildNumber, lastSuccessBuildNumber, lastFailureBuildNumber); } private BuildState createBuildState(MultiJobProject project) { MultiJobBuild lastBuild = project.getLastBuild(); - MultiJobBuild previousBuild = lastBuild == null ? null : lastBuild.getPreviousBuild(); + MultiJobBuild previousBuild = lastBuild == null ? null : lastBuild + .getPreviousBuild(); MultiJobBuild lastSuccessfulBuild = project.getLastSuccessfulBuild(); MultiJobBuild lastFailedBuild = project.getLastFailedBuild(); - return new BuildState(project.getName(), previousBuild == null ? 0 : previousBuild.getNumber(), lastBuild == null ? 0 : lastBuild.getNumber(), - lastSuccessfulBuild == null ? 0 : lastSuccessfulBuild.getNumber(), lastFailedBuild == null ? 0 : lastFailedBuild.getNumber()); + return new BuildState(project.getName(), previousBuild == null ? 0 + : previousBuild.getNumber(), lastBuild == null ? 0 + : lastBuild.getNumber(), lastSuccessfulBuild == null ? 0 + : lastSuccessfulBuild.getNumber(), lastFailedBuild == null ? 0 + : lastFailedBuild.getNumber()); } @Override - protected void submit(StaplerRequest req) throws ServletException, FormException, IOException { + protected void submit(StaplerRequest req) throws ServletException, + FormException, IOException { } protected void initColumns() { try { Field field = ListView.class.getDeclaredField("columns"); field.setAccessible(true); - field.set(this, new DescribableList>(this, MultiJobListViewColumn.createDefaultInitialColumnList())); + field.set( + this, + new DescribableList>( + this, MultiJobListViewColumn + .createDefaultInitialColumnList())); } catch (Exception e) { e.printStackTrace(); } diff --git a/src/main/java/com/tikal/jenkins/plugins/multijob/views/PhaseWrapper.java b/src/main/java/com/tikal/jenkins/plugins/multijob/views/PhaseWrapper.java index 289b73d0..14d0e8e7 100644 --- a/src/main/java/com/tikal/jenkins/plugins/multijob/views/PhaseWrapper.java +++ b/src/main/java/com/tikal/jenkins/plugins/multijob/views/PhaseWrapper.java @@ -1,6 +1,8 @@ package com.tikal.jenkins.plugins.multijob.views; import hudson.model.BallColor; +import hudson.model.Item; +import hudson.model.ItemGroup; import hudson.model.Result; import hudson.model.AbstractBuild; import hudson.model.AbstractProject; @@ -57,8 +59,10 @@ public BallColor getIconColor() { Result result = null; AbstractBuild worseBuild = null; for (BuildState buildState : childrenBuildState) { - AbstractProject project = (AbstractProject) Hudson.getInstance().getItem(buildState.getJobName()); - AbstractBuild build = (AbstractBuild) project.getBuildByNumber(buildState.getLastBuildNumber()); + AbstractProject project = (AbstractProject) Hudson.getInstance() + .getItem(buildState.getJobName()); + AbstractBuild build = (AbstractBuild) project + .getBuildByNumber(buildState.getLastBuildNumber()); if (build != null) { if (result == null) { result = build.getResult(); @@ -98,4 +102,16 @@ public boolean isPhase() { public void addChildBuildState(BuildState jobBuildState) { childrenBuildState.add(jobBuildState); } + + @Override + public String getRelativeNameFrom(ItemGroup g) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getRelativeNameFrom(Item item) { + // TODO Auto-generated method stub + return null; + } } diff --git a/src/main/java/com/tikal/jenkins/plugins/multijob/views/ProjectWrapper.java b/src/main/java/com/tikal/jenkins/plugins/multijob/views/ProjectWrapper.java index 55e68a11..984d4f33 100644 --- a/src/main/java/com/tikal/jenkins/plugins/multijob/views/ProjectWrapper.java +++ b/src/main/java/com/tikal/jenkins/plugins/multijob/views/ProjectWrapper.java @@ -35,7 +35,8 @@ public class ProjectWrapper extends AbstractWrapper { final int nestLevel; - public ProjectWrapper(MultiJobProject multijob, AbstractProject project, BuildState buildState, int nestLevel) { + public ProjectWrapper(MultiJobProject multijob, AbstractProject project, + BuildState buildState, int nestLevel) { this.project = project; this.multijob = multijob; this.nestLevel = nestLevel; @@ -77,7 +78,8 @@ public String getAbsoluteUrl() { } @SuppressWarnings("unchecked") - public void onLoad(ItemGroup parent, String name) throws IOException { + public void onLoad(ItemGroup parent, String name) + throws IOException { project.onLoad(parent, name); } @@ -121,7 +123,8 @@ public ACL getACL() { return project.getACL(); } - public void checkPermission(Permission permission) throws AccessDeniedException { + public void checkPermission(Permission permission) + throws AccessDeniedException { project.checkPermission(permission); } @@ -138,7 +141,8 @@ public int getNestLevel() { } public TopLevelItemDescriptor getDescriptor() { - return (TopLevelItemDescriptor) project.getDescriptorByName(project.getClass().getName()); + return (TopLevelItemDescriptor) project.getDescriptorByName(project + .getClass().getName()); } Run findLastBuildForResult(Result result) { @@ -146,10 +150,12 @@ Run findLastBuildForResult(Result result) { return null; } if (Result.SUCCESS.equals(result)) { - return project.getBuildByNumber(buildState.getLastSuccessBuildNumber()); + return project.getBuildByNumber(buildState + .getLastSuccessBuildNumber()); } if (Result.FAILURE.equals(result)) { - return project.getBuildByNumber(buildState.getLastFailureBuildNumber()); + return project.getBuildByNumber(buildState + .getLastFailureBuildNumber()); } return project.getBuildByNumber(buildState.getLastBuildNumber()); } @@ -207,4 +213,16 @@ public boolean isBuildable() { return multijob == null && getProject().isBuildable(); } + @Override + public String getRelativeNameFrom(ItemGroup g) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getRelativeNameFrom(Item item) { + // TODO Auto-generated method stub + return null; + } + } diff --git a/src/main/resources/com/tikal/jenkins/plugins/multijob/MultiJobBuilder/config.jelly b/src/main/resources/com/tikal/jenkins/plugins/multijob/MultiJobBuilder/config.jelly index e12f067d..115623b3 100644 --- a/src/main/resources/com/tikal/jenkins/plugins/multijob/MultiJobBuilder/config.jelly +++ b/src/main/resources/com/tikal/jenkins/plugins/multijob/MultiJobBuilder/config.jelly @@ -11,7 +11,9 @@ help="/plugin/jenkins-multijob-plugin/help-jobName.html"> + + @@ -20,6 +22,10 @@ help="/plugin/jenkins-multijob-plugin/help-currParams.html"> + + +
diff --git a/src/main/resources/com/tikal/jenkins/plugins/multijob/MultiJobChangeLogSet/digest.jelly b/src/main/resources/com/tikal/jenkins/plugins/multijob/MultiJobChangeLogSet/digest.jelly new file mode 100644 index 00000000..a2271fde --- /dev/null +++ b/src/main/resources/com/tikal/jenkins/plugins/multijob/MultiJobChangeLogSet/digest.jelly @@ -0,0 +1,27 @@ + + + + ${%No changes.} + diff --git a/src/main/resources/com/tikal/jenkins/plugins/multijob/scm/MultiJobScm/config.jelly b/src/main/resources/com/tikal/jenkins/plugins/multijob/scm/MultiJobScm/config.jelly new file mode 100644 index 00000000..ed912234 --- /dev/null +++ b/src/main/resources/com/tikal/jenkins/plugins/multijob/scm/MultiJobScm/config.jelly @@ -0,0 +1,26 @@ + + + + \ No newline at end of file diff --git a/src/main/webapp/help-repository.html b/src/main/webapp/help-repository.html new file mode 100644 index 00000000..da508fd7 --- /dev/null +++ b/src/main/webapp/help-repository.html @@ -0,0 +1,3 @@ +
+ Exposed the repository to "Multi Job" to allow pull SCM mode +
diff --git a/src/test/java/com/tikal/jenkins/plugins/multijob/test/AggregateChangesTest.java b/src/test/java/com/tikal/jenkins/plugins/multijob/test/AggregateChangesTest.java new file mode 100644 index 00000000..bb13e5d0 --- /dev/null +++ b/src/test/java/com/tikal/jenkins/plugins/multijob/test/AggregateChangesTest.java @@ -0,0 +1,17 @@ +package com.tikal.jenkins.plugins.multijob.test; + +import hudson.cli.CreateJobCommand; + +import org.junit.Test; + +import com.tikal.jenkins.plugins.multijob.MultiJobProject; + +public class AggregateChangesTest extends MultiJobProjectTestCase { + + + public void test() throws Exception { + //MultiJobProject multiJobProject= createMultiJobProject("MultiProject"); + //multiJobProject.getAllJobs().add(createFreeStyleProject("job1")); + } + +} diff --git a/src/test/java/com/tikal/jenkins/plugins/multijob/test/MultiJobProjectTestCase.java b/src/test/java/com/tikal/jenkins/plugins/multijob/test/MultiJobProjectTestCase.java new file mode 100644 index 00000000..b4139ead --- /dev/null +++ b/src/test/java/com/tikal/jenkins/plugins/multijob/test/MultiJobProjectTestCase.java @@ -0,0 +1,13 @@ +package com.tikal.jenkins.plugins.multijob.test; + +import java.io.IOException; + +import org.jvnet.hudson.test.HudsonTestCase; + +import com.tikal.jenkins.plugins.multijob.MultiJobProject; + +public class MultiJobProjectTestCase extends HudsonTestCase { + protected MultiJobProject createMultiJobProject(String name) throws IOException { + return hudson.createProject(MultiJobProject.class,name); + } +}