Skip to content

Commit

Permalink
Merge pull request #310 from jtnord/remove-use-of-FileOnMasterKeyStor…
Browse files Browse the repository at this point in the history
…eSource

do not rely on long deprecated FileOnMasterKeyStoreSource
  • Loading branch information
olamy authored Jun 24, 2024
2 parents dc9d38c + db453a8 commit 6288482
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@

import hudson.FilePath;
import hudson.Functions;
import hudson.model.FileParameterValue;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
import hudson.model.Item;
Expand Down Expand Up @@ -97,7 +98,7 @@ public void basics() throws Exception {
String alias = "androiddebugkey";
String password = "android";
StandardCertificateCredentials c = new CertificateCredentialsImpl(CredentialsScope.GLOBAL, null, alias,
password, new CertificateCredentialsImpl.FileOnMasterKeyStoreSource(certificate.getAbsolutePath()));
password, new CertificateCredentialsImpl.UploadedKeyStoreSource(new FileParameterValue.FileItemImpl(certificate), null));
CredentialsProvider.lookupStores(r.jenkins).iterator().next().addCredentials(Domain.global(), c);
FreeStyleProject p = r.createFreeStyleProject();
CertificateMultiBinding binding = new CertificateMultiBinding("keystore", c.getId());
Expand Down

0 comments on commit 6288482

Please sign in to comment.