-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refresh plugin for August 2023 #405
base: master
Are you sure you want to change the base?
Changes from 1 commit
a0fd5c0
acd60ae
906a0ae
1e68b5a
bc23e66
0397886
18335c5
8243344
2c23a6f
1cba47c
a7d545e
a92eb3f
0c83b46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
// https://github.com/jenkins-infra/pipeline-library | ||
buildPlugin(failFast: false) | ||
buildPlugin(useContainerAgent: true, configurations: [ | ||
[platform: 'linux', jdk: 21], | ||
[platform: 'linux', jdk: 17], | ||
]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<parent> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>4.31</version> | ||
<version>4.72</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latest version at the time of this writing. Supports Java 11 source level. |
||
<relativePath /> | ||
</parent> | ||
|
||
|
@@ -17,13 +17,10 @@ | |
<properties> | ||
<revision>2.7.2</revision> | ||
<changelist>-SNAPSHOT</changelist> | ||
<jenkins.version>2.277.2</jenkins.version> | ||
<java.level>8</java.level> | ||
<jenkins.version>2.387.3</jenkins.version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See the documentation. |
||
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo> | ||
<aws-sdk.version>1.12.101-300.vc09c7be9cb57</aws-sdk.version> | ||
<aws-credentials.version>1.32</aws-credentials.version> | ||
<mockito.version>3.12.4</mockito.version> | ||
<powermock.version>2.0.5</powermock.version> | ||
<aws-sdk.version>1.12.529-406.vdeff15e5817d</aws-sdk.version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latest version at the time of this writing. |
||
<aws-credentials.version>191.vcb_f183ce58b_9</aws-credentials.version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latest version at the time of this writing. |
||
</properties> | ||
|
||
<name>EC2 Fleet Jenkins Plugin</name> | ||
|
@@ -60,8 +57,8 @@ | |
</developers> | ||
|
||
<scm> | ||
<connection>scm:git:https://github.com/${gitHubRepo}</connection> | ||
<developerConnection>scm:git:https://github.com/${gitHubRepo}</developerConnection> | ||
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection> | ||
<developerConnection>scm:git:git@github.com:${gitHubRepo}.git</developerConnection> | ||
<url>https://github.com/${gitHubRepo}</url> | ||
<tag>${scmTag}</tag> | ||
</scm> | ||
|
@@ -84,8 +81,8 @@ | |
<dependencies> | ||
<dependency> | ||
<groupId>io.jenkins.tools.bom</groupId> | ||
<artifactId>bom-2.249.x</artifactId> | ||
<version>984.vb5eaac999a7e</version> | ||
<artifactId>bom-2.387.x</artifactId> | ||
<version>2357.v1043f8578392</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latest version at the time of this writing. |
||
<scope>import</scope> | ||
<type>pom</type> | ||
</dependency> | ||
|
@@ -118,15 +115,8 @@ | |
|
||
<!-- tests --> | ||
<dependency> | ||
<groupId>org.powermock</groupId> | ||
<artifactId>powermock-module-junit4</artifactId> | ||
<version>${powermock.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.powermock</groupId> | ||
<artifactId>powermock-api-mockito2</artifactId> | ||
<version>${powermock.version}</version> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
|
@@ -138,17 +128,6 @@ | |
<groupId>io.jenkins.configuration-as-code</groupId> | ||
<artifactId>test-harness</artifactId> | ||
<scope>test</scope> | ||
<!-- | ||
PCT fails on maven-enforcer-plugin:enforce | ||
test-harness:1.46 puts joda-time:2.10.2 | ||
aws-java-sdk:1.11.821 puts 2.8.1 | ||
--> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>joda-time</groupId> | ||
<artifactId>joda-time</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
@@ -161,10 +140,31 @@ | |
<extensions>true</extensions> | ||
<configuration> | ||
<compatibleSinceVersion>1.45</compatibleSinceVersion> | ||
<minimumJavaVersion>8</minimumJavaVersion> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Long deprecated. |
||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<profiles> | ||
<profile> | ||
<id>jdk17</id> | ||
<activation> | ||
<jdk>[17,)</jdk> | ||
</activation> | ||
<properties /> | ||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<configuration> | ||
<argLine>-Xms768M -Xmx768M -XX:+HeapDumpOnOutOfMemoryError -XX:+TieredCompilation -XX:TieredStopAtLevel=1 @{jenkins.addOpens} @{jenkins.insaneHook} --add-opens java.base/java.util.concurrent=ALL-UNNAMED --add-opens java.base/java.util.concurrent.locks=ALL-UNNAMED</argLine> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
</profile> | ||
</profiles> | ||
Comment on lines
+153
to
+174
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This code also appears in the |
||
</project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package com.amazon.jenkins.ec2fleet; | ||
|
||
import com.google.common.annotations.VisibleForTesting; | ||
import hudson.Extension; | ||
import hudson.model.PeriodicWork; | ||
import hudson.slaves.Cloud; | ||
|
@@ -66,7 +67,8 @@ protected void doRun() { | |
* | ||
* @return basic java list | ||
*/ | ||
private static List<Cloud> getClouds() { | ||
@VisibleForTesting | ||
static List<Cloud> getClouds() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needed for the switch from PowerMock to Mockito's |
||
return Jenkins.get().clouds; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
package com.amazon.jenkins.ec2fleet; | ||
|
||
import com.google.common.annotations.VisibleForTesting; | ||
import hudson.Extension; | ||
import hudson.model.PeriodicWork; | ||
import hudson.slaves.Cloud; | ||
|
@@ -53,7 +54,8 @@ protected void doRun() { | |
* | ||
* @return widgets | ||
*/ | ||
private static List<Widget> getWidgets() { | ||
@VisibleForTesting | ||
static List<Widget> getWidgets() { | ||
Comment on lines
+57
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needed for the switch from PowerMock to Mockito's |
||
return Jenkins.get().getWidgets(); | ||
} | ||
|
||
|
@@ -63,7 +65,8 @@ private static List<Widget> getWidgets() { | |
* | ||
* @return basic java list | ||
*/ | ||
private static List<Cloud> getClouds() { | ||
@VisibleForTesting | ||
static List<Cloud> getClouds() { | ||
Comment on lines
+68
to
+69
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needed for the switch from PowerMock to Mockito's |
||
return Jenkins.get().clouds; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,28 +13,36 @@ public enum RegionInfo { | |
US_EAST_2("us-east-2", "US East (Ohio)"), | ||
US_WEST_1("us-west-1", "US West (N. California)"), | ||
US_WEST_2("us-west-2", "US West (Oregon)"), | ||
US_ISO_EAST_1("us-iso-east-1", "US ISO East"), | ||
US_ISOB_EAST_1("us-isob-east-1", "US ISOB East (Ohio)"), | ||
US_ISO_WEST_1("us-iso-west-1", "US ISO West"), | ||
EU_WEST_1("eu-west-1", "EU (Ireland)"), | ||
EU_WEST_2("eu-west-2", "EU (London)"), | ||
EU_WEST_3("eu-west-3", "EU (Paris)"), | ||
EU_CENTRAL_1("eu-central-1", "EU (Frankfurt)"), | ||
EU_CENTRAL_2("eu-central-2", "EU (Zurich)"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Needed to upgrade to the latest AWS Java SDK Jenkins plugin. |
||
EU_NORTH_1("eu-north-1", "EU (Stockholm)"), | ||
EU_SOUTH_1("eu-south-1", "EU (Milan)"), | ||
AF_SOUTH_1("af-south-1", "Africa (Cape Town)"), | ||
EU_SOUTH_2("eu-south-2", "EU (Spain)"), | ||
AP_EAST_1("ap-east-1", "Asia Pacific (Hong Kong)"), | ||
AP_SOUTH_1("ap-south-1", "Asia Pacific (Mumbai)"), | ||
AP_SOUTH_2("ap-south-2", "Asia Pacific (Hyderabad)"), | ||
AP_SOUTHEAST_1("ap-southeast-1", "Asia Pacific (Singapore)"), | ||
AP_SOUTHEAST_2("ap-southeast-2", "Asia Pacific (Sydney)"), | ||
AP_SOUTHEAST_3("ap-southeast-3", "Asia Pacific (Jakarta)"), | ||
AP_SOUTHEAST_4("ap-southeast-4", "Asia Pacific (Melbourne)"), | ||
AP_NORTHEAST_1("ap-northeast-1", "Asia Pacific (Tokyo)"), | ||
AP_NORTHEAST_2("ap-northeast-2", "Asia Pacific (Seoul)"), | ||
AP_NORTHEAST_3("ap-northeast-3", "Asia Pacific (Osaka)"), | ||
|
||
SA_EAST_1("sa-east-1", "South America (Sao Paulo)"), | ||
CN_NORTH_1("cn-north-1", "China (Beijing)"), | ||
CN_NORTHWEST_1("cn-northwest-1", "China (Ningxia)"), | ||
CA_CENTRAL_1("ca-central-1", "Canada (Central)"), | ||
ME_CENTRAL_1("me-central-1", "Middle East (UAE)"), | ||
ME_SOUTH_1("me-south-1", "Middle East (Bahrain)"), | ||
AP_NORTHEAST_3("ap-northeast-3", "Asia Pacific (Osaka)"); | ||
AF_SOUTH_1("af-south-1", "Africa (Cape Town)"), | ||
US_ISO_EAST_1("us-iso-east-1", "US ISO East"), | ||
US_ISOB_EAST_1("us-isob-east-1", "US ISOB East (Ohio)"), | ||
US_ISO_WEST_1("us-iso-west-1", "US ISO West"), | ||
IL_CENTRAL_1("il-central-1", "Israel (Tel Aviv)"); | ||
|
||
private final String name; | ||
private final String description; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest version at the time of this writing.