From 8686e904d74deccfe12926b3251c2b02943eb5bc Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 28 Feb 2024 17:38:54 -0600 Subject: [PATCH] Update IPA tests to display logs --- .github/workflows/ipa-acme-test.yml | 15 +++++++++--- .github/workflows/ipa-basic-test.yml | 10 ++++++++ .github/workflows/ipa-clone-test.yml | 35 ++++++++++++++++++---------- .github/workflows/ipa-subca-test.yml | 15 +++++++++--- 4 files changed, 57 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ipa-acme-test.yml b/.github/workflows/ipa-acme-test.yml index 2e01fbf4abf..05912ac1e2a 100644 --- a/.github/workflows/ipa-acme-test.yml +++ b/.github/workflows/ipa-acme-test.yml @@ -140,6 +140,16 @@ jobs: docker exec ipa bash -c "pki acme-info | sed -n 's/\s*Status:\s\+\(\S\+\).*/\1/p' > ${SHARED}/actual" diff expected actual + - name: Check PKI server systemd journal + if: always() + run: | + docker exec ipa journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service + + - name: Check CA debug log + if: always() + run: | + docker exec ipa find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \; + - name: Gather artifacts from IPA container if: always() run: | @@ -155,6 +165,5 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: ipa-acme - path: | - /tmp/artifacts/ipa + name: ipa-acme-test + path: /tmp/artifacts/ipa diff --git a/.github/workflows/ipa-basic-test.yml b/.github/workflows/ipa-basic-test.yml index 0bbb4394d64..91bcd42650a 100644 --- a/.github/workflows/ipa-basic-test.yml +++ b/.github/workflows/ipa-basic-test.yml @@ -244,6 +244,16 @@ jobs: run: | docker exec ipa cat /var/log/ipaserver-kra-install.log + - name: Check PKI server systemd journal + if: always() + run: | + docker exec ipa journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service + + - name: Check CA debug log + if: always() + run: | + docker exec ipa find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \; + - name: Gather artifacts if: always() run: | diff --git a/.github/workflows/ipa-clone-test.yml b/.github/workflows/ipa-clone-test.yml index 158104fd88c..6133c2a8c09 100644 --- a/.github/workflows/ipa-clone-test.yml +++ b/.github/workflows/ipa-clone-test.yml @@ -615,6 +615,26 @@ jobs: - name: Remove IPA server from secondary container run: docker exec secondary ipa-server-install --uninstall -U --ignore-last-of-role + - name: Check PKI server systemd journal in primary container + if: always() + run: | + docker exec primary journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service + + - name: Check CA debug log in primary container + if: always() + run: | + docker exec primary find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \; + + - name: Check PKI server systemd journal in secondary container + if: always() + run: | + docker exec secondary journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service + + - name: Check CA debug log in secondary container + if: always() + run: | + docker exec secondary find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \; + - name: Gather artifacts from primary container if: always() run: | @@ -640,18 +660,9 @@ jobs: - name: Remove network run: docker network rm example - - name: Upload artifacts from primary container - if: always() - uses: actions/upload-artifact@v4 - with: - name: ipa-clone-primary - path: | - /tmp/artifacts/primary - - - name: Upload artifacts from secondary container + - name: Upload artifacts if: always() uses: actions/upload-artifact@v4 with: - name: ipa-clone-secondary - path: | - /tmp/artifacts/secondary + name: ipa-clone-test + path: /tmp/artifacts/secondary diff --git a/.github/workflows/ipa-subca-test.yml b/.github/workflows/ipa-subca-test.yml index 83653289db7..19b3f17fcff 100644 --- a/.github/workflows/ipa-subca-test.yml +++ b/.github/workflows/ipa-subca-test.yml @@ -98,6 +98,16 @@ jobs: --pkcs12-password Secret.123 docker exec ipa pki -n ipa-ca-agent ca-user-show admin + - name: Check PKI server systemd journal + if: always() + run: | + docker exec ipa journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service + + - name: Check CA debug log + if: always() + run: | + docker exec ipa find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \; + - name: Gather artifacts if: always() run: | @@ -113,6 +123,5 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: ipa-subca - path: | - /tmp/artifacts/ipa + name: ipa-subca-test + path: /tmp/artifacts