Skip to content

Commit

Permalink
fixes debug v2
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbazhenoff committed Apr 6, 2024
1 parent 5775d04 commit 1fe4de0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/ansible_molecule_teststing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ jobs:
poetry --version || true
ESC="$(printf "\033")"
printf "Packages:\n%s\n \n" "$(poetry --ansi run pip list | sed -e "s/ /${ESC}[1;35m /g; s/$/${ESC}[0m/g")"
# Use 'debug' word in commit message to debug molecule testing, use debug v[1..6] to enable verbose logging.
- name: Molecule test
shell: bash
run: |
printf "[defaults]\nremote_tmp = /tmp/.ansible-\${USER}/tmp" > $HOME/.ansible.cfg
cd roles/bareos
DEBUG_OPT=$([[ "$COMMIT_MSG" =~ .(debug) ]] && echo "--debug")
VERB_OPT=$([[ "$COMMIT_MSG" =~ .(debug).v([1-6]) ]] && printf '-%*s' "${COMMIT_MSG/*debug v/}" | tr ' ' 'v')
VERB_OPT=$([[ "$COMMIT_MSG" =~ .(debug).v([1-6]) ]] && (printf "-" && printf "%*s" ${COMMIT_MSG/*debug v/} | \
tr ' ' 'v'))
echo "DEBUG_OPT: $DEBUG_OPT"
echo "VERB_OPT: $VERB_OPT"
set -x
Expand Down

0 comments on commit 1fe4de0

Please sign in to comment.