diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index eb5e0d8..30e742d 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -32,7 +32,7 @@ jobs: - name: Install tox, tox-lsr run: | set -euxo pipefail - pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.8.0" + pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0" - name: Convert role to collection format id: collection diff --git a/.github/workflows/ansible-managed-var-comment.yml b/.github/workflows/ansible-managed-var-comment.yml index ea68dfc..899de6f 100644 --- a/.github/workflows/ansible-managed-var-comment.yml +++ b/.github/workflows/ansible-managed-var-comment.yml @@ -30,7 +30,7 @@ jobs: - name: Install tox, tox-lsr run: | set -euxo pipefail - pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.8.0" + pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0" - name: Run ansible-plugin-scan run: | diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index f86338e..961538c 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -33,7 +33,7 @@ jobs: - name: Install tox, tox-lsr run: | set -euxo pipefail - pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.8.0" + pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0" - name: Convert role to collection format run: | diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index e08cb4b..c049a61 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -90,6 +90,12 @@ jobs: if: env.RELEASE_VERSION == 'latest' run: cp ${{ env.RELEASE_VERSION }}/README.html docs/index.html + - name: Upload README.html as an artifact + uses: actions/upload-artifact@master + with: + name: README.html + path: ${{ env.RELEASE_VERSION }}/README.html + - name: Commit changes run: | git config --global user.name "${{ github.actor }}" diff --git a/.github/workflows/qemu-kvm-integration-tests.yml b/.github/workflows/qemu-kvm-integration-tests.yml index 5cdf7d6..8d021db 100644 --- a/.github/workflows/qemu-kvm-integration-tests.yml +++ b/.github/workflows/qemu-kvm-integration-tests.yml @@ -105,7 +105,7 @@ jobs: python3 -m pip install --upgrade pip sudo apt update sudo apt install -y --no-install-recommends git ansible-core genisoimage qemu-system-x86 - pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.8.0" + pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0" - name: Configure tox-lsr if: steps.check_platform.outputs.supported @@ -117,7 +117,8 @@ jobs: if: steps.check_platform.outputs.supported && startsWith(matrix.scenario.env, 'qemu') run: >- tox -e ${{ matrix.scenario.env }} -- --image-name ${{ matrix.scenario.image }} --make-batch - --log-level=debug --skip-tags tests::infiniband,tests::nvme,tests::scsi -- + --log-level debug --skip-tags tests::infiniband,tests::nvme,tests::scsi + --lsr-report-errors-url DEFAULT -- - name: Qemu result summary if: steps.check_platform.outputs.supported && startsWith(matrix.scenario.env, 'qemu') && always() @@ -127,15 +128,18 @@ jobs: # actual test playbook that starts with tests_ while read code start end test_files; do for f in $test_files; do - f="$(basename $f)" + test_file="$f" + f="$(basename $test_file)" if [[ "$f" =~ ^tests_ ]]; then break fi done if [ "$code" = "0" ]; then echo -n "PASS: " + mv "$test_file.log" "${test_file}-SUCCESS.log" else echo -n "FAIL: " + mv "$test_file.log" "${test_file}-FAIL.log" fi echo "$f" done < batch.report @@ -151,8 +155,10 @@ jobs: for t in tests/tests_*.yml; do if tox -e ${{ matrix.scenario.env }} -- --image-name ${{ matrix.scenario.image }} $t > ${t}.log 2>&1; then echo "PASS: $(basename $t)" + mv "${t}.log" "${t}-SUCCESS.log" else echo "FAIL: $(basename $t)" + mv "${t}.log" "${t}-FAIL.log" rc=1 fi done @@ -175,13 +181,14 @@ jobs: if: steps.check_platform.outputs.supported && failure() run: | set -euo pipefail - for f in tests/*.log; do - if FAIL=$(grep -E -B100 -A30 "fatal:|An exception occurred" "$f"); then - echo "::group::$(basename $f)" - echo "$FAIL" - echo "::endgroup::" - fi + # grab check_logs.py script + curl -s -L -o check_logs.py https://raw.githubusercontent.com/linux-system-roles/auto-maintenance/refs/heads/main/check_logs.py + chmod +x check_logs.py + declare -a cmdline=(./check_logs.py --github-action-format) + for log in tests/*-FAIL.log; do + cmdline+=(--lsr-error-log "$log") done + "${cmdline[@]}" - name: Set commit status as success with a description that platform is skipped if: ${{ steps.check_platform.outputs.supported == '' }} diff --git a/.github/workflows/tft.yml b/.github/workflows/tft.yml index 02fb1b6..d13a921 100644 --- a/.github/workflows/tft.yml +++ b/.github/workflows/tft.yml @@ -72,8 +72,8 @@ jobs: meta_main=meta/main.yml # All Fedora are supported, add latest Fedora versions to supported_platforms if yq '.galaxy_info.galaxy_tags[]' "$meta_main" | grep -qi fedora$; then - supported_platforms+=" Fedora-40" supported_platforms+=" Fedora-41" + supported_platforms+=" Fedora-42" fi # Specific Fedora versions supported if yq '.galaxy_info.galaxy_tags[]' "$meta_main" | grep -qiP 'fedora\d+$'; then @@ -98,10 +98,10 @@ jobs: fail-fast: false matrix: include: - - platform: Fedora-40 - ansible_version: 2.17 - platform: Fedora-41 ansible_version: 2.17 + - platform: Fedora-42 + ansible_version: 2.17 - platform: CentOS-7-latest ansible_version: 2.9 - platform: CentOS-Stream-8