Is there a way to express the UI 'Trigger builds remotely' in declarative pipeline without using additional plugins?

Hi

I’m in the process of converting some jobs to declarative pipeline (scm stored) and I can’t find a way to express the ‘Trigger builds remotely’ in the UI into a declarative pipeline directive, as the default ‘triggers’ section doesn’t seem to expose anything helpful.
The only way I found was to rely on the generic webhook plugin, but I’d rather avoid depending on a new plugin that isn’t even required for basic UI configuration.

Is there a native way to express token triggers in declarative pipeline that I missed ?

Thanks

The approach to start builds via such tokens is deprecated since long time (The javaday says 2008).
The implementation is not exposed as an extension which makes it impossible to reference it in a pipeline.
The better approach is to grant a technical user (which you probably need anyway to access Jenkins) the build permission on the job.

1 Like

Thanks for the info, that was quite informative.
I re-read the official documentationfor remote access, and indeed this kind of token isn’t mentioned anymore.
A token is still needed though, but it’s a user-token used as a password for the basicauth when performing the web call.
Now I need to modify all my tools to use the ‘new’ way of remoting before I can switch properly to declarative pipeline
Thanks again :slight_smile:

1 Like