-
Notifications
You must be signed in to change notification settings - Fork 104
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
Remove missed occurence of FileOnMasterKeyStoreSource #312
Conversation
@@ -148,11 +148,11 @@ public void basicsPipeline() throws Exception { | |||
String alias = "androiddebugkey"; | |||
String password = "android"; | |||
StandardCertificateCredentials c = new CertificateCredentialsImpl(CredentialsScope.GLOBAL, "my-certificate", alias, | |||
password, new CertificateCredentialsImpl.FileOnMasterKeyStoreSource(certificate.getAbsolutePath())); | |||
password, new CertificateCredentialsImpl.UploadedKeyStoreSource(new FileParameterValue.FileItemImpl(certificate), null)); |
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.
the fix
CredentialsProvider.lookupStores(r.jenkins).iterator().next().addCredentials(Domain.global(), c); | ||
// create the Pipeline job | ||
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p"); | ||
String pipelineScript = IOUtils.toString(getTestResourceInputStream("basicsPipeline-Jenkinsfile"), StandardCharsets.UTF_8); | ||
String pipelineScript = getTestResourceAsUTF8String("basicsPipeline-Jenkinsfile"); |
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.
preventing resource leaks by ensuring the stream is closed.
f.copyFrom(in); | ||
f.chmod(mask); | ||
return f; | ||
try (InputStream in = getTestResourceInputStream(fileName)) { |
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.
preventing resource leaks by ensuring the stream is closed.
Adapt to jenkinsci/credentials-plugin#540
ammends #310
Testing done
ran
mvn verify
with the following changeSubmitter checklist