diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 327ff92..f3f714e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -306,6 +306,7 @@ run-patchday-dev: - if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == "main" run-patchday-dev-digitalocean: + extends: .run-ansible stage: run-patchday before_script: - echo "${ANSIBLE_VAULT_PASS_DEV}" > /tmp/vault-pass diff --git a/patchday.yml b/patchday.yml index 224d23f..db84644 100644 --- a/patchday.yml +++ b/patchday.yml @@ -259,6 +259,22 @@ until: sma_portal_avail.status in [200] rescue: + - name: "Check SMA-portal dependency << iam-instance >>is reachable" + become: no + uri: + url: "https://{{ stage }}-iam-01.{{ domain }}/api/v1/roles" + method: GET + status_code: [403] + register: iam_avail + delay: 10 + retries: 10 + no_log: true + until: iam.status in [403] + ignore_errors: yes # noqa ignore-errors + # patchday continues ion case of failed request towards iam service; + # iam service is hard dependency for SMA-portal-instance but not for + # patchday itself - it;s just a work around + - name: "Smardigo Patchday: SMA-portal not reachable - shutdown services" community.docker.docker_compose: project_src: '{{ item.path | dirname }}'