We have a Jenkins CI server, running on Ubuntu. I can login as root
, but jenkins
user is running the pipelines. As part of a pipeline, I would like to push images to digital ocean registries.
I can successfully authenticate, login and push if I'm acting as root
user, but I cannot make it work as jenkins
user (as part of the pipeline). If I call sudo -u jenkins doctl auth init
for example, it wants to write to /root/.config
file, which is not allowed because of permission issues of course.
Somehow I want to be able to run doctl
connected to jenkins
user and not to root
user. Either installing doctl
command it to jenkins
user or force using config files/folder of user jenkins
.
(As it probably turned out to you, I'm not a linux expert.)