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

Commit 1b9f164

Browse files
authored
Update CONFIGDOC.md
1 parent 2238498 commit 1b9f164

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

CONFIGDOC.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff 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 on Jenkins.
22

33
- [Use MATLAB for Build](#use-matlab-for-build)
44
- [Specify Build Steps](#specify-build-steps)
@@ -16,15 +16,25 @@ Select the **Use MATLAB version** checkbox to specify the full path to the MATLA
1616

1717
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.
1818

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.
20+
21+
Examples
22+
23+
| Platform | Path to MATLAB Root Folder |
24+
|--------------|---------------------------------|
25+
| Windows® | C:\Program Files\MATLAB\R2019a |
26+
| Linux® | /usr/local/MATLAB/R2019a |
27+
| Mac | /Applications/MATLAB_R2019a.app |
28+
1929
## Specify Build Steps
2030
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.
2131

2232
### 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.
33+
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.
2434

2535
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.
2636

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.
37+
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.
2838

2939
![run_matlab_tests](https://user-images.githubusercontent.com/48831250/76800820-d2629a00-67aa-11ea-9fa7-c466e8c17f27.png)
3040

@@ -46,7 +56,7 @@ Test artifacts are not autogenerated if you choose to run tests using this build
4656
## Set Up Freestyle Project
4757
To configure the plugin for a freestyle project, specify the location where MATLAB is installed as well as the required build steps.
4858

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.)
59+
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.)
5060

5161
![build_environment](https://user-images.githubusercontent.com/48831250/76798534-23bc5a80-67a6-11ea-9a48-861cbbc7b0ba.png)
5262

@@ -80,7 +90,7 @@ You can define several axes in the **Configuration Matrix** section. For example
8090
![run_matlab_command_matrix](https://user-images.githubusercontent.com/48831250/76883848-21fca080-6853-11ea-8ad3-89f85b997608.png)
8191

8292
**Note:**
83-
* For a user-defined axis named **VAR**, **$VAR** and **${VAR}** are both valid formats for accessing the values.
93+
* 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.
8494

8595
* 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.
8696

0 commit comments

Comments
 (0)