Techniques for managing an scp call to a remote box, with a specific principal

26 views
Skip to first unread message

David Karr

unread,
Dec 9, 2016, 5:57:00 PM12/9/16
to Jenkins Users
This mostly isn't a Jenkins question, but I would think many people here would have to deal with this kind of situation.

I have a Jenkins pipeline job that produces a javadoc jar (among other products). I'm going to need to deploy that content into a directory tree on a remote box (using some variation of "scp", I assume), where the directory is owned by a particular non-root user, and this directory is a mapped volume to a Docker container running an apache instance.

I do have a "mechanical id" (you might call it a service account) that I use for automation tasks in bitbucket and jenkins. It presently isn't able to log into my javadoc box, but I have root rights on the box, so I could modify that.

I imagine I'll need to create an ssh key to use for this. Does that make sense here?

Rachel Moreno

unread,
Dec 11, 2016, 4:05:19 PM12/11/16
to Jenkins Users
Hi David,

I don't know if I've understood what you really need, but please, take a look at:
For example, if you have a user/password you can choose "Use password authentication" to configure access to remote location and then sending files.

I hope be useful.

Best regards,
Rachel

David Karr

unread,
Dec 11, 2016, 5:50:19 PM12/11/16
to Jenkins Users


On Sunday, December 11, 2016 at 1:05:19 PM UTC-8, Rachel Moreno wrote:
Hi David,

I don't know if I've understood what you really need, but please, take a look at:
For example, if you have a user/password you can choose "Use password authentication" to configure access to remote location and then sending files.

Yes, I've seen those two plugins, but I don't understand how I would use either of these from a pipeline job.

Rachel Moreno

unread,
Dec 12, 2016, 7:07:47 AM12/12/16
to Jenkins Users
Hi David,

Sorry, it's true, you mentioned it. Please, take a look at: https://issues.jenkins-ci.org/browse/JENKINS-27963


I hope be useful.

Best regards,
Raquel

nco...@fgtsa.com

unread,
Dec 12, 2016, 7:16:26 AM12/12/16
to Jenkins Users
Yes, I've seen those two plugins, but I don't understand how I would use either of these from a pipeline job.
  
As Rachel mentioned, Publish over ssh is still lacking pipeline support. You can check additional pipeline plugins compatibility here

You can check the Pipeline Syntax link on you Pipeline script, on how to use the sh: Shell script step, to pass a normal scp/ssh command. 
Reply all
Reply to author
Forward
0 new messages