You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 27, 2025. It is now read-only.
When you set up the **Build Steps** section of the project configuration window, the plugin provides you with three build steps:
@@ -69,7 +69,9 @@ You can specify build options for your MATLAB build by first selecting **Build o
69
69
70
70
MATLAB exits with exit code 0 if the specified tasks run without error. Otherwise, MATLAB terminates with a nonzero exit code, which causes the step to fail.
71
71
72
-
You can access the result of running a MATLAB build interactively in your Jenkins interface. After your build runs, the Jenkins build summary page displays the number of tasks that ran, failed, and were skipped. If your build ran successfully, you can click the **MATLAB Build Result** link on the page to access the table of task results. This table provides information about each task that was part of the MATLAB build. Clicking a task name in the table displays relevant build log information on the **Console Output** page.
72
+
Starting in R2024a, you can access the result of running a MATLAB build interactively in your Jenkins interface. After your build runs, the Jenkins build summary page displays the number of tasks that ran, failed, and were skipped. You can click the **MATLAB Build Results** link on the page to access the table of task results. The table provides information about each task that was part of the MATLAB build. Clicking a task name in the table displays relevant build log information on the **Console Output** page.
The **Run MATLAB Tests** build step lets you run MATLAB and Simulink tests and generate artifacts, such as test results in JUnit-style XML format and code coverage results in Cobertura XML format. By default, the plugin includes any test files in your [MATLAB project](https://www.mathworks.com/help/matlab/projects.html) that have a `Test` label. If your build does not use a MATLAB project, or if it uses a MATLAB release before R2019a, then the plugin includes all tests in the root of your repository and in any of its subfolders.
@@ -201,16 +203,16 @@ You can also define your pipeline directly in the project configuration window.
201
203
### Add MATLAB to System Path
202
204
When the plugin executes steps that use MATLAB in your pipeline, the plugin uses the topmost MATLAB version on the system path. If the `PATH` environment variable of the build agent does not include any MATLAB versions, you must update the variable with the MATLAB root folder that should be used for the build.
203
205
204
-
To update the `PATH` environment variable using declarative pipeline syntax, use an `environment` block in your `Jenkinsfile`. For example, prepend MATLAB R2023b to the `PATH` environment variable and use it to run your command.
206
+
To update the `PATH` environment variable using declarative pipeline syntax, use an `environment` block in your `Jenkinsfile`. For example, prepend MATLAB R2024a to the `PATH` environment variable and use it to run your command.
205
207
206
208
```groovy
207
209
// Declarative Pipeline
208
210
pipeline {
209
211
agent any
210
212
environment {
211
-
PATH = "C:\\Program Files\\MATLAB\\R2023b\\bin;${PATH}" // Windows agent
212
-
// PATH = "/usr/local/MATLAB/R2023b/bin:${PATH}" // Linux agent
You can access the result of running a MATLAB build interactively in your Jenkins interface. After your build runs, the Jenkins build summary page displays the number of tasks that ran, failed, and were skipped. If your build ran successfully, you can click the **MATLAB Build Result** link on the page to access the table of task results. This table provides information about each task that was part of the MATLAB build. Clicking a task name in the table displays relevant build log information on the **Console Output** page.
273
+
Starting in R2024a, you can access the result of running a MATLAB build interactively in your Jenkins interface. After your build runs, the Jenkins build summary page displays the number of tasks that ran, failed, and were skipped. You can click the **MATLAB Build Results** link on the page to access the table of task results. The table provides information about each task that was part of the MATLAB build. Clicking a task name in the table displays relevant build log information on the **Console Output** page.
272
274
273
275
### Use the `runMATLABTests` Step
274
276
Use the `runMATLABTests` step in your pipeline to run MATLAB and Simulink tests and generate test and coverage artifacts. By default, the plugin includes any test files in your [MATLAB project](https://www.mathworks.com/help/matlab/projects.html) that have a `Test` label. If your pipeline does not use a MATLAB project, or if it uses a MATLAB release before R2019a, then the plugin includes all tests in the root of your repository and in any of its subfolders.
@@ -390,7 +392,7 @@ When you use the `runMATLABCommand` step, all the required files must be on the
390
392
### Use MATLAB in Matrix Build
391
393
Like multi-configuration projects, you can use MATLAB as part of a [matrix](https://www.jenkins.io/doc/book/pipeline/syntax/#declarative-matrix) build in pipeline projects. For example, you can define a pipeline to run your test suite on different platforms or against different versions of MATLAB.
392
394
393
-
This example defines a declarative pipeline to run your MATLAB code and generate artifacts using MATLAB R2022b, R2023a, and R2023b. The pipeline has a `matrix` block to define the possible name-value combinations that should run in parallel.
395
+
This example defines a declarative pipeline to run your MATLAB code and generate artifacts using MATLAB R2022b, R2023b, and R2024a. The pipeline has a `matrix` block to define the possible name-value combinations that should run in parallel.
394
396
395
397
```groovy
396
398
// Declarative Pipeline
@@ -406,7 +408,7 @@ pipeline {
406
408
axes {
407
409
axis {
408
410
name 'MATLAB_VERSION'
409
-
values 'R2022b', 'R2023a', 'R2023b'
411
+
values 'R2022b', 'R2023b', 'R2024a'
410
412
}
411
413
}
412
414
stages {
@@ -440,26 +442,26 @@ To register a MATLAB version as a Jenkins tool:
440
442
3) Specify the name you want to assign to the MATLAB version in the **Name** box, and enter the full path to its root folder in the **MATLAB root** box. To register the MATLAB version as a tool, do not select **Install automatically**.
441
443
4) To confirm your choices, click **Save** at the bottom of the page.
442
444
443
-
For example, register MATLAB R2023b as a Jenkins tool on your Windows local agent.
445
+
For example, register MATLAB R2024a as a Jenkins tool on your Windows local agent.
If your Jenkins instance includes remote agents, you can register MATLAB as a tool on the remote agents using the tool name that you specified on the local agent. For example, if you registered MATLAB R2023b as a tool on your local agent, you can register the same MATLAB version installed on a remote agent as a tool on that agent. To register a MATLAB version as a Jenkins tool on a remote agent:
449
+
If your Jenkins instance includes remote agents, you can register MATLAB as a tool on the remote agents using the tool name that you specified on the local agent. For example, if you registered MATLAB R2024a as a tool on your local agent, you can register the same MATLAB version installed on a remote agent as a tool on that agent. To register a MATLAB version as a Jenkins tool on a remote agent:
448
450
449
451
1) Navigate to the **Node Properties** interface of the agent. You can access this interface by selecting **Manage Jenkins > Nodes**, following the link corresponding to the agent, and then selecting **Configure** on the left.
450
452
2) Select **Tool Locations**. Then, select the tool name from the **Name** list. The list contains the names assigned to the registered MATLAB versions on the local agent.
451
453
3) In the **Home** box, enter the full path to the MATLAB root folder on the remote agent.
452
454
4) Click **Save** to confirm your choices.
453
455
454
456
### Use MATLAB as a Tool in Pipeline Project
455
-
To invoke MATLAB as a Jenkins tool using declarative pipeline syntax, use a `tools` block in your `Jenkinsfile`. To specify the tool in the block, use the `matlab` keyword followed by the name assigned to the tool on the **Tools** page. For example, run `myscript.m` using the MATLAB version that has been registered as a tool named R2023b.
457
+
To invoke MATLAB as a Jenkins tool using declarative pipeline syntax, use a `tools` block in your `Jenkinsfile`. To specify the tool in the block, use the `matlab` keyword followed by the name assigned to the tool on the **Tools** page. For example, run `myscript.m` using the MATLAB version that has been registered as a tool named R2024a.
456
458
457
459
```groovy
458
460
// Declarative Pipeline
459
461
pipeline {
460
462
agent any
461
463
tools {
462
-
matlab 'R2023b'
464
+
matlab 'R2024a'
463
465
}
464
466
stages {
465
467
stage('Run MATLAB Command') {
@@ -478,7 +480,7 @@ If you define your pipeline using scripted pipeline syntax, use the `tool` keywo
478
480
node {
479
481
def matlabver
480
482
stage('Run MATLAB Command') {
481
-
matlabver = tool 'R2023b'
483
+
matlabver = tool 'R2024a'
482
484
if (isUnix()) {
483
485
env.PATH = "${matlabver}/bin:${env.PATH}" // Linux or macOS agent
0 commit comments