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.
Copy file name to clipboardExpand all lines: CONFIGDOC.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
You can use the Jenkins™ plugin for MATLAB® in freestyle and multi-configuration projects. This guide demonstrates how to run MATLAB code on Jenkins, considering a Microsoft®Windows® platform.
1
+
You can use the Jenkins™ plugin for MATLAB® in freestyle and multi-configuration projects. This guide demonstrates how to run your MATLAB code or Simulink®model on Jenkins.
2
2
3
3
-[Use MATLAB for Build](#use-matlab-for-build)
4
4
-[Specify Build Steps](#specify-build-steps)
@@ -16,15 +16,23 @@ Select the **Use MATLAB version** checkbox to specify the full path to the MATLA
16
16
17
17
If the build agent already has your desired MATLAB on the path, then you are not required to select the **Use MATLAB version** checkbox. When the checkbox is clear, the plugin uses the first MATLAB instance it encounters on the path. The build fails if the operating system cannot find MATLAB on the path.
18
18
19
+
**Note:** The [matlabroot](https://www.mathworks.com/help/matlab/ref/matlabroot.html) function returns the full path to the MATLAB root folder, which depends on the platform, MATLAB version, and installation location. This table shows examples of the root folder path on different platforms.
When you set up the **Build** section of the project configuration window, the plugin provides you with the **Run MATLAB Tests** and **Run MATLAB Command** build steps.
21
29
22
30
### Run MATLAB Tests
23
-
This build step uses a default setting to run tests authored using the MATLAB Unit Testing Framework and/or Simulink® Test™. If your source code is organized as files and folders within a MATLAB project, then the plugin includes any test files in the project that have been labeled as **Test**. If your code does not leverage a MATLAB project or uses a MATLAB release before R2019a, then the plugin includes all tests in the current Jenkins workspace including its subfolders.
31
+
This build step uses a default setting to run tests authored using the MATLAB Unit Testing Framework or Simulink Test™. If your source code is organized into files and folders within a MATLAB project, then the plugin includes any test files in the project that have been labeled as **Test**. If your code does not leverage a MATLAB project or uses a MATLAB release before R2019a, then the plugin includes all tests in the current Jenkins workspace, including its subfolders.
24
32
25
33
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 MATLAB 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.
26
34
27
-
The **Run MATLAB Tests** build step enables you to easily generate different types of test artifacts. To publish the test results, you can use these artifacts with other Jenkins plugins. The selected artifacts are saved in the **matlabTestArtifacts** folder of the Jenkins workspace. If you do not select any of the test artifact check boxes, the folder is not created. However, the tests still run and test failures fail the build.
35
+
The **Run MATLAB Tests** build step enables you to easily generate different types of test artifacts. To publish the test results, you can use these artifacts with other Jenkins plugins. The selected artifacts are saved in the **matlabTestArtifacts** folder of the Jenkins workspace. If you do not select any of the test artifact check boxes, the folder is not created. However, the tests still run, and test failures fail the build.
@@ -37,7 +45,7 @@ The **Run MATLAB Command** build step enables you to specify MATLAB commands tai
37
45
38
46
If you specify more than one MATLAB command, use a comma or semicolon to separate the commands. The build fails if the execution of any command results in an error.
If you need to specify several MATLAB commands, consider writing a MATLAB script or function as part of your repository and executing this script or function instead.
43
51
@@ -46,7 +54,7 @@ Test artifacts are not autogenerated if you choose to run tests using this build
46
54
## Set Up Freestyle Project
47
55
To configure the plugin for a freestyle project, specify the location where MATLAB is installed as well as the required build steps.
48
56
49
-
1) In the **Build Environment** section of the project configuration window, select **Use MATLAB version**. Then, enter the value returned by the **matlabroot** function in the **MATLAB root** box. (You can skip this step if MATLAB has already been added to the path on the build agent.)
57
+
1) In the **Build Environment** section of the project configuration window, select **Use MATLAB version**. Then, enter the full path to the MATLAB root folder in the **MATLAB root** box. (You can skip this step if MATLAB has already been added to the path on the build agent.)
*For a user-defined axis named **VAR**, **$VAR** and **${VAR}** are both valid formats for accessing the values.
91
+
*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.
84
92
85
93
* 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.
6. In the **Build** section of Jenkins, click**Add build step > Run MATLAB Tests**. Then, select your desired test artifacts to be generated in the project workspace. The plugin in this example is configured to generate Cobertura code coverage and JUnit test result reports. For more information on how to configure the Jenkins plugin for MATLAB, see [Plugin Configuration Guide](../CONFIGDOC.md).
46
+
6. In the **Build** section of Jenkins, select**Add build step > Run MATLAB Tests**. Then, select your desired test artifacts to be generated in the project workspace. The plugin in this example is configured to generate Cobertura code coverage and JUnit test result reports. For more information on how to configure the Jenkins plugin for MATLAB, see [Plugin Configuration Guide](../CONFIGDOC.md).
0 commit comments