Skip to content

Commit

Permalink
Clean up CA test artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Feb 1, 2024
1 parent 819837e commit f534e08
Show file tree
Hide file tree
Showing 16 changed files with 189 additions and 52 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/ca-admin-user-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,20 @@ jobs:
run: |
docker exec pki pki -n caadmin ca-user-find
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -232,5 +242,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-admin-user
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
15 changes: 12 additions & 3 deletions .github/workflows/ca-basic-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,20 @@ jobs:
docker exec pki pki --debug -n caadmin ca-profile-add ${SHARED}/profile.xml
docker exec pki pki -n caadmin ca-profile-show caCustomUser
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -198,5 +208,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-basic
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
15 changes: 12 additions & 3 deletions .github/workflows/ca-cmc-shared-token-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,20 @@ jobs:
cat output | wc -l > actual
diff expected actual
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -397,5 +407,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-cmc-shared-token
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
15 changes: 12 additions & 3 deletions .github/workflows/ca-ds-connection-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,20 @@ jobs:
echo "0" > expected
diff expected actual
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -167,5 +177,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-ds-connection
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
15 changes: 12 additions & 3 deletions .github/workflows/ca-ecc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,20 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -267,5 +277,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-ecc
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
15 changes: 12 additions & 3 deletions .github/workflows/ca-existing-certs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,20 @@ jobs:
docker exec pki pki ca-cert-find
docker exec pki pki -n caadmin ca-cert-request-find
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -380,5 +390,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-existing-certs
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
15 changes: 12 additions & 3 deletions .github/workflows/ca-existing-hsm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,20 @@ jobs:
docker exec pki pki ca-cert-find
docker exec pki pki -n caadmin ca-cert-request-find
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -437,5 +447,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-existing-hsm
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
15 changes: 12 additions & 3 deletions .github/workflows/ca-existing-nssdb-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,20 @@ jobs:
docker exec pki pki ca-cert-find
docker exec pki pki -n caadmin ca-cert-request-find
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -324,5 +334,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-existing-nssdb
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
15 changes: 12 additions & 3 deletions .github/workflows/ca-hsm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,20 @@ jobs:
--pkcs12-password Secret.123
docker exec pki pki -n caadmin ca-user-show caadmin
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -237,5 +247,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-hsm
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
15 changes: 12 additions & 3 deletions .github/workflows/ca-non-default-user-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,20 @@ jobs:
--pkcs12-password Secret.123
docker exec pki pki -n caadmin ca-user-show caadmin
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -105,5 +115,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-systemd
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
15 changes: 12 additions & 3 deletions .github/workflows/ca-nuxwdog-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,20 @@ jobs:
docker exec pki pki info
docker exec pki pki -n caadmin ca-user-show caadmin
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -164,5 +174,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-nuxwdog-test
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
16 changes: 9 additions & 7 deletions .github/workflows/ca-pruning-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -425,17 +425,20 @@ jobs:
echo "RequestNotFoundException: Request ID $REQUEST_ID not found" > expected
diff expected stderr
- name: Check debug log
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki ls /var/log/pki/pki-tomcat/ca | tee output
FILENAME=$(sed -n "/^debug\./p" output | sort | tail -1)
docker exec pki cat /var/log/pki/pki-tomcat/ca/$FILENAME
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -447,5 +450,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-pruning
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
15 changes: 12 additions & 3 deletions .github/workflows/ca-rsa-pss-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,20 @@ jobs:
sed -n -e "s/\s*$//" -e "s/^\s*Signature Algorithm:\s*\(.*\)$/\1/p" output | uniq > actual
diff expected actual
- name: Check PKI server systemd journal
if: always()
run: |
docker exec pki journalctl -x --no-pager -u pki-tomcatd@pki-tomcat.service
- name: Check CA debug log
if: always()
run: |
docker exec pki find /var/log/pki/pki-tomcat/ca -name "debug.*" -exec cat {} \;
- name: Gather artifacts
if: always()
run: |
tests/bin/ds-artifacts-save.sh --output=/tmp/artifacts/pki ds
tests/bin/ds-artifacts-save.sh ds
tests/bin/pki-artifacts-save.sh pki
continue-on-error: true

Expand All @@ -276,5 +286,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ca-rsa-pss
path: |
/tmp/artifacts/pki
path: /tmp/artifacts
Loading

0 comments on commit f534e08

Please sign in to comment.