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** section of the project configuration window, the plugin provides you with the **Run MATLAB Command** and **Run MATLAB Tests** build steps.
39
39
40
-
If you use a source code management (SCM) system such as Git™, then your project must include the appropriate SCM configuration to check out the code before it can invoke the plugin. If you do not use any SCM systems to manage your code, then an additional build step is required to ensure that the code is available in the Jenkins workspace before the build starts.
40
+
If you use a source code management (SCM) system such as Git™, then your project should include the appropriate SCM configuration to check out the code before it can invoke the plugin. If you do not use any SCM systems to manage your code, then an additional build step might be required to ensure that the code is available in the Jenkins workspace before the build starts.
41
41
42
42
#### Run MATLAB Command
43
43
The **Run MATLAB Command** build step enables you to specify MATLAB commands tailored to your specific needs. For example, you can use this build step to customize your test run or add a different build step to your pipeline.
@@ -65,7 +65,7 @@ The **Run MATLAB Tests** build step produces a MATLAB script file named `runMatl
65
65
**Note:**
66
66
* The plugin does not create the `matlabTestArtifacts` folder if the name of the folder does not appear in any of the displayed **File path** boxes.
67
67
68
-
* Producing a PDF test report is not currently supported on Mac platforms.
68
+
* Producing a PDF test report is not currently supported on macOS platforms.
69
69
70
70
## Set Up Freestyle Project
71
71
To configure the plugin for a freestyle project, specify the location where MATLAB is installed as well as the required build steps.
@@ -80,7 +80,7 @@ To configure the plugin for a freestyle project, specify the location where MATL
80
80
81
81
## Set Up Multi-Configuration Project
82
82
The plugin supports [multi-configuration (matrix) projects](https://wiki.jenkins.io/display/JENKINS/Building+a+matrix+project). Multi-configuration projects are useful when builds include similar steps. For example:
83
-
* The same test suite is run on different platforms (Windows, Linux, and Mac).
83
+
* The same test suite is run on different platforms (Windows, Linux, and macOS).
84
84
* The same test suite is run against different versions of MATLAB.
85
85
86
86
To configure the plugin for a multi-configuration project, specify the locations where MATLAB is installed as well as the required build steps. In addition, add user-defined axes in the **Configuration Matrix** section to specify the duplicating build steps.
@@ -104,7 +104,7 @@ You can define several axes in the **Configuration Matrix** section. For example
* Both **$VAR** and **${VAR}** are valid formats for accessing the values of the user-defined axis **VAR**. On Mac platforms, the **${VAR}** format is recommended.
107
+
* Both **$VAR** and **${VAR}** are valid formats for accessing the values of the user-defined axis **VAR**. On macOS platforms, the **${VAR}** format is recommended.
108
108
109
109
* A multi-configuration project creates a separate workspace for each user-defined axis value. If you specify the full paths to where MATLAB is installed as axis values, Jenkins fails to create separate workspaces and fails the build.
110
110
@@ -122,16 +122,16 @@ You also can define your Pipeline directly in the project configuration window.
122
122
### Add MATLAB to System Path
123
123
When Jenkins executes MATLAB-related steps in your Pipeline, it uses the first 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.
124
124
125
-
To update the system PATH environment variable using Declarative Pipeline syntax, use an `environment` block in your `Jenkinsfile`. For example, prepend MATLAB R2019a to the system PATH environment variable and use it to run your command.
125
+
To update the system PATH environment variable using Declarative Pipeline syntax, use an `environment` block in your `Jenkinsfile`. For example, prepend MATLAB R2020a to the system PATH environment variable and use it to run your command.
126
126
127
127
```groovy
128
128
// Declarative Pipeline
129
129
pipeline {
130
130
agent any
131
131
environment {
132
-
PATH = "C:\\Program Files\\MATLAB\\R2019a\\bin;${PATH}" // Windows agent
133
-
// PATH = "/usr/local/MATLAB/R2019a/bin:${PATH}" // Linux agent
134
-
// PATH = "/Applications/MATLAB_R2019a.app/bin:${PATH}" // Mac agent
132
+
PATH = "C:\\Program Files\\MATLAB\\R2020a\\bin;${PATH}" // Windows agent
133
+
// PATH = "/usr/local/MATLAB/R2020a/bin:${PATH}" // Linux agent
| testResultsPDF | Path to write test results report in PDF format (currently not supported on Mac platforms).<br/>**Example:**`'test-results/results.pdf'`|
265
+
| testResultsPDF | Path to write test results report in PDF format (currently not supported on macOS platforms).<br/>**Example:**`'test-results/results.pdf'`|
266
266
| testResultsTAP | Path to write test results report in TAP format.<br/>**Example:**`'test-results/results.tap'`|
267
267
| testResultsJUnit | Path to write test results report in JUnit XML format.<br/>**Example:**`'test-results/results.xml'`|
268
268
| testResultsSimulinkTest | Path to export Simulink Test™ Manager results in MLDATX format (requires Simulink Test license and is supported in MATLAB R2019a or later).<br/>**Example:**`'test-results/results.mldatx'`|
@@ -271,9 +271,9 @@ node {
271
271
272
272
273
273
## Use MATLAB in Matrix Build
274
-
Similar to 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 Declarative Pipeline to run your test suite on different platforms or against different versions of MATLAB. (Matrix build is not supported in Scripted Pipelines.)
274
+
Similar to 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.
275
275
276
-
Your Pipeline must have a `matrix` section to define the possible name-value combinations that should run in parallel. This example shows how to define a Pipeline to run your MATLAB code and generate test artifacts using MATLAB R2018b, R2019a, and R2020a.
276
+
This example shows how to define a Declarative Pipeline to run your MATLAB code and generate test artifacts using MATLAB R2018b, R2019a, and R2020a. The Pipeline has a `matrix` section to define the possible name-value combinations that should run in parallel.
0 commit comments