Skip to content

Commit

Permalink
Support X.509 client certificates from docker-commons plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
sgybas committed Sep 26, 2022
1 parent cf629eb commit bbaeba3
Show file tree
Hide file tree
Showing 14 changed files with 3 additions and 9 deletions.
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,6 @@
<artifactId>docker-commons</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<!-- Marked as optional in docker-commons plugin, specify explicitly to update required version -->
<groupId>org.jenkinsci.plugins</groupId>
<artifactId>pipeline-model-extensions</artifactId>
<optional>true</optional>
</dependency>
<!-- test deps -->
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.jenkinsci.plugins.variant.OptionalExtension;

@OptionalExtension(requirePlugins = {"docker-commons"})
public class X509ClientCertConvertor extends SecretToCredentialConverter {
public class DockerServerCredentialsConvertor extends SecretToCredentialConverter {

@Override
public boolean canConvert(String type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;

public class X509ClientCertConvertorTest extends AbstractConverterTest {
public class DockerServerCredentialsConvertorTest extends AbstractConverterTest {

private final String clientCertificate = "-----BEGIN CERTIFICATE-----\n" +
"MIIBYjCCAQygAwIBAgIJAKZlQzqGGWu9MA0GCSqGSIb3DQEBBQUAMEExCzAJBgNV\n" +
Expand Down Expand Up @@ -69,7 +69,7 @@ public class X509ClientCertConvertorTest extends AbstractConverterTest {
"XoR7JjrHmbI+f1BkwSbMVxxadAWpSkk/NNI1+SHR/nYSv/loQ3UjmA==\n" +
"-----END CERTIFICATE-----";

private X509ClientCertConvertor convertor = new X509ClientCertConvertor();
private DockerServerCredentialsConvertor convertor = new DockerServerCredentialsConvertor();

@Test
public void canConvert() throws Exception {
Expand Down

0 comments on commit bbaeba3

Please sign in to comment.