This repository was archived by the owner on Mar 27, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Wiki migration #55
Merged
Merged
Wiki migration #55
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4ea5c5e
Moved Jenkins Wiki details in GitHub
nbhoski c1409d1
Updated links
nbhoski 02ab050
Updated the CONFIGDOC link with permalink
nbhoski 8b77953
Updated as per review comments
nbhoski 5be2d63
Updated links with new commit ID
nbhoski ee05396
Updated review comments and changed doc links.
nbhoski 8ef21b8
Updated pom with GitHub link
nbhoski 9075e3f
Updated README as per review comments.
nbhoski 09c9f5d
Added period at the end of the sentence.
nbhoski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| Change log | ||
| === | ||
|
|
||
| ### Newer Versions | ||
|
|
||
| For newer versions of the plugin, see [GitHub releases.](https://github.com/jenkinsci/matlab-plugin/releases) | ||
|
|
||
| ### 1.0.3 | ||
|
|
||
| Release date: _Nov 05, 2019_ | ||
|
|
||
| * Bug Fix : Scratch file copy is restricted to "Automatic" option. | ||
| * README doc updates. | ||
|
|
||
|
|
||
| ### 1.0.2 | ||
|
|
||
| Release date: _Aug 21, 2019_ | ||
|
|
||
| * MATRIX build support. | ||
| * Plugin support for older versions of MATLAB until R2013a. | ||
|
|
||
| ### 1.0.1 | ||
|
|
||
| Release date: _May 10, 2019_ | ||
|
|
||
| * Jenkins run-time environment variables support in MATLAB script. | ||
| * Enhancement of README with SCM configuration step for "Automatic" Test mode. | ||
|
|
||
| ### 1.0.0 | ||
|
|
||
| Release date: _Apr 08, 2019_ | ||
|
|
||
| * Initial release. | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| ## Contents | ||
|
|
||
| - [Configure Plugin for Freestyle Project](#configure-plugin-for-freestyle-project) | ||
| - [Freestyle Project with Automatic Test Mode](#option-1-freestyle-project-with-automatic-test-mode) | ||
| - [Freestyle Project with Custom Test Mode](#option-2-freestyle-project-with-custom-test-mode) | ||
| - [Configure Plugin for Multi-Configuration Project](#configure-plugin-for-multi-configuration-project) | ||
| - [Multi-Configuration Project with Automatic Test Mode](#option-1-multi-configuration-project-with-automatic-test-mode) | ||
| - [Multi-Configuration Project with Custom Test Mode](#option-2-multi-configuration-project-with-custom-test-mode) | ||
|
|
||
| ## Configure Plugin for Freestyle Project | ||
mw-hrastega marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| To configure the plugin for a freestyle project, select **Run MATLAB Tests** from the **Add build step** list. Then, enter the value returned by the **matlabroot** function in the **MATLAB root** field. | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| ### Option 1: Freestyle Project with Automatic Test Mode | ||
| With the Jenkins plugin for MATLAB, you have the option to run your tests in either *automatic* or *custom* mode. The automatic test mode employs a default setting to run tests written using the MATLAB Unit Testing Framework and/or Simulink Test. If your source code is organized as files and folders within a project, the plugin will consider any test files in the project that have been tagged as **Test**. If your code does not leverage a project or uses a MATLAB version prior to R2019a, the plugin will consider all tests in the current Jenkins workspace including the subfolders. | ||
|
|
||
| If you use a source code management (SCM) system such as Git, then your job 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. | ||
|
|
||
| The automatic test execution feature of the plugin enables you to generate different types of test artifacts. To publish the test results, you can use these artifacts with other Jenkins plugins. To configure the Jenkins build where MATLAB tests run automatically, follow these steps. | ||
|
|
||
| 1) From the **Test mode** drop-down list, select the **Automatic** option (**Automatic** is the default testing mode). | ||
|
|
||
|  | ||
|
|
||
| 2) Select your desired test artifacts. | ||
|
|
||
|  | ||
|
|
||
| The selected artifacts will be saved in the **matlabTestArtifacts** folder of the Jenkins workspace. | ||
|
|
||
|  | ||
|
|
||
|  | ||
|
|
||
| If you do not select any of the test artifact check boxes, the **matlabTestArtifacts** folder will not be created in the workspace. However, tests will still run and potential test failures will fail the build. | ||
|
|
||
| The **Automatic** test mode results in a MATLAB script file named **runMatlabTests.m** in the Jenkins workspace. The plugin uses this file to run the tests and generate the test artifacts. You can review the contents of the script to understand the testing workflow. | ||
|
|
||
|  | ||
|
|
||
| ### Option 2: Freestyle Project with Custom Test Mode | ||
| This option enables you to develop your custom MATLAB commands for running tests. To configure the Jenkins build where you can customize the MATLAB test execution, follow these steps. | ||
|
|
||
| 1) From the **Test mode** drop-down list, select the **Custom** option. | ||
|
|
||
|  | ||
|
|
||
| 2) Enter your commands in the **MATLAB command** field. If you specify more than one MATLAB command, use a comma or semicolon to separate the commands. The build will fail if the execution of any command results in an error. | ||
|
|
||
|  | ||
|
|
||
| **Note:** If you need several MATLAB commands to run your tests, consider writing a MATLAB script or function as part of your repository and executing this script or function instead. Test artifacts are not autogenerated if you choose to run tests using custom MATLAB commands. You can generate your desired test artifacts by configuring the test runner in the script or function that you invoke from the **MATLAB command** field. | ||
|
|
||
|  | ||
|
|
||
| ## Configure Plugin for Multi-Configuration Project | ||
| In addition to freestyle projects, the Jenkins plugin for MATLAB 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 when the same test suite should run on different platforms (e.g., Windows, Linux, and Mac) or using several MATLAB versions. | ||
|
|
||
|  | ||
|
|
||
| As in a freestyle project, you can run your tests in automatic or custom mode within a multi-configuration project. The configuration requires you to specify the location where MATLAB is installed as well as the test execution mode. You should also add user-defined axes in the **Configuration Matrix** to specify the duplicating build steps. | ||
|
|
||
| ### Option 1: Multi-Configuration Project with Automatic Test Mode | ||
|
|
||
| To configure the plugin for a matrix build where tests run automatically in multiple MATLAB versions, create a multi-configuration project and follow these steps. | ||
|
|
||
| 1) Add a user-defined axis in the **Configuration Matrix** to represent the MATLAB versions in the build. Specify the name of the axis in the **Name** field and its values in the **Values** field. Separate the elements in the **Values** field with a space. In this example, four MATLAB versions are specified, which will be used to run the same set of tests. | ||
|
|
||
|  | ||
|
|
||
| 2) In the **Run MATLAB Tests** section of the project, include the user-defined axis name in the **MATLAB root** field to specify the locations where MATLAB is installed. In this example, **$VERSION** will be replaced by one axis value per build step. | ||
|
|
||
|  | ||
|
|
||
| You can select the test artifact check boxes when tests run automatically. Once you have made your selections, save your settings and run the build. | ||
|
|
||
| ### Option 2: Multi-Configuration Project with Custom Test Mode | ||
|
|
||
| To configure the matrix build where you can customize the MATLAB test execution, create a multi-configuration project and follow these steps. | ||
|
|
||
| 1) Add a user-defined axis in the **Configuration Matrix** to represent the MATLAB versions in the build. | ||
|
|
||
|  | ||
|
|
||
| 2) Add another user-defined axis using the **Add axis** button. In this example, the **TEST_TAG** axis specifies the possible test tags for a group of test elements. | ||
|
|
||
|  | ||
|
|
||
| 3) In the **Run MATLAB Tests** section of the project, use the **VERSION** axis to specify the locations where MATLAB is installed. | ||
|
|
||
|  | ||
|
|
||
| 4) From the **Test mode** drop-down list, select the **Custom** option. Use the second user-defined axis to create your commands and enter them in the **MATLAB command** field. Then, save your settings and run the build. | ||
|
|
||
|  | ||
|
|
||
| **Notes:** | ||
| 1) For a user-defined axis named **VAR**, **$VAR** and **${VAR}** are both valid formats for accessing the values. | ||
|
|
||
| 2) 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.