-
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?
Conversation
@@ -2,6 +2,6 @@ | |||
<extension> | |||
<groupId>io.jenkins.tools.incrementals</groupId> | |||
<artifactId>git-changelist-maven-extension</artifactId> | |||
<version>1.2</version> | |||
<version>1.7</version> |
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.
@@ -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 comment
The 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.
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
See the documentation.
<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 comment
The reason will be displayed to describe this comment to others. Learn more.
Latest version at the time of this writing.
<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> | ||
<aws-credentials.version>191.vcb_f183ce58b_9</aws-credentials.version> |
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.
<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> |
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.
This code also appears in the jira-plugin
build, to allow the use of Mockito in integration tests.
@VisibleForTesting | ||
static List<Cloud> getClouds() { |
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.
Needed for the switch from PowerMock to Mockito's mockStatic
.
@VisibleForTesting | ||
static List<Widget> getWidgets() { |
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.
Needed for the switch from PowerMock to Mockito's mockStatic
.
@VisibleForTesting | ||
static List<Cloud> getClouds() { |
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.
Needed for the switch from PowerMock to Mockito's mockStatic
.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to upgrade to the latest AWS Java SDK Jenkins plugin.
|
||
final AmazonAutoScalingClient result = new AutoScalingGroupFleet().createClient(null, REGION, ENDPOINT); | ||
assertEquals(autoScalingClient, result); | ||
try (MockedConstruction<AmazonAutoScalingClient> mockedAmazonAutoScalingClient = Mockito.mockConstruction(AmazonAutoScalingClient.class)) { |
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.
Here and elsewhere, review with "Hide whitespace" enabled.
Update this plugin to conform to the latest best practices for Jenkins plugins from the Jenkins archetype, including building/testing on Java 17/21. This entailed migrating from PowerMock to Mockito 5.