Fix pki-server subsystem-cert-export #2187
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: QE Tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Waiting for build | |
uses: ./.github/workflows/wait-for-build.yml | |
secrets: inherit | |
# Tier 0 | |
installation-sanity-test: | |
# This job uses Ansible playbooks in the tests dir to setup a PKI deployment. | |
# All 5 subsystems are deployed on "discrete" instances | |
name: Testing installation sanity | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
SHARED: /tmp/workdir/pki | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install python3-pip | |
pip3 install -r tests/dogtag/pytest-ansible/requirements.txt | |
pip3 install -e tests/dogtag/pytest-ansible | |
- name: Retrieve PKI images | |
uses: actions/cache@v4 | |
with: | |
key: pki-images-${{ github.sha }} | |
path: pki-images.tar | |
- name: Load PKI images | |
run: docker load --input pki-images.tar | |
- name: Run master container | |
run: | | |
tests/bin/runner-init.sh pki1 | |
env: | |
HOSTNAME: pki1.example.com | |
- name: Install dependencies in master container | |
run: docker exec pki1 dnf install -y 389-ds-base python3-pip | |
- name: Set up inventory | |
run: | | |
sed -e "s/TOPOLOGY/topology-02/g" tests/inventory > inventory | |
ansible -i inventory -m setup master | |
- name: Set up topology-02 | |
run: | | |
mkdir -p /tmp/test_dir | |
ansible-playbook \ | |
-b \ | |
-i inventory \ | |
-l all \ | |
-M tests/dogtag/pytest-ansible/common-modules \ | |
-vvv \ | |
tests/dogtag/pytest-ansible/installation/main.yml | |
- name: Run sanity test | |
run: | | |
pytest \ | |
--log-cli-level=INFO \ | |
--ansible-host-pattern master \ | |
--ansible-inventory inventory \ | |
--ansible-module-path tests/dogtag/pytest-ansible/common-modules \ | |
--junit-xml pki_cert_junit.xml \ | |
-qsvvv \ | |
-x \ | |
tests/dogtag/pytest-ansible/pytest/sanity/test_role_users.py | |
- name: Gather artifacts | |
if: always() | |
run: | | |
tests/bin/ds-artifacts-save.sh pki1 --instance topology-02-testingmaster | |
docker exec pki1 ls -la /etc/pki | |
mkdir -p /tmp/artifacts/pki1/etc/pki | |
docker cp pki1:/etc/pki/pki.conf /tmp/artifacts/pki1/etc/pki | |
docker exec pki1 ls -la /var/lib/pki/topology-02-CA/conf | |
mkdir -p /tmp/artifacts/pki1/var/lib/pki/conf | |
docker cp pki1:/var/lib/pki/topology-02-CA/conf/. /tmp/artifacts/pki1/var/lib/pki/conf | |
docker exec pki1 ls -la /var/lib/pki/topology-02-KRA/conf | |
mkdir -p /tmp/artifacts/pki1/var/lib/pki/conf | |
docker cp pki1:/var/lib/pki/topology-02-KRA/conf/. /tmp/artifacts/pki1/var/lib/pki/conf | |
docker exec pki1 ls -la /var/lib/pki/topology-02-OCSP/conf | |
mkdir -p /tmp/artifacts/pki1/var/lib/pki/conf | |
docker cp pki1:/var/lib/pki/topology-02-OCSP/conf/. /tmp/artifacts/pki1/var/lib/pki/conf | |
docker exec pki1 ls -la /var/lib/pki/topology-02-TKS/conf | |
mkdir -p /tmp/artifacts/pki1/var/lib/pki/conf | |
docker cp pki1:/var/lib/pki/topology-02-TKS/conf/. /tmp/artifacts/pki1/var/lib/pki/conf | |
docker exec pki1 ls -la /var/lib/pki/topology-02-TPS/conf | |
mkdir -p /tmp/artifacts/pki1/var/lib/pki/conf | |
docker cp pki1:/var/lib/pki/topology-02-TPS/conf/. /tmp/artifacts/pki1/var/lib/pki/conf | |
docker exec pki1 ls -la /var/log/pki | |
mkdir -p /tmp/artifacts/pki1/var/log | |
docker cp pki1:/var/log/pki /tmp/artifacts/pki1/var/log | |
docker exec pki1 journalctl -u pki-tomcatd@topology-02-CA > /tmp/artifacts/pki1/var/log/pki/topology-02-CA/systemd.log | |
docker exec pki1 journalctl -u pki-tomcatd@topology-02-KRA > /tmp/artifacts/pki1/var/log/pki/topology-02-KRA/systemd.log | |
docker exec pki1 journalctl -u pki-tomcatd@topology-02-OCSP > /tmp/artifacts/pki1/var/log/pki/topology-02-OCSP/systemd.log | |
docker exec pki1 journalctl -u pki-tomcatd@topology-02-TKS > /tmp/artifacts/pki1/var/log/pki/topology-02-TKS/systemd.log | |
docker exec pki1 journalctl -u pki-tomcatd@topology-02-TPS > /tmp/artifacts/pki1/var/log/pki/topology-02-TPS/systemd.log | |
continue-on-error: true | |
- name: Upload artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sanity | |
path: | | |
/tmp/artifacts/pki1 |