From 63b929f90d9fcaf167f890ac0ed8df8a4a132879 Mon Sep 17 00:00:00 2001 From: this-is-tobi Date: Tue, 18 Feb 2025 15:40:12 +0100 Subject: [PATCH] fix: :bug: ignore proxy in kaniko args if not in dsc --- roles/gitlab/tasks/main.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/gitlab/tasks/main.yaml b/roles/gitlab/tasks/main.yaml index 523657e58..0965a2e4c 100644 --- a/roles/gitlab/tasks/main.yaml +++ b/roles/gitlab/tasks/main.yaml @@ -386,6 +386,7 @@ ansible.builtin.set_fact: extra_kaniko_args: "{{ extra_kaniko_args | default('') }} --registry-mirror {{ item.registry.endpointUrl | regex_replace('^https?://', '') }}/{{ item.name }}" loop: "{{ dsc.harbor.proxyCache }}" + when: dsc.harbor.proxyCache is defined - name: Set or update insecure args variables community.general.gitlab_group_variable: @@ -397,7 +398,7 @@ state: "{{ dsc.gitlab.insecureCI | ternary('present', 'absent') }}" variables: - name: EXTRA_KANIKO_ARGS - value: --skip-tls-verify {{ extra_kaniko_args }} + value: --skip-tls-verify {{ extra_kaniko_args | default('') }} - name: EXTRA_GIT_ARGS value: -c http.sslVerify=false - name: EXTRA_VAULT_ARGS