I need to speed up job 'deploy'. It does not need sources of project but needs ONLY ARTIFACTS.
Typical .gitlab-ci.yml
(pseudo) looks like:
image: gcc
build:
stage: build
script:
- ./configure
- mkdir build && cd $_
- cmake ..
- make -sj8
artifacts:
paths:
- "build/*.elf"
deploy:
image: artifactory
variables:
- DO_NOT_CLONE: 1 ## WANT THIS OPTION
stage: deploy
script:
- push_artifacts build/*.elf
To enable or disable GitLab CI/CD Pipelines in your project: Navigate to Settings > General > Visibility, project features, permissions. Expand the Repository section. Enable or disable the Pipelines toggle as required.
GitLab and GitLab Runner perform a shallow clone by default.
GIT_STRATEGY=none requires GitLab Runner v1. 7+. You can set the GIT_STRATEGY used for getting recent application code, either in the global variables section or the variables section for individual jobs. If left unspecified, the default from project settings will be used.
Checkout the variable GIT_STRATEGY
:
variables:
GIT_STRATEGY: none
From the documentation:
none also re-uses the project workspace, but skips all Git operations (including GitLab Runner’s pre-clone script, if present). It is mostly useful for jobs that operate exclusively on artifacts (e.g., deploy).
https://docs.gitlab.com/ee/ci/runners/configure_runners.html#git-strategy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With