From 2495423d2cc53636d3e2b794f297c7305ae1a909 Mon Sep 17 00:00:00 2001 From: jyejare Date: Thu, 14 Sep 2023 17:59:01 +0530 Subject: [PATCH] PR checks without vault login --- .github/workflows/pull_request.yml | 2 ++ robottelo/utils/vault.py | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 582725d6e85..d084dc1989e 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -40,6 +40,8 @@ jobs: for conffile in conf/*.yaml.template; do mv -- "$conffile" "${conffile%.yaml.template}.yaml"; done cp broker_settings.yaml.example broker_settings.yaml cp .env.example .env + # To skip vault login in pull request checks + export VAULT_SECRET_ID_FOR_DYNACONF=somesecret - name: Pre Commit Checks uses: pre-commit/action@v3.0.0 diff --git a/robottelo/utils/vault.py b/robottelo/utils/vault.py index 1c5d70cb209..e643dafb0cd 100644 --- a/robottelo/utils/vault.py +++ b/robottelo/utils/vault.py @@ -59,10 +59,7 @@ def exec_vault_command(self, command: str, **kwargs): return vcommand def login(self, **kwargs): - if ( - re.search(r'\s*#.*VAULT_SECRET_ID_FOR_DYNACONF', self.env_path.read_text()) - and 'VAULT_SECRET_ID_FOR_DYNACONF' not in os.environ - ): + if 'VAULT_SECRET_ID_FOR_DYNACONF' not in os.environ: if self.status(**kwargs).returncode != 0: logger.warning( "Warning! The browser is about to open for vault OIDC login, "