diff --git a/README.md b/README.md index 31361df49c639c57cb4527d30b0237662315adba..c8ad25c4c88032b49d5b481fdc8f0a7663b38388 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,12 @@ pages_listen_proxy: '' # external url for the container registry, set to Null to disable registry_external_url: ~ -# alternative storage path for registry, only considere when registry_external_url is set. set to Null to use defaults +# alternative storage path for registry, only considere when registry_external_url is set. Set to Null to use defaults registry_path: ~ +# alternative storage path for artifacts. Set to Null to use defaults +artifacts_path: ~ + # external ssh host, can be different from external_url gitlab_ssh_host: 'localhost' diff --git a/defaults/main.yml b/defaults/main.yml index 12b928f9ec1bab0eb35d30882d034b70ba5fa671..15f8cd95fffffbbeca368b151073837a7400e82e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,6 +11,7 @@ gitlab: pages_listen_proxy: 'localhost:11181' registry_path: ~ registry_external_url: ~ + artifacts_path: ~ gitlab_ssh_host: 'localhost' gitlab_shell_ssh_port: 22 initial_root_password: "{{ lookup('password', '/dev/null length=64') }}" diff --git a/templates/gitlab.rb.j2 b/templates/gitlab.rb.j2 index 00d804fc85837c02ee64e8975ce6b63721338102..8a4c51004c1bec81494c82d11511210fffc92606 100644 --- a/templates/gitlab.rb.j2 +++ b/templates/gitlab.rb.j2 @@ -231,6 +231,9 @@ gitlab_rails['gitlab_username_changing_enabled'] = false ### Job Artifacts # gitlab_rails['artifacts_enabled'] = true # gitlab_rails['artifacts_path'] = "/var/opt/gitlab/gitlab-rails/shared/artifacts" +{% if gitlab.artifacts_path %} +gitlab_rails['artifacts_path'] = "{{ gitlab.artifacts_path }}" +{% endif %} ####! Job artifacts Object Store ####! Docs: https://docs.gitlab.com/ee/administration/job_artifacts.html#using-object-storage # gitlab_rails['artifacts_object_store_enabled'] = false