【发布时间】:2021-04-11 01:36:36
【问题描述】:
我正在尝试运行此管道:
stages:
– build
– deploy
get_packer:
stage: build
artifacts:
paths:
– packer
script:
– echo "Fetching packer"
– wget https://releases.hashicorp.com/packer/1.5.5/packer_1.5.5_linux_amd64.zip -O packer.zip
- unzip -o packer.zip -d packer
- cd packer
- chmod +x packer
deploy_centos-7:
stage: deploy
script:
– echo "Deploying CentOS 7"
– cd packer
– ./packer build centos/centos-7.json
阶段构建成功完成,但我在部署阶段得到了这个:
Reinitialized existing Git repository in /home/gitlab-runner/builds/c04fe5cf/0/project/pak/.git/
Checking out 43dsq6aa as refs/merge-requests/3292/head...
Removing packer.zip
Removing packer/packer
显然失败了,因为
./packer: No such file or directory
我不明白为什么从构建中获取的这些文件会被删除?
【问题讨论】:
-
这能回答你的问题吗? How can I pass artifacts to another stage?
标签: gitlab-ci