I'm trying to run this pipeline:
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
Stage build completes successfuly but I get this at the deploy stage:
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
And obviously failed because
./packer: No such file or directory
I don't understand why this files fetched from build get removed?
 
    