This repository was archived by the owner on Mar 27, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-14
lines changed
src/main/java/com/mathworks/ci Expand file tree Collapse file tree 2 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 22
33import java .io .IOException ;
44import org .jenkinsci .plugins .workflow .steps .StepContext ;
5- import org .jenkinsci .plugins .workflow .steps .StepExecution ;
5+ import org .jenkinsci .plugins .workflow .steps .SynchronousNonBlockingStepExecution ;
66import hudson .EnvVars ;
77import hudson .FilePath ;
88import hudson .Launcher ;
99import hudson .Launcher .ProcStarter ;
1010import hudson .model .Result ;
1111import hudson .model .TaskListener ;
1212
13- public class MatlabCommandStepExecution extends StepExecution implements MatlabBuild {
13+ public class MatlabCommandStepExecution extends SynchronousNonBlockingStepExecution < Void > implements MatlabBuild {
1414
1515 private static final long serialVersionUID = 1957239693658914450L ;
1616
@@ -32,7 +32,7 @@ private void setEnv(EnvVars env) {
3232 }
3333
3434 @ Override
35- public boolean start () throws Exception {
35+ public Void run () throws Exception {
3636 final Launcher launcher = getContext ().get (Launcher .class );
3737 final FilePath workspace = getContext ().get (FilePath .class );
3838 final TaskListener listener = getContext ().get (TaskListener .class );
@@ -47,10 +47,7 @@ public boolean start() throws Exception {
4747
4848 getContext ().setResult ((res == 0 ) ? Result .SUCCESS : Result .FAILURE );
4949
50- getContext ().onSuccess (true );
51-
52- //return false represents the asynchronous run.
53- return false ;
50+ return null ;
5451 }
5552
5653 @ Override
Original file line number Diff line number Diff line change 77
88import java .io .IOException ;
99import org .jenkinsci .plugins .workflow .steps .StepContext ;
10- import org .jenkinsci .plugins .workflow .steps .StepExecution ;
10+ import org .jenkinsci .plugins .workflow .steps .SynchronousNonBlockingStepExecution ;
1111import hudson .EnvVars ;
1212import hudson .FilePath ;
1313import hudson .Launcher ;
1414import hudson .Launcher .ProcStarter ;
1515import hudson .model .Result ;
1616import hudson .model .TaskListener ;
1717
18- public class MatlabRunTestsStepExecution extends StepExecution implements MatlabBuild {
18+ public class MatlabRunTestsStepExecution extends SynchronousNonBlockingStepExecution < Void > implements MatlabBuild {
1919
2020 private static final long serialVersionUID = 6704588180717665100L ;
2121
@@ -32,7 +32,7 @@ private String getCommand() {
3232 }
3333
3434 @ Override
35- public boolean start () throws Exception {
35+ public Void run () throws Exception {
3636 final Launcher launcher = getContext ().get (Launcher .class );
3737 final FilePath workspace = getContext ().get (FilePath .class );
3838 final TaskListener listener = getContext ().get (TaskListener .class );
@@ -46,10 +46,7 @@ public boolean start() throws Exception {
4646
4747 getContext ().setResult ((res == 0 ) ? Result .SUCCESS : Result .FAILURE );
4848
49- getContext ().onSuccess (true );
50-
51- //return false represents the asynchronous run.
52- return false ;
49+ return null ;
5350 }
5451
5552 @ Override
You can’t perform that action at this time.
0 commit comments