Skip to content

Commit

Permalink
Merge pull request #295 from jenkinsci/latest
Browse files Browse the repository at this point in the history
Update changes
  • Loading branch information
andreibangau99 authored Aug 28, 2024
2 parents 1dec4fd + d40ad45 commit 03c11a9
Show file tree
Hide file tree
Showing 31 changed files with 324 additions and 305 deletions.
2 changes: 1 addition & 1 deletion HpToolsLauncher/TestInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class TestInfo

public TestInfo(string testPath)
{
TestPath = testPath;
TestPath = Path.GetFullPath(testPath);
}

public string GenerateAPITestXmlForTest(Dictionary<string, object> paramDict, bool printInputParams)
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
if (env.JENKINS_URL == 'https://ci.jenkins.io/') {
// Builds the plugin using https://github.com/jenkins-infra/pipeline-library
buildPlugin(platforms: ['windows'])
buildPlugin(jdkVersions: [21],platforms: ['windows'])
}
else {
// Do internal build
Expand Down
106 changes: 29 additions & 77 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.31</version> <!-- TODO newer versions require an upgrade of the test harness -->
<version>4.83</version> <!-- TODO newer versions require an upgrade of the test harness -->
<relativePath />
</parent>

Expand Down Expand Up @@ -65,10 +65,10 @@
<concurrency>1</concurrency>
<msbuild.exe>C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe</msbuild.exe>
<msbuild.configuration>Release</msbuild.configuration>
<jenkins.version>2.346.1</jenkins.version>
<jenkins.version>2.426.3</jenkins.version>
<maven.exec.skip>false</maven.exec.skip>
<java.level>8</java.level>
<jenkins-test-harness.version>2.55</jenkins-test-harness.version> <!-- TODO newer versions require debugging an issue with open file handles -->
<java.level>21</java.level>
<jenkins-test-harness.version>2205.v7e19cc98f9c7</jenkins-test-harness.version> <!-- TODO newer versions than 2.55 require debugging an issue with open file handles -->
</properties>

<distributionManagement>
Expand Down Expand Up @@ -351,8 +351,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.289.x</artifactId>
<version>984.vb5eaac999a7e</version>
<artifactId>bom-2.426.x</artifactId>
<version>3193.v330d8248d39e</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -379,17 +379,14 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>625.vd896b_f445a_f8</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>1144.v61c3180fa_03f</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-support</artifactId>
<version>813.vb_d7c3d2984a_0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand All @@ -398,7 +395,6 @@
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>1145.v7f2433caa07f</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand Down Expand Up @@ -430,17 +426,14 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>308.v852b473a2b8c</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>scm-api</artifactId>
<version>602.v6a_81757a_31d2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1158.v7c1b_73a_69a_08</version>
<scope>test</scope>
</dependency>
<!--workflow-aggregator-plugin-->
Expand Down Expand Up @@ -485,58 +478,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1119.1121.vc43d0fc45561</version>

<exclusions>
<exclusion>
<groupId>io.jenkins.plugins</groupId>
<artifactId>font-awesome-api</artifactId>
</exclusion>
<exclusion>
<groupId>io.jenkins.plugins</groupId>
<artifactId>echarts-api</artifactId>
</exclusion>
<exclusion>
<groupId>io.jenkins.plugins</groupId>
<artifactId>plugin-util-api</artifactId>
</exclusion>
<exclusion>
<groupId>io.jenkins.plugins</groupId>
<artifactId>checks-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>display-url-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>font-awesome-api</artifactId>
<version>6.0.0-1</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>echarts-api</artifactId>
<version>5.3.2-1</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>plugin-util-api</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>checks-api</artifactId>
<version>1.7.4</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>display-url-api</artifactId>
<version>2.3.6</version>
</dependency>
<!-- Octane jenkins plugins -->

<dependency>
<artifactId>integrations-sdk</artifactId>
<groupId>com.hpe.adm.octane.ciplugins</groupId>
Expand All @@ -547,19 +489,19 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>parameterized-trigger</artifactId>
<version>2.44</version>
<version>806.vf6fff3e28c3e</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>conditional-buildstep</artifactId>
<version>1.4.1</version>
<version>1.4.3</version>
<optional>true</optional>
</dependency>
<dependency>
<artifactId>maven-plugin</artifactId>
<groupId>org.jenkins-ci.main</groupId>
<version>3.19</version>
<version>3.23</version>
</dependency>
<dependency>
<artifactId>matrix-project</artifactId>
Expand All @@ -568,7 +510,7 @@
<dependency>
<artifactId>jenkins-multijob-plugin</artifactId>
<groupId>org.jenkins-ci.plugins</groupId>
<version>1.30</version>
<version>627.v7c23cef20a_6a</version>
<optional>true</optional>
</dependency>

Expand All @@ -581,7 +523,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>subversion</artifactId>
<version>2.15.4</version> <!-- TODO use version from BOM when possible -->
<!-- TODO use version from BOM when possible -->
<optional>true</optional>
</dependency>

Expand Down Expand Up @@ -609,7 +551,7 @@
<dependency>
<artifactId>token-macro</artifactId>
<groupId>org.jenkins-ci.plugins</groupId>
<version>293.v283932a_0a_b_49</version> <!-- TODO use version from BOM when possible -->
<!-- TODO use version from BOM when possible -->
<optional>true</optional>
</dependency>
<dependency>
Expand All @@ -621,7 +563,6 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
<version>414.vcc4c33714601</version>
<optional>true</optional>
</dependency>

Expand All @@ -647,18 +588,19 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
<version>2.13.2.20220328-273.v11d70a_b_a_1a_52</version> <!-- TODO use version from BOM when possible -->
<!-- TODO use version from BOM when possible -->
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>snakeyaml-api</artifactId>
<version>1.30.1</version> <!-- TODO use version from BOM when possible -->
<!-- TODO use version from BOM when possible -->
</dependency>

<!--Test-->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -670,13 +612,23 @@
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>javax-activation-api</artifactId>
<version>1.2.0-3</version> <!-- TODO use version from BOM when possible -->
<version>1.2.0-6</version> <!-- TODO use version from BOM when possible -->
</dependency>

<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>jaxb</artifactId>
<version>2.3.6-1</version> <!-- TODO use version from BOM when possible -->
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.6</version>
</dependency>
<dependency>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>4.3.0</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static String getOs() {
return os;
}

private static void refreshOsVariablesForSlave() {
public static void refreshOsVariablesForSlave() {
os = System.getProperty("os.name").toLowerCase();
windows = os.contains(WINDOWS.name().toLowerCase());
mac = os.contains(MAC.name().toLowerCase());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@
import hudson.util.IOUtils;
import jenkins.model.Jenkins;
import org.acegisecurity.AccessDeniedException;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpStatus;
import org.apache.logging.log4j.Logger;
Expand Down Expand Up @@ -810,15 +807,18 @@ public static List<ParameterValue> createParameters(Job project, CIParameters ci
}
if (!parameterHandled) {
if (paramDef instanceof FileParameterDefinition) {
FileItemFactory fif = new DiskFileItemFactory();
FileItem fi = fif.createItem(paramDef.getName(), "text/plain", false, "");
File file = new File("");
try {
fi.getOutputStream().write(new byte[0]);
try (OutputStream outputStream = Files.newOutputStream(file.toPath())) {
outputStream.write(new byte[0]);
}
} catch (IOException ioe) {
logger.error("failed to create default value for file parameter '" + paramDef.getName() + "'", ioe);
}
tmpValue = new FileParameterValue(paramDef.getName(), fi);
tmpValue = new FileParameterValue(paramDef.getName(), file, file.getName());
result.add(tmpValue);


} else {
result.add(paramDef.getDefaultParameterValue());
}
Expand Down
Loading

0 comments on commit 03c11a9

Please sign in to comment.