Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit f834e90

Browse files
committed
Created local environmnet varibales.
1 parent 04f428f commit f834e90

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

src/main/java/com/mathworks/ci/RunMatlabCommandBuilder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ public void perform(@Nonnull Run<?, ?> build, @Nonnull FilePath workspace,
9696
@Nonnull Launcher launcher, @Nonnull TaskListener listener)
9797
throws InterruptedException, IOException {
9898

99-
// Set the environment variable specific to the this build
100-
//setEnv(build.getEnvironment(listener));
99+
// Get the environment variable specific to the this build
100+
final EnvVars env = build.getEnvironment(listener);
101101

102102
// Invoke MATLAB command and transfer output to standard
103103
// Output Console
104104

105105

106-
buildResult = execMatlabCommand(workspace, launcher, listener, build.getEnvironment(listener));
106+
buildResult = execMatlabCommand(workspace, launcher, listener, env);
107107

108108
if (buildResult != 0) {
109109
build.setResult(Result.FAILURE);

src/main/java/com/mathworks/ci/RunMatlabTestsBuilder.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,6 @@ private Artifact getArtifactObject(boolean isChecked, Artifact returnVal) {
179179
return (isChecked) ? returnVal : new NullArtifact();
180180
}
181181

182-
private void setEnv(EnvVars env) {
183-
this.env = env;
184-
}
185-
186-
private EnvVars getEnv() {
187-
return this.env;
188-
}
189182

190183
// To retain Backward compatibility
191184
protected Object readResolve() {
@@ -257,13 +250,13 @@ public void perform(@Nonnull Run<?, ?> build, @Nonnull FilePath workspace,
257250
@Nonnull Launcher launcher, @Nonnull TaskListener listener)
258251
throws InterruptedException, IOException {
259252

260-
// Set the environment variable specific to the this build
261-
//setEnv(build.getEnvironment(listener));
253+
// Get the environment variable specific to the this build
254+
final EnvVars env = build.getEnvironment(listener);
262255

263256
// Invoke MATLAB command and transfer output to standard
264257
// Output Console
265258

266-
buildResult = execMatlabCommand(workspace, launcher, listener, build.getEnvironment(listener));
259+
buildResult = execMatlabCommand(workspace, launcher, listener, env);
267260

268261
if (buildResult != 0) {
269262
build.setResult(Result.FAILURE);

0 commit comments

Comments
 (0)