'Gitlab artifact not passed to next job

I'm trying to prepare this simple pipeline in GitLab that would upload the package to S3. Build phase is working fine and I can download the artifact from the UI but it's not getting passed to the deploy stage. I tried adding/removing the dependency but it doesn't change anything. I added the 'find .' to the script to see the actual files but the artifact is not listed.

I get the error The user-provided path myrepo.zip does not exist.

image: python:latest

variables:
  BASEFILE: "myrepo"

stages:
  - build
  - deploy

build:
  stage: build
  script:
    - echo `date` >> timestamp.txt

  artifacts:
    name: $BASEFILE
    paths:
      - myrepo

deploy:
  stage: deploy
  dependencies:
    - build
  script:
    - find . 
    - pip install awscli
    - aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
    - aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
    - aws configure set region eu-central-1
    - aws s3 cp myrepo.zip s3://elasticbeanstalk-eu-central-XXXXX/myrepo-$CI_PIPELINE_ID.zip


Solution 1:[1]

I am having a similar issue so I'll give you the troubleshooting steps I've taken. In you CICD logs for the build job, do you see a line that says,

Uploading artifacts...
myrepo: found XX matching files and directories 
Uploading artifacts as "archive" to coordinator... ok  id=1000 responseStatus=201 Created token=asdffdd

You can also manually verify that there's a job artifact in Gitlab.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Petr Lyapunov