jenkinsci / aws-secrets-manager-credentials-provider-plugin

AWS Secrets Manager Credentials Provider for Jenkins
https://plugins.jenkins.io/aws-secrets-manager-credentials-provider/
MIT License
64 stars 42 forks source link

WIP use ServiceLoader to load credential factories #298

Open chriskilding opened 9 months ago

chriskilding commented 9 months ago

This PR enables the dynamic discovery of credential type factories via the Java ServiceLoader.

It lays the groundwork for the Secrets Manager Credentials Provider to support custom credential types (such as GitHub or BrowserStack credentials). This will be achieved by creating downstream plugins for each of these credential types; each downstream plugin will contain an AwsCredentialsFactory implementation.

As a useful side benefit, breaking the credential type factories out into their own plugins should also make the test suites for each one simpler and quicker.

Testing done

### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [ ] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [ ] Link to relevant issues in GitHub or Jira
- [ ] Ensure you have provided tests - that demonstrates feature works or fixes the issue