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 13e769a commit 5775d04
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/ansible_molecule_teststing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ concurrency:
${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

env:
PREINSTALL_MOLECULE_REQUIREMENTS: 'true'

jobs:
test_bareos:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -56,26 +59,21 @@ 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")"
sudo --version || true
poetry --ansi run ansible --version
poetry --ansi run ansible-galaxy --version
ls -lha /tmp || true
ls -lh / | grep tmp || true
- 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")
VERBOSE_OPT=$([[ "$COMMIT_MSG" =~ .(debug).v([1-3]) ]] && echo "-v ${COMMIT_MSG/*debug v/}")
VERB_OPT=$([[ "$COMMIT_MSG" =~ .(debug).v([1-6]) ]] && printf '-%*s' "${COMMIT_MSG/*debug v/}" | tr ' ' 'v')
echo "DEBUG_OPT: $DEBUG_OPT"
echo "VERBOSE_OPT: $VERBOSE_OPT"
echo "VERB_OPT: $VERB_OPT"
set -x
if [[ -f "molecule/default/requirements.yml" ]]; then
if $PREINSTALL_MOLECULE_REQUIREMENTS && [[ -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
--server https://old-galaxy.ansible.com --timeout 300 $VERB_OPT
fi
poetry --ansi run molecule $DEBUG_OPT $VERBOSE_OPT test
poetry --ansi run molecule $DEBUG_OPT $VERB_OPT test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
Expand Down

0 comments on commit 5775d04

Please sign in to comment.