[英]Getting files from server on AWS Using Jenkins Build
I have installed jenkins on my local machine (on premises). 我已经在本地计算机(本地)上安装了jenkins。 I have my server (Linux) in AWS Cloud. 我在AWS Cloud中拥有服务器(Linux)。 I need to share logs with developers with out giving server access to them. 我需要与开发人员共享日志,而无需授予服务器访问权限。 I need to create a jenkins job by running that job they should get the logs from server. 我需要通过运行该作业来创建jenkins作业,他们应该从服务器获取日志。
How can i do that ?? 我怎样才能做到这一点 ?? If any one following the same process to get the data from cloud please help me in solving this... Thanks in advance. 如果有人遵循相同的过程从云中获取数据,请帮助我解决此问题。
You could write a pipeline script to do this. 您可以编写管道脚本来执行此操作。 Something like: 就像是:
node ("linux") {
sshagent (credentials: ['deploy-dev']) {
sh 'scp user@awshostnamehere:/somepath/somelogfile .'
archive somelogfile
}
}
Note that this requires you to fill in the blanks. 请注意,这要求您填写空白。 To get this to work you would have to: 要使其正常工作,您必须:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.