Skip to content

Commit bffcd74

Browse files
committed
chore(deps): update dependencies
1 parent 22e52e2 commit bffcd74

File tree

2 files changed

+55
-67
lines changed

2 files changed

+55
-67
lines changed

pom.xml

+46-56
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.jenkins-ci.plugins</groupId>
66
<artifactId>plugin</artifactId>
7-
<version>3.37</version>
7+
<version>4.42</version>
88
<relativePath />
99
</parent>
1010

@@ -28,85 +28,75 @@
2828
</scm>
2929

3030
<properties>
31-
<jenkins.version>2.222.3</jenkins.version>
31+
<jenkins.version>2.289.3</jenkins.version>
3232
<java.level>8</java.level>
3333
</properties>
34-
<name>Bitbucket Credentials - Kubernetes Intergration</name>
34+
<name>Bitbucket Credentials - Kubernetes Integration</name>
3535
<description>Integrates bitbucket credentials with the k8s credential provider</description>
3636
<licenses>
3737
<license>
3838
<name>MIT License</name>
3939
<url>https://opensource.org/licenses/MIT</url>
4040
</license>
4141
</licenses>
42+
<dependencyManagement>
43+
<dependencies>
44+
<dependency>
45+
<groupId>io.jenkins.tools.bom</groupId>
46+
<artifactId>bom-2.289.x</artifactId>
47+
<version>1438.v6a_2c29d73f82</version>
48+
<scope>import</scope>
49+
<type>pom</type>
50+
</dependency>
51+
<dependency>
52+
<groupId>io.jenkins.plugins</groupId>
53+
<artifactId>atlassian-bitbucket-server-integration</artifactId>
54+
<version>3.2.2</version>
55+
<exclusions>
56+
<exclusion>
57+
<groupId>com.fasterxml.jackson.core</groupId>
58+
<artifactId>jackson-annotations</artifactId>
59+
</exclusion>
60+
<exclusion>
61+
<groupId>com.fasterxml.jackson.core</groupId>
62+
<artifactId>jackson-databind</artifactId>
63+
</exclusion>
64+
<exclusion>
65+
<groupId>com.fasterxml.jackson.core</groupId>
66+
<artifactId>jackson-core</artifactId>
67+
</exclusion>
68+
<exclusion>
69+
<groupId>org.jenkins-ci</groupId>
70+
<artifactId>trilead-ssh2</artifactId>
71+
</exclusion>
72+
</exclusions>
73+
</dependency>
74+
<dependency>
75+
<groupId>com.cloudbees.jenkins.plugins</groupId>
76+
<artifactId>kubernetes-credentials-provider</artifactId>
77+
<version>0.20</version>
78+
</dependency>
79+
</dependencies>
80+
</dependencyManagement>
4281
<dependencies>
4382
<dependency>
4483
<groupId>com.cloudbees.jenkins.plugins</groupId>
4584
<artifactId>kubernetes-credentials-provider</artifactId>
46-
<version>0.14</version>
4785
</dependency>
4886
<dependency>
4987
<groupId>io.jenkins.plugins</groupId>
5088
<artifactId>atlassian-bitbucket-server-integration</artifactId>
51-
<version>1.1.0</version>
5289
</dependency>
53-
<dependency>
54-
<groupId>org.jenkins-ci.plugins</groupId>
55-
<artifactId>ssh-credentials</artifactId>
56-
<version>1.14</version>
57-
</dependency>
58-
<!-- logging -->
59-
<dependency>
60-
<groupId>org.slf4j</groupId>
61-
<artifactId>slf4j-api</artifactId>
62-
<version>1.7.26</version>
63-
</dependency>
64-
<dependency>
65-
<groupId>org.slf4j</groupId>
66-
<artifactId>jcl-over-slf4j</artifactId>
67-
<version>1.7.26</version>
68-
</dependency>
69-
<dependency>
70-
<groupId>org.slf4j</groupId>
71-
<artifactId>slf4j-jdk14</artifactId>
72-
<version>1.7.26</version>
73-
</dependency>
74-
<dependency>
75-
<groupId>org.slf4j</groupId>
76-
<artifactId>log4j-over-slf4j</artifactId>
77-
<version>1.7.26</version>
78-
</dependency>
79-
80-
81-
<!-- https://mvnrepository.com/artifact/org.jenkins-ci.plugins/credentials -->
82-
<dependency>
83-
<groupId>org.jenkins-ci.plugins</groupId>
84-
<artifactId>credentials</artifactId>
85-
<version>2.3.1</version>
86-
</dependency>
87-
8890
<dependency>
8991
<groupId>org.mockito</groupId>
9092
<artifactId>mockito-core</artifactId>
91-
<version>3.3.3</version>
92-
<scope>test</scope>
93-
</dependency>
94-
<dependency>
95-
<groupId>org.powermock</groupId>
96-
<artifactId>powermock-core</artifactId>
97-
<version>2.0.7</version>
93+
<version>4.6.1</version>
9894
<scope>test</scope>
9995
</dependency>
10096
<dependency>
101-
<groupId>org.powermock</groupId>
102-
<artifactId>powermock-api-mockito2</artifactId>
103-
<version>2.0.7</version>
104-
<scope>test</scope>
105-
</dependency>
106-
<dependency>
107-
<groupId>org.powermock</groupId>
108-
<artifactId>powermock-module-junit4</artifactId>
109-
<version>2.0.7</version>
97+
<groupId>org.mockito</groupId>
98+
<artifactId>mockito-inline</artifactId>
99+
<version>4.6.1</version>
110100
<scope>test</scope>
111101
</dependency>
112102
</dependencies>

src/test/java/co/johnrowley/jenkins/bitbucketcredentialsk8s/BitbucketCredentialConverterTest.java

+9-11
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,12 @@
3030
import io.fabric8.kubernetes.api.model.Secret;
3131
import io.fabric8.kubernetes.client.utils.Serialization;
3232
import jenkins.security.ConfidentialStore;
33+
import org.junit.BeforeClass;
3334
import org.junit.Before;
3435
import org.junit.Test;
3536
import org.junit.runner.RunWith;
3637
import org.mockito.ArgumentMatchers;
3738
import org.mockito.Mockito;
38-
import org.powermock.api.mockito.PowerMockito;
39-
import org.powermock.core.classloader.annotations.PowerMockIgnore;
40-
import org.powermock.core.classloader.annotations.PrepareForTest;
41-
import org.powermock.modules.junit4.PowerMockRunner;
4239
import java.io.InputStream;
4340
import static org.hamcrest.CoreMatchers.is;
4441
import static org.hamcrest.CoreMatchers.notNullValue;
@@ -49,18 +46,19 @@
4946
* Tests for {@link BitbucketCredentialConverter}.
5047
*/
5148
@Extension
52-
@RunWith(PowerMockRunner.class)
53-
@PrepareForTest({ConfidentialStore.class, HistoricalSecrets.class})
54-
@PowerMockIgnore({"javax.crypto.*" }) // https://github.com/powermock/powermock/issues/294
5549
public class BitbucketCredentialConverterTest {
50+
51+
@BeforeClass
52+
public static void mockConfidentialStore() {
53+
Mockito.mockStatic(ConfidentialStore.class);
54+
Mockito.mockStatic(HistoricalSecrets.class);
55+
}
56+
5657
@Before
57-
public void mockConfidentialStore() {
58-
PowerMockito.mockStatic(ConfidentialStore.class);
58+
public void before() {
5959
ConfidentialStore csMock = Mockito.mock(ConfidentialStore.class);
6060
Mockito.when(ConfidentialStore.get()).thenReturn(csMock);
6161
Mockito.when(csMock.randomBytes(ArgumentMatchers.anyInt())).thenAnswer( it -> new byte[ (Integer)(it.getArguments()[0])] );
62-
63-
PowerMockito.mockStatic(HistoricalSecrets.class); // return null rather than go looking up Jenkins.getInstance....
6462
}
6563

6664
@Test

0 commit comments

Comments
 (0)