Access artifact in next task to deploy


#1

Hello everyone,

I’ve recently started with GitLab and setup the following tasks in my gitlab-ci.yml:

  • task build
  • task deploy_test
  • task deploy_production

Now my task build creates an artifact(jar) which I can download from the UI but I want to access this artifact in my deploy_test and deploy_production. In https://docs.gitlab.com/ee/ci/yaml/README.html#dependencies I read that artifacts are automatically available in the next job if that job depends the job creating the artifact. But how do I access it? I want to grab this artifact and use it in my deploying task.

Thanks in regards for any help provided,

Falko


#2

Believe that I found the solution, when adding dependencies to a task all artifacts created by that task are downloaded and extracted in the build folder used by the next runner as documented in https://docs.gitlab.com/ee/user/project/pipelines/job_artifacts.html.