我试图从我的jenkins工作区执行一份rsync
副本,将一份工作内容复制到名为卷位置的docker容器(web2py)。
我的jenkins作业配置有svn
回购,因此我的目的是将jenkins作业位置的rsync副本复制到web2py容器卷文件夹中。因此提交中的每个更改都会反映在web2py页面中。
命名卷:app_vol:/home/web2py/applications
我的shell脚本为rsync -avz /var/lib/jenkins/workspace/job1 /var/lib/docker/volumes/app_vol_data
但是作业因错误而失败:
Started by user visar
Building in workspace /var/lib/jenkins/workspace/job1
Updating https://mysvnrepo/DevOps/app1 at revision '2019-01-27T18:09:28.530 +0530' --quiet
sole credentials ****** (for svn) in realm ‘<https://mysvnrepo:443> Subversion Authentication’
At revision 1995
No changes for https://mysvnrepo/DevOps/app1 since the previous build
[job1] $ /bin/sh -xe /tmp/jenkins3821680748520933174.sh
+ rsync -avz /var/lib/jenkins/workspace/job1 /var/lib/docker/volumes /app_vol/_data/
sending incremental file list
rsync: ERROR: cannot stat destination "/var/lib/docker/volumes/app_vol /_data/": Permission denied (13)
rsync error: errors selecting input/output files, dirs (code 3) at main.c(635) [Receiver=3.1.2]
Build step 'Execute shell' marked build as failure
Finished: FAILURE