--
Thank you,
Marco
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/HE1P195MB018878B3F690F248A739D586F5580%40HE1P195MB0188.EURP195.PROD.OUTLOOK.COM.
For more options, visit https://groups.google.com/d/optout.
Hello All,
I have tried and followed the suggestion from Stephen.
Everything works well when I implement the doFill__Items from the Builder Descriptor.
I have however problems to retrieve the credentials when doing it from within an Action Descriptor.
In my builder I have:
<f:entry title=" Credentials" field="credentialsId">
<c:select />
</f:entry>
<f:block><p><strong> Action</strong></p></f:block>
<f:entry title="${%Action}">
<f:dropdownDescriptorSelector field="action"
descriptors="${descriptor.getApplicableActions()}"/>
</f:entry
Then, within my Actions I’d like to have
<f:entry title="Action configuration">
<f:entry title="Test ID" field="testId">
<f:select name="testId" default="noSuiteSelected"/>
</f:entry>
And in the doFillTestIdItems() make a request to the API with the data in credentials.
public ListBoxModel doFillTestIdItems(Build<?, ?> context, @QueryParameter String credentialsId) {
final CredentialImpl credential = CredentialsProvider.findCredentialById(credentialsId,
CredentialImpl.class, context, URIRequirementBuilder.create().build());
HandleAPI handleAPI = new HandleAPI(credential.getTeamSlug(), credential.getKeyId());
this.suitesResponse = (SuitesResponse)(handleAPI.callSuitesAPI());
ListBoxModel items = this.getListOfSuitesFromResponse(this.suitesResponse);
return items;
}
However this returns a java.lang.NullPointerException
Any help?
Anyone could point me to an example on GitHub that’s implemented similarly?
Thank you very much,
M.-