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

Commit 2a7c908

Browse files
committed
resolve conflicts
2 parents 34c1a5b + bc36eed commit 2a7c908

File tree

83 files changed

+2141
-1447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2141
-1447
lines changed

CONFIGDOC.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +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-
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.
72+
Starting in R2024a, you can view the results of running a MATLAB build 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. Click a task name in the table to go to the relevant build log information on the **Console Output** page.
7373

74-
![matlab_build_results](https://github.com/mathworks/jenkins-matlab-plugin/assets/48831250/bf3a8f01-12d6-436e-8a9e-10f465a98f6a)
74+
![Table of MATLAB build results including three tasks. Each table row includes a clickable task name, its status, description, and duration.](https://github.com/user-attachments/assets/eaef15b8-05d3-49c4-ae85-4aca1e57e324)
7575

7676
#### Run MATLAB Tests
7777
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.
@@ -270,7 +270,7 @@ node {
270270
}
271271
```
272272

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.
273+
Starting in R2024a, you can view the results of running a MATLAB build 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. Click a task name in the table to go to the relevant build log information on the **Console Output** page.
274274

275275
### Use the `runMATLABTests` Step
276276
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.

pom.xml

Lines changed: 67 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,97 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
35
<modelVersion>4.0.0</modelVersion>
46
<parent>
57
<groupId>org.jenkins-ci.plugins</groupId>
68
<artifactId>plugin</artifactId>
9+
<<<<<<< HEAD
710
<version>4.47</version>
11+
=======
12+
<version>4.75</version>
13+
>>>>>>> dev_main
814
<relativePath />
915
</parent>
16+
1017
<artifactId>matlab</artifactId>
11-
<version>2.14.1-SNAPSHOT</version>
18+
<version>2.15.1-SNAPSHOT</version>
1219
<packaging>hpi</packaging>
20+
21+
<name>MATLAB Plugin</name>
22+
<url>https://github.com/jenkinsci/matlab-plugin</url>
23+
<description>Jenkins plugin for MATLAB</description>
24+
1325
<developers>
1426
<developer>
1527
<id>mathworks_ci_team</id>
1628
<name>MathWorks</name>
17-
<email>nbhoski@mathworks.com</email>
29+
<email>continuous-integration@mathworks.com</email>
1830
</developer>
1931
</developers>
32+
<<<<<<< HEAD
2033
<properties>
2134
<jenkins.version>2.350</jenkins.version>
2235
<java.level>8</java.level>
2336
</properties>
2437
<name>MATLAB Plugin</name>
2538
<description>Jenkins plugin for MATLAB</description>
2639
<url>https://github.com/jenkinsci/matlab-plugin</url>
40+
=======
41+
42+
>>>>>>> dev_main
2743
<licenses>
2844
<license>
2945
<name>MIT License</name>
3046
<url>https://opensource.org/licenses/MIT</url>
3147
</license>
3248
</licenses>
49+
3350
<repositories>
3451
<repository>
3552
<id>repo.jenkins-ci.org</id>
3653
<url>https://repo.jenkins-ci.org/public/</url>
3754
</repository>
3855
</repositories>
56+
3957
<pluginRepositories>
4058
<pluginRepository>
4159
<id>repo.jenkins-ci.org</id>
4260
<url>https://repo.jenkins-ci.org/public/</url>
4361
</pluginRepository>
4462
</pluginRepositories>
63+
4564
<scm>
4665
<connection>scm:git:ssh://github.com/jenkinsci/matlab-plugin.git</connection>
4766
<developerConnection>scm:git:ssh://git@github.com/jenkinsci/matlab-plugin.git</developerConnection>
48-
<url>http://github.com/jenkinsci/matlab-plugin</url>
67+
<url>https://github.com/jenkinsci/matlab-plugin</url>
4968
<tag>HEAD</tag>
5069
</scm>
70+
71+
<properties>
72+
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
73+
<jenkins.baseline>2.387</jenkins.baseline>
74+
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
75+
</properties>
76+
5177
<dependencyManagement>
5278
<dependencies>
5379
<dependency>
5480
<groupId>io.jenkins.tools.bom</groupId>
81+
<<<<<<< HEAD
5582
<artifactId>bom-2.346.x</artifactId>
5683
<version>1763.v092b_8980a_f5e</version>
5784
<scope>import</scope>
85+
=======
86+
<artifactId>bom-${jenkins.baseline}.x</artifactId>
87+
<version>2543.vfb_1a_5fb_9496d</version>
88+
>>>>>>> dev_main
5889
<type>pom</type>
90+
<scope>import</scope>
5991
</dependency>
6092
</dependencies>
6193
</dependencyManagement>
94+
6295
<dependencies>
6396

6497
<!-- JSON Parser -->
@@ -101,18 +134,26 @@
101134
<artifactId>workflow-job</artifactId>
102135
<scope>test</scope>
103136
</dependency>
104-
<!-- Mockito -->
105-
<dependency>
106-
<groupId>org.mockito</groupId>
107-
<artifactId>mockito-core</artifactId>
108-
<version>3.1.0</version>
109-
<scope>test</scope>
110-
</dependency>
137+
<dependency>
138+
<groupId>org.mockito</groupId>
139+
<artifactId>mockito-core</artifactId>
140+
<version>3.1.0</version>
141+
<scope>test</scope>
142+
</dependency>
143+
<dependency>
144+
<groupId>org.eclipse.jetty</groupId>
145+
<artifactId>jetty-util</artifactId>
146+
<version>11.0.24</version>
147+
<scope>test</scope>
148+
</dependency>
111149
</dependencies>
112150
<build>
113151
<plugins>
114-
<!-- Plugin to download the matlab run scripts and keep it under class
115-
resource folder -->
152+
<plugin>
153+
<groupId>org.jenkins-ci.tools</groupId>
154+
<artifactId>maven-hpi-plugin</artifactId>
155+
</plugin>
156+
<!-- Plugin to download the matlab run scripts and keep it under class resource folder -->
116157
<plugin>
117158
<groupId>com.googlecode.maven-download-plugin</groupId>
118159
<artifactId>download-maven-plugin</artifactId>
@@ -125,7 +166,8 @@
125166
<goal>wget</goal>
126167
</goals>
127168
<configuration>
128-
<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/glnxa64/run-matlab-command</url>
169+
<url>
170+
https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/glnxa64/run-matlab-command</url>
129171
<unpack>false</unpack>
130172
<outputDirectory>${basedir}/src/main/resources/glnxa64</outputDirectory>
131173
<skipCache>true</skipCache>
@@ -139,7 +181,8 @@
139181
<goal>wget</goal>
140182
</goals>
141183
<configuration>
142-
<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/maci64/run-matlab-command</url>
184+
<url>
185+
https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/maci64/run-matlab-command</url>
143186
<unpack>false</unpack>
144187
<outputDirectory>${basedir}/src/main/resources/maci64</outputDirectory>
145188
<skipCache>true</skipCache>
@@ -153,7 +196,8 @@
153196
<goal>wget</goal>
154197
</goals>
155198
<configuration>
156-
<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/maca64/run-matlab-command</url>
199+
<url>
200+
https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/maca64/run-matlab-command</url>
157201
<unpack>false</unpack>
158202
<outputDirectory>${basedir}/src/main/resources/maca64</outputDirectory>
159203
<skipCache>true</skipCache>
@@ -167,7 +211,8 @@
167211
<goal>wget</goal>
168212
</goals>
169213
<configuration>
170-
<url>https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/win64/run-matlab-command.exe</url>
214+
<url>
215+
https://ssd.mathworks.com/supportfiles/ci/run-matlab-command/v2/win64/run-matlab-command.exe</url>
171216
<unpack>false</unpack>
172217
<outputDirectory>${basedir}/src/main/resources/win64</outputDirectory>
173218
<skipCache>true</skipCache>
@@ -181,7 +226,8 @@
181226
<goal>wget</goal>
182227
</goals>
183228
<configuration>
184-
<url>https://ssd.mathworks.com/supportfiles/ci/matlab-script-generator/v0/matlab-script-generator.zip</url>
229+
<url>
230+
https://ssd.mathworks.com/supportfiles/ci/matlab-script-generator/v0/matlab-script-generator.zip</url>
185231
<unpack>false</unpack>
186232
<outputDirectory>${basedir}/src/main/resources</outputDirectory>
187233
<skipCache>true</skipCache>
@@ -193,8 +239,8 @@
193239
</plugins>
194240
<pluginManagement>
195241
<plugins>
196-
<!--This plugin's configuration is used to store Eclipse m2e settings
197-
only. It has no influence on the Maven build itself. -->
242+
<!-- This plugin's configuration is used to store Eclipse m2e settings only. It has
243+
no influence on the Maven build itself. -->
198244
<plugin>
199245
<groupId>org.eclipse.m2e</groupId>
200246
<artifactId>lifecycle-mapping</artifactId>
@@ -261,4 +307,4 @@
261307
</plugins>
262308
</pluginManagement>
263309
</build>
264-
</project>
310+
</project>

src/main/java/com/mathworks/ci/BuildArtifactAction.java

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
/**
44
* Copyright 2024 The MathWorks, Inc.
5-
*
65
*/
76

87
import hudson.FilePath;
@@ -36,16 +35,16 @@ public BuildArtifactAction(Run<?, ?> build, String actionID) {
3635
this.actionID = actionID;
3736

3837
// Setting the counts of task when Action is created.
39-
try{
38+
try {
4039
setCounts();
4140
} catch (ParseException e) {
4241
throw new RuntimeException(e);
43-
} catch (InterruptedException e){
42+
} catch (InterruptedException e) {
4443
throw new RuntimeException(e);
4544
}
4645
}
4746

48-
public String getActionID(){
47+
public String getActionID() {
4948
return (this.actionID == null) ? "" : this.actionID;
5049
}
5150

@@ -64,13 +63,13 @@ public String getDisplayName() {
6463
@CheckForNull
6564
@Override
6665
public String getUrlName() {
67-
return (this.actionID == null) ? "buildresults" : "buildresults" + this.actionID ;
66+
return (this.actionID == null) ? "buildresults" : "buildresults" + this.actionID;
6867
}
6968

7069
public List<BuildArtifactData> getBuildArtifact() throws ParseException, InterruptedException, IOException {
7170
List<BuildArtifactData> artifactData = new ArrayList<BuildArtifactData>();
7271
FilePath fl;
73-
if(this.actionID == null){
72+
if (this.actionID == null) {
7473
fl = new FilePath(new File(build.getRootDir().getAbsolutePath() + "/" +
7574
MatlabBuilderConstants.BUILD_ARTIFACT + ".json"));
7675
} else {
@@ -147,7 +146,7 @@ public void setOwner(Run owner) {
147146
private void setCounts() throws InterruptedException, ParseException {
148147
List<BuildArtifactData> artifactData = new ArrayList<BuildArtifactData>();
149148
FilePath fl;
150-
if(this.actionID == null){
149+
if (this.actionID == null) {
151150
fl = new FilePath(new File(build.getRootDir().getAbsolutePath() + "/" +
152151
MatlabBuilderConstants.BUILD_ARTIFACT + ".json"));
153152
} else {
@@ -206,11 +205,11 @@ private void setCounts() throws InterruptedException, ParseException {
206205
private void iterateAllTaskAttributes(Entry pair, BuildArtifactData data) {
207206
// Iterates across all task attributes and updates
208207
String key = pair.getKey().toString();
209-
switch(key){
208+
switch (key) {
210209
case "duration":
211210
data.setTaskDuration(pair.getValue().toString());
212211
break;
213-
case "name" :
212+
case "name":
214213
data.setTaskName(pair.getValue().toString());
215214
break;
216215
case "description":
@@ -225,7 +224,7 @@ private void iterateAllTaskAttributes(Entry pair, BuildArtifactData data) {
225224
case "skipReason":
226225
String skipReasonKey = pair.getValue().toString();
227226
String skipReason;
228-
switch(skipReasonKey){
227+
switch (skipReasonKey) {
229228
case "UpToDate":
230229
skipReason = "up-to-date";
231230
break;
@@ -242,7 +241,7 @@ private void iterateAllTaskAttributes(Entry pair, BuildArtifactData data) {
242241
}
243242
data.setSkipReason(skipReason);
244243
break;
245-
default :
244+
default:
246245
break;
247246
}
248247
}

src/main/java/com/mathworks/ci/BuildArtifactData.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
/**
44
* Copyright 2024 The MathWorks, Inc.
5-
*
65
*/
76

87
public class BuildArtifactData {

src/main/java/com/mathworks/ci/BuildConsoleAnnotator.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
/**
44
* Copyright 2024 The MathWorks, Inc.
5-
*
65
*/
76

87
import com.google.common.base.Charsets;
@@ -39,7 +38,7 @@ private static byte[][] createBuildNotes() {
3938
ByteArrayOutputStream targetNote = new ByteArrayOutputStream();
4039
new BuildTargetNote().encodeTo(targetNote);
4140
ByteArrayOutputStream outcomeNote = new ByteArrayOutputStream();
42-
return new byte[][]{targetNote.toByteArray(), outcomeNote.toByteArray()};
41+
return new byte[][] { targetNote.toByteArray(), outcomeNote.toByteArray() };
4342
} catch (IOException e) {
4443
throw new RuntimeException(e);
4544
}
@@ -71,7 +70,7 @@ private static class ConsoleLogFilterImpl extends ConsoleLogFilter implements Se
7170
private static final long serialVersionUID = 1;
7271
private byte[][] buildNotes = createBuildNotes();
7372

74-
//Taking care of old MATLAB build actions.
73+
// Taking care of old MATLAB build actions.
7574
private Object readResolve() {
7675
if (buildNotes == null) {
7776
buildNotes = createBuildNotes();

src/main/java/com/mathworks/ci/BuildTargetNote.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,18 @@
22

33
/**
44
* Copyright 2024 The MathWorks, Inc.
5-
*
65
*/
76

87
import com.google.common.annotations.VisibleForTesting;
9-
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
108
import hudson.Extension;
119
import hudson.MarkupText;
1210
import hudson.console.ConsoleAnnotationDescriptor;
1311
import hudson.console.ConsoleAnnotator;
1412
import hudson.console.ConsoleNote;
1513
import java.util.regex.Pattern;
1614

17-
1815
public class BuildTargetNote extends ConsoleNote {
1916
@VisibleForTesting
20-
@SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "Visible for testing")
2117
public static boolean ENABLED = !Boolean.getBoolean(BuildTargetNote.class.getName() + ".disabled");
2218

2319
public BuildTargetNote() {
@@ -26,10 +22,10 @@ public BuildTargetNote() {
2622
@Override
2723
public ConsoleAnnotator annotate(Object context, MarkupText text, int charPos) {
2824
MarkupText.SubText t = text.findToken(Pattern.compile("MATLAB-Build-"));
29-
String taskName = text.subText(13, text.length()-2).getText();
30-
taskName = taskName.replace("]","").trim();
25+
String taskName = text.subText(13, text.length() - 2).getText();
26+
taskName = taskName.replace("]", "").trim();
3127
if (t != null)
32-
t.addMarkup(0, t.length()-1, "<a id= matlab" + taskName + " name=matlab" + taskName + ">", "</a>");
28+
t.addMarkup(0, t.length() - 1, "<a id= matlab" + taskName + " name=matlab" + taskName + ">", "</a>");
3329
return null;
3430
}
3531

src/main/java/com/mathworks/ci/FormValidationUtil.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
package com.mathworks.ci;
22

33
/**
4-
* Copyright 2019-2020 The MathWorks, Inc.
4+
* Copyright 2019-2024 The MathWorks, Inc.
55
*
66
* This is Utility class which provides commonly used methods for form validations across builders
7-
*
87
*/
98

109
import java.util.List;

0 commit comments

Comments
 (0)