-
Notifications
You must be signed in to change notification settings - Fork 48
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
update library and replace deprecate method #116
Changes from all commits
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 |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
|
||
<name>Kubernetes CLI Plugin</name> | ||
<url>https://github.com/jenkinsci/kubernetes-cli-plugin</url> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>kubernetes-cli</artifactId> | ||
<version>${revision}${changelist}</version> | ||
<packaging>hpi</packaging> | ||
|
@@ -20,15 +19,13 @@ | |
<hpi.compatibleSinceVersion>1.0.0</hpi.compatibleSinceVersion> | ||
|
||
<!-- dependency versions --> | ||
<jenkins.version>2.401.1</jenkins.version> | ||
<jenkins.version>2.401.3</jenkins.version> | ||
<bom.artifactId>bom-2.401.x</bom.artifactId> | ||
<bom.version>2357.v1043f8578392</bom.version> | ||
<bom.version>2555.v3190a_8a_c60c6</bom.version> | ||
|
||
<!-- jenkins plugins versions --> | ||
<jenkins-env-inject.version>2.3.0</jenkins-env-inject.version> | ||
<jenkins-declarative.version>1.4.0</jenkins-declarative.version> | ||
<jenkins-kubernetes-credentials.version>0.11</jenkins-kubernetes-credentials.version> | ||
|
||
|
||
<!-- maven plugins versions --> | ||
<maven-coveralls.version>4.3.0</maven-coveralls.version> | ||
|
||
|
@@ -102,7 +99,6 @@ | |
<dependency> | ||
<groupId>org.jenkinsci.plugins</groupId> | ||
<artifactId>kubernetes-credentials</artifactId> | ||
<version>${jenkins-kubernetes-credentials.version}</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. Why did you decided to unpin all those dependencies ? Doesn't it mean that Jenkins will be less restrictive when deciding which plugins it can update / start with, and this would lead to runtime errors instead of update/boot errors ? 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. using managed version from group io.jenkins.tools.bom - bom-2.401.x |
||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
|
@@ -136,7 +132,6 @@ | |
<dependency> | ||
<groupId>org.jenkinsci.plugins</groupId> | ||
<artifactId>pipeline-model-definition</artifactId> | ||
<version>${jenkins-declarative.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
|
@@ -163,13 +158,11 @@ | |
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>docker-commons</artifactId> | ||
<version>439.va_3cb_0a_6a_fb_29</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>matrix-auth</artifactId> | ||
<version>2.6.6</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ | |
import org.jenkinsci.plugins.envinject.EnvInjectBuildWrapper; | ||
import org.jenkinsci.plugins.envinject.EnvInjectJobPropertyInfo; | ||
import org.jenkinsci.plugins.kubernetes.cli.helpers.DummyCredentials; | ||
import org.jenkinsci.plugins.matrixauth.AuthorizationType; | ||
import org.jenkinsci.plugins.matrixauth.PermissionEntry; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.jvnet.hudson.test.JenkinsRule; | ||
|
@@ -140,10 +142,10 @@ public void testListingCredentialsWithoutAncestorAndMissingPermissions() throws | |
|
||
r.jenkins.setSecurityRealm(r.createDummySecurityRealm()); | ||
ProjectMatrixAuthorizationStrategy as = new ProjectMatrixAuthorizationStrategy(); | ||
as.add(Jenkins.READ, "user-not-enough-permissions"); | ||
as.add(Jenkins.READ, new PermissionEntry(AuthorizationType.EITHER, "user-not-enough-permissions")); | ||
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. |
||
r.jenkins.setAuthorizationStrategy(as); | ||
|
||
try (ACLContext unused = ACL.as(User.get("user-not-enough-permissions", true, null).impersonate())) { | ||
try (ACLContext unused = ACL.as2(User.get("user-not-enough-permissions", true, null).impersonate2())) { | ||
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. |
||
ListBoxModel options = d.doFillCredentialsIdItems(null, "", "1"); | ||
assertEquals("- current -", options.get(0).name); | ||
assertEquals(1, options.size()); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,15 +30,15 @@ public static BaseStandardCredentials secretCredential(String credentialId) { | |
|
||
public static BaseStandardCredentials certificateCredential(String credentialId) { | ||
byte[] storeFile = TestResourceLoader.loadAsByteArray("kubernetes.pkcs12"); | ||
CertificateCredentialsImpl.KeyStoreSource keyStoreSource = new CertificateCredentialsImpl.UploadedKeyStoreSource( | ||
CertificateCredentialsImpl.KeyStoreSource keyStoreSource = new CertificateCredentialsImpl.UploadedKeyStoreSource(null, | ||
SecretBytes.fromBytes(storeFile)); | ||
return new CertificateCredentialsImpl(CredentialsScope.GLOBAL, credentialId, "sample", PASSPHRASE, | ||
keyStoreSource); | ||
} | ||
|
||
public static BaseStandardCredentials brokenCertificateCredential(String credentialId) { | ||
byte[] storeFile = TestResourceLoader.loadAsByteArray("kubernetes.pkcs12"); | ||
CertificateCredentialsImpl.KeyStoreSource keyStoreSource = new CertificateCredentialsImpl.UploadedKeyStoreSource( | ||
CertificateCredentialsImpl.KeyStoreSource keyStoreSource = new CertificateCredentialsImpl.UploadedKeyStoreSource(null, | ||
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. |
||
SecretBytes.fromBytes(storeFile)); | ||
return new CertificateCredentialsImpl(CredentialsScope.GLOBAL, credentialId, "sample", "bad-passphrase", | ||
keyStoreSource); | ||
|
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.
Why is the
groupId
not needed anymore ?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.
there was a warning because the group took it from the parent