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 ecd4d1a commit c1dd352
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ansible_molecule_teststing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ concurrency:
cancel-in-progress: true

env:
PREINSTALL_MOLECULE_REQUIREMENTS: 'true'
PREINSTALL_MOLECULE_REQUIREMENTS: 'false'
PREINSTALL_MOLECULE_REQUIREMENTS_YAML_PATH: roles/requirements.yml
PREINSTALL_MOLECULE_REQUIREMENTS_SERVER: https://old-galaxy.ansible.com

jobs:
test_bareos:
Expand Down Expand Up @@ -64,17 +66,17 @@ jobs:
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 "-" && printf "%*s" ${COMMIT_MSG/*debug v/} | \
tr ' ' 'v'))
echo "DEBUG_OPT: $DEBUG_OPT"
echo "VERB_OPT: $VERB_OPT"
set -x
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 $VERB_OPT
if $PREINSTALL_MOLECULE_REQUIREMENTS && [[ -f "$PREINSTALL_MOLECULE_REQUIREMENTS_YAML_PATH" ]]; then
poetry --ansi run ansible-galaxy install -r "$PREINSTALL_MOLECULE_REQUIREMENTS_YAML_PATH" \
--server "$PREINSTALL_MOLECULE_REQUIREMENTS_SERVER" --timeout 300 $VERB_OPT
fi
cd roles/bareos
poetry --ansi run molecule $DEBUG_OPT $VERB_OPT test
env:
PY_COLORS: '1'
Expand Down
3 changes: 2 additions & 1 deletion roles/bareos/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ dependency:
# To switch on old Ansible Galaxy API (ansible < 2.13.5):
# https://forum.ansible.com/t/os-builds-failing-skipping-galaxy-server-https-galaxy-ansible-com-api/1408/9
env:
GALAXY_SERVER_TIMEOUT: 300
ANSIBLE_GALAXY_SERVER_TIMEOUT: 300
ANSIBLE_GALAXY_SERVER_LIST: https://galaxy.ansible.com, https://old-galaxy.ansible.com
driver:
name: docker
platforms:
Expand Down

0 comments on commit c1dd352

Please sign in to comment.