GitLab CI, artifacts:

From wikieduonline
Jump to navigation Jump to search

TO_MERGE GitLab artifacts:

/var/opt/gitlab/gitlab-rails/shared/artifacts/

artifacts:

GitLab artifacts:[edit]

.../...
  • artifacts:when



 artifacts:
   name: "Your name $CI_COMMIT_SHA"
   paths:
     - mycv.pdf
   expire_in: 1 week
/etc/gitlab/gitlab.rb
.../...
### Job Artifacts
# gitlab_rails['artifacts_enabled'] = true
# gitlab_rails['artifacts_path'] = "/var/opt/gitlab/gitlab-rails/shared/artifacts"

Examples[edit]

https://docs.gitlab.com/ee/ci/variables/#pass-an-environment-variable-to-another-job

build:
  stage: build
  script:
    - echo "BUILD_VARIABLE=value_from_build_job" >> build.env
  artifacts:
    reports:
      dotenv: build.env

deploy:
  stage: deploy
  variables:
    BUILD_VARIABLE: value_from_deploy_job
  script:
    - echo "$BUILD_VARIABLE"  # Output is: 'value_from_build_job' due to precedence
  environment: production

Related[edit]

See also[edit]

  • https://docs.gitlab.com/ee/ci/yaml/index.html#artifactsreports
  • https://docs.gitlab.com/ee/ci/yaml/artifacts_reports.html#artifactsreportsdotenv
  • Advertising: