From 59976c7c6e95f1f052c9c45537e109d582c7f441 Mon Sep 17 00:00:00 2001 From: alexanderbazhenoff Date: Sat, 6 Apr 2024 22:49:14 +0300 Subject: [PATCH] fixes debug v2 --- .github/workflows/ansible_molecule_teststing.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ansible_molecule_teststing.yml b/.github/workflows/ansible_molecule_teststing.yml index 5649ce0..09db386 100644 --- a/.github/workflows/ansible_molecule_teststing.yml +++ b/.github/workflows/ansible_molecule_teststing.yml @@ -63,18 +63,21 @@ jobs: ls -lh / | grep tmp || true - name: Molecule test shell: bash - # poetry --ansi run ansible-galaxy install -r requirements.yml -vvv run: | printf "[defaults]\nremote_tmp = /tmp/.ansible-\${USER}/tmp" > $HOME/.ansible.cfg cd roles/bareos - DEBUG_OPT="$([[ "${{ github.event.head_commit.message }}" =~ .(debug) ]] && echo '--debug')" + DEBUG_OPT="$([[ "$COMMIT_MSG" =~ .(debug) ]] && echo '--debug')" + VERBOSE_OPT="$([[ "$COMMIT_MSG" =~ .(debug).v([1-3]) ]] && echo '-v ${COMMIT_MSG/*debug v/}')" echo "DEBUG_OPT: $DEBUG_OPT" + echo "VERBOSE_OPT: $VERBOSE_OPT" set -x - if [[ -f "requirements.yml" ]]; then - poetry --ansi run ansible-galaxy install -r requirements.yml --server https://old-galaxy.ansible.com -v 1 + if [[ -f "molecule/default/requirements.yml" ]]; then + poetry --ansi run ansible-galaxy install -r molecule/default/requirements.yml \ + --server https://old-galaxy.ansible.com --timeout 300 $VERBOSE_OPT fi - poetry --ansi run molecule $DEBUG_OPT test + poetry --ansi run molecule $DEBUG_OPT $VERBOSE_OPT test env: PY_COLORS: '1' ANSIBLE_FORCE_COLOR: '1' + COMMIT_MSG: ${{ github.event.head_commit.message }}