doh, simple typo. I'm just not very good at reading the error messages.

bitbucketEndpointConfiguration.updateEndpoint(BitbucketServerEndpoint)

should be:

bitbucketEndpointConfiguration.updateEndpoint(endPoint)


On Monday, 29 October 2018 13:00:10 UTC, Nicholas Brown wrote:
>
> I've been trying to configure and Bitbucket Server endpoint using groovy 
> script from the script console.
> I've been following the example given here: 
> https://plugins.jenkins.io/cloudbees-bitbucket-branch-source but using 
> a BitbucketServerEndpoint instead of bitbucketCloudEndpoint. My code is:
>
>
> import jenkins.model.Jenkins
> import com.cloudbees.jenkins.plugins.bitbucket.endpoints.*
>  
> def endPoint = new BitbucketServerEndpoint(
>         "Bitbucket Server",
>         "{{ bitbucket_url }}",
>         true, // manageHooks
>         "bitbucket_password_credential"
>         )
>  
> Jenkins jenkins = Jenkins.getInstance()
>  
> def bitbucketEndpointConfiguration = jenkins.getDescriptor(
> "com.cloudbees.jenkins.plugins.bitbucket.endpoints.BitbucketEndpointConfiguration"
> )
>  
> bitbucketEndpointConfiguration.updateEndpoint(BitbucketServerEndpoint)
>  
> jenkins.save()
>
> I'm getting the following error that I don't understand:
>
> groovy.lang.MissingMethodException: No signature of method: 
> com.cloudbees.jenkins.plugins.bitbucket.endpoints.BitbucketEndpointConfiguration.updateEndpoint()
>  is applicable for argument types: (java.lang.Class) values: [class 
> com.cloudbees.jenkins.plugins.bitbucket.endpoints.BitbucketServerEndpoint] 
> Possible solutions: 
> updateEndpoint(com.cloudbees.jenkins.plugins.bitbucket.endpoints.AbstractBitbucketEndpoint)
>
> Can anyone suggest what I'm doing wrong, and the correct way to do this?
>
>
> Thanks,
>
> Nick
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1068d150-503c-477c-aaeb-6b52b4303ca6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to