How can I configure a job to run a Rundeck job with a custom user?

Article ID:360016126471
1 minute readKnowledge base

Issue

We want to trigger a Rundeck job from a Jenkins Freestyle job, but we do not want to use the global credentials used to set the access to the Rundeck server.

Resolution

  • As mentioned in the plugin wiki page, you can use a different user to trigger a Rundeck job than the one that you used to configure the Rundeck server access.

In order to do this, you will have to add a new Rundeck post-build step as shown in the image below:

That will bring you the configuration section for the Rundeck Notification section, in this section, you would be able to use the default settings for the user and the password as shown in the image below or you can provide the data in the placeholders marked. You can provide the Rundeck username and either a password for that user or a Token generated in Rundeck for that user.

You can get the job id from the Rundeck server as shown below:

Finally, the plugin allows you to check the options that you are using to trigger the job.

Testing Conditions

This article has been written using the following product versions: