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

Commit 42ec3e5

Browse files
authored
adding a new screenshot for build results and minor updates (#304)
1 parent 0efab01 commit 42ec3e5

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

CONFIGDOC.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ You can use the [`matlabroot`](https://www.mathworks.com/help/matlab/ref/matlabr
3939

4040
| Platform | Path to MATLAB Root Folder |
4141
|--------------|---------------------------------|
42-
| Windows | C:\Program Files\MATLAB\R2023b |
43-
| Linux® | /usr/local/MATLAB/R2023b |
44-
| macOS | /Applications/MATLAB_R2023b.app |
42+
| Windows | C:\Program Files\MATLAB\R2024a |
43+
| Linux® | /usr/local/MATLAB/R2024a |
44+
| macOS | /Applications/MATLAB_R2024a.app |
4545

4646
### Specify Build Steps
4747
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
6969

7070
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.
7171

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.
73+
74+
![matlab_build_results](https://github.com/mathworks/jenkins-matlab-plugin/assets/48831250/bf3a8f01-12d6-436e-8a9e-10f465a98f6a)
7375

7476
#### Run MATLAB Tests
7577
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.
201203
### Add MATLAB to System Path
202204
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.
203205

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.
205207

206208
```groovy
207209
// Declarative Pipeline
208210
pipeline {
209211
agent any
210212
environment {
211-
PATH = "C:\\Program Files\\MATLAB\\R2023b\\bin;${PATH}" // Windows agent
212-
// PATH = "/usr/local/MATLAB/R2023b/bin:${PATH}" // Linux agent
213-
// PATH = "/Applications/MATLAB_R2023b.app/bin:${PATH}" // macOS agent
213+
PATH = "C:\\Program Files\\MATLAB\\R2024a\\bin;${PATH}" // Windows agent
214+
// PATH = "/usr/local/MATLAB/R2024a/bin:${PATH}" // Linux agent
215+
// PATH = "/Applications/MATLAB_R2024a.app/bin:${PATH}" // macOS agent
214216
}
215217
stages {
216218
stage('Run MATLAB Command') {
@@ -227,9 +229,9 @@ If you define your pipeline using scripted pipeline syntax, set the `PATH` envir
227229
```groovy
228230
// Scripted Pipeline
229231
node {
230-
env.PATH = "C:\\Program Files\\MATLAB\\R2023b\\bin;${env.PATH}" // Windows agent
231-
// env.PATH = "/usr/local/MATLAB/R2023b/bin:${env.PATH}" // Linux agent
232-
// env.PATH = "/Applications/MATLAB_R2023b.app/bin:${env.PATH}" // macOS agent
232+
env.PATH = "C:\\Program Files\\MATLAB\\R2024a\\bin;${env.PATH}" // Windows agent
233+
// env.PATH = "/usr/local/MATLAB/R2024a/bin:${env.PATH}" // Linux agent
234+
// env.PATH = "/Applications/MATLAB_R2024a.app/bin:${env.PATH}" // macOS agent
233235
runMATLABCommand(command: 'disp("Hello World!")')
234236
}
235237
```
@@ -268,7 +270,7 @@ node {
268270
}
269271
```
270272

271-
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.
272274

273275
### Use the `runMATLABTests` Step
274276
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
390392
### Use MATLAB in Matrix Build
391393
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.
392394

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.
394396

395397
```groovy
396398
// Declarative Pipeline
@@ -406,7 +408,7 @@ pipeline {
406408
axes {
407409
axis {
408410
name 'MATLAB_VERSION'
409-
values 'R2022b', 'R2023a', 'R2023b'
411+
values 'R2022b', 'R2023b', 'R2024a'
410412
}
411413
}
412414
stages {
@@ -440,26 +442,26 @@ To register a MATLAB version as a Jenkins tool:
440442
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**.
441443
4) To confirm your choices, click **Save** at the bottom of the page.
442444

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.
444446

445-
![matlab_tool](https://github.com/mathworks/jenkins-matlab-plugin/assets/48831250/50cb92d2-7b46-4bb7-822d-073e746e1d92)
447+
![matlab_tool](https://github.com/mathworks/jenkins-matlab-plugin/assets/48831250/8e3625a8-96a9-424a-b675-c5a13643e85b)
446448

447-
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:
448450

449451
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.
450452
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.
451453
3) In the **Home** box, enter the full path to the MATLAB root folder on the remote agent.
452454
4) Click **Save** to confirm your choices.
453455

454456
### 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.
456458

457459
```groovy
458460
// Declarative Pipeline
459461
pipeline {
460462
agent any
461463
tools {
462-
matlab 'R2023b'
464+
matlab 'R2024a'
463465
}
464466
stages {
465467
stage('Run MATLAB Command') {
@@ -478,7 +480,7 @@ If you define your pipeline using scripted pipeline syntax, use the `tool` keywo
478480
node {
479481
def matlabver
480482
stage('Run MATLAB Command') {
481-
matlabver = tool 'R2023b'
483+
matlabver = tool 'R2024a'
482484
if (isUnix()) {
483485
env.PATH = "${matlabver}/bin:${env.PATH}" // Linux or macOS agent
484486
} else {
@@ -501,7 +503,7 @@ pipeline {
501503
axes {
502504
axis {
503505
name 'MATLAB_VERSION'
504-
values 'R2022b', 'R2023a', 'R2023b'
506+
values 'R2022b', 'R2023b', 'R2024a'
505507
}
506508
}
507509
tools {

0 commit comments

Comments
 (0)