Hello,
There is GitLab-CI configured for the project.
At the moment each commit triggers repository cloning from scratch.
There is an amount of jobs for building and each performs git clone.
What I want to have is to avoid cloning and to do git fetch.
Regarding configuration:
There are several remote virtual machines, each running GitLab-runner.
[[runners]]
name = "here_is_name"
url = "https://here_is_url"
token = "here_is_token"
executor = "docker"
[runners.docker]
tls_verify = false
image = "bionic"
dns = ["10.171.10.1", "10.171.10.2"]
dns_search = ["openstacklocal"]
privileged = false
disable_entrypoint_overwrite = false
cap_add = ["SYS_PTRACE", "SYS_NICE"]
oom_kill_disable = false
disable_cache = true
volumes = ["/cache", "/my_mounted_folder:ro"]
pull_policy = "never"
shm_size = 0
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
Some lines from .gitlab-ci.yml:
variables:
GIT_STRATEGY: fetch
GIT_SUBMODULE_STRATEGY: normal
stages: [ build, test, deploy, post ]
build:gcc:my_binary:
only: [ master]
stage: build
artifacts:
paths: [ cmake_build/bin/my_binary ]
expire_in: 1h
script: |
mkdir cmake_build
cd cmake_build
cmake ../
make -j16 my_binary
As I understand the feature I’m looking for is somehow related to caching functionality, but behavior is not changed whether I set disable_cache
to false or not…
And the other question not clear for me is where repository will be stored in time between different runs if Docker is used to perform the job on.
Looking forward to any suggestion regarding what might be wrong. Thanks.