Jenkins执行Jenkinsfile报错
遇到部署的步骤时传输文件到其他服务器,文件传上去了,但是命令都没有执行成功。
写法:
报错了:ERROR:Exception when publishing,exception message [Exec exit status not zero.Status [1]]
原因是因为:cd 引用了环境变量里的参数,写法不对,应该用${env.环境变量}。
如下:
成功了。
遇到部署的步骤时传输文件到其他服务器,文件传上去了,但是命令都没有执行成功。
写法:
报错了:ERROR:Exception when publishing,exception message [Exec exit status not zero.Status [1]]
原因是因为:cd 引用了环境变量里的参数,写法不对,应该用${env.环境变量}。
如下:
成功了。