This repository was archived by the owner on Mar 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed
main/java/com/mathworks/ci
test/java/com/mathworks/ci Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -26,14 +26,19 @@ public class RunMatlabBuildStep extends Step {
2626 private String tasks ;
2727
2828 @ DataBoundConstructor
29- public RunMatlabBuildStep (String tasks ) {
30- this . tasks = tasks ;
29+ public RunMatlabBuildStep () {
30+
3131 }
3232
3333 public String getTasks () {
3434 return Util .fixNull (tasks );
3535 }
3636
37+ @ DataBoundSetter
38+ public void setTasks (String tasks ) {
39+ this .tasks = tasks ;
40+ }
41+
3742 @ Override
3843 public StepExecution start (StepContext context ) throws Exception {
3944 return new MatlabBuildStepExecution (context , getTasks ());
Original file line number Diff line number Diff line change @@ -87,6 +87,18 @@ public void verifyPipelineOnSlave() throws Exception {
8787 j .assertBuildStatusSuccess (build );
8888 }
8989
90+ /*
91+ * Verify build runs with default tasks if no tasks are specified
92+ */
93+ @ Test
94+ public void verifyRunsWithDefaultTasks () throws Exception {
95+ project .setDefinition (
96+ new CpsFlowDefinition ("node { runMATLABBuild() }" , true ));
97+
98+ WorkflowRun build = project .scheduleBuild2 (0 ).get ();
99+ j .assertLogContains ("buildtool" , build );
100+ }
101+
90102 /*
91103 * Verify appropriate task is invoked as in pipeline script
92104 */
Original file line number Diff line number Diff line change 2020
2121public class RunMatlabBuildStepTester extends RunMatlabBuildStep {
2222 @ DataBoundConstructor
23- public RunMatlabBuildStepTester (String tasks ) {
24- super ( tasks );
23+ public RunMatlabBuildStepTester () {
24+
2525 }
26-
26+
2727 @ Override
2828 public StepExecution start (StepContext context ) throws Exception {
2929 return new TestStepExecution (context ,this .getTasks ());
You can’t perform that action at this time.
0 commit comments