我正在使用gitlabCI进行构建。成功之后,我想将工件(4个文件)传输到生产服务器。构建是在本地网络中的许多计算机之一上随机完成的。我想压缩工件,然后发送到特定的一台服务器(Y),然后发送到生产服务器(Z),并在服务器(Z)上解压缩。首先,我将Y-id_rsa.pub添加到Z服务器。
deploy_production:
stage: deploy
environment: Production
only:
- tags
script:
- zip artifacts
- scp artifacts.zip to Y
- scp artifacts.zip to Z
- ssh to Z mkdir and unzip artifacts
我需要gitlabCI命令的帮助来传输文件。谢谢