Skip to content

Commit

Permalink
do not rely on long deprecated FileOnMasterKeyStoreSource
Browse files Browse the repository at this point in the history
  • Loading branch information
jtnord committed Jun 21, 2024
1 parent dc9d38c commit db453a8
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 db453a8

Please sign in to comment.