Recommended practices for Jenkins and credentials

Hello, we want to use Jenkins to copy a directory to a directory on Onedrive. Rclone seems to fit the bill just fine for this. I tested out the concept in a trial run on my computer (Mac) using my own Onedrive account. I ran through the steps in the documentation to config rclone for Onedrive and it generated a ~/.config/rclone/rclone.conf file as expected. I run rclone copy local :remote, and that does what I expect - perfect.

Our target will be Jenkins running on Linux, though. I did not see a plugin for rclone and Jenkins, so I'm seeking suggestions on good ways to handle credentials in the Jenkins context to give them some protection. What do others do here?

What you could do is encrypt the credentials using rclone then supply the password for the config file using an environment variable secret (which I think you can do with Jenkins - more familiar with GitHub actions).

Full details here:

Note that rclone will need to update the config file to write updated tokens in it assuming you are using oauth with onedrive.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.