Updating version to v10.13.11 #2194
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: | |
init: | |
name: Initialization | |
uses: ./.github/workflows/init.yml | |
secrets: inherit | |
build: | |
name: Waiting for build | |
needs: init | |
runs-on: ubuntu-latest | |
steps: | |
- name: Wait for build | |
uses: lewagon/wait-on-check-action@v1.2.0 | |
with: | |
ref: ${{ github.ref }} | |
check-name: 'Building PKI' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
wait-interval: 30 | |
if: github.event_name == 'push' | |
- name: Wait for build | |
uses: lewagon/wait-on-check-action@v1.2.0 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
check-name: 'Building PKI' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
wait-interval: 30 | |
if: github.event_name == 'pull_request' | |
# 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: [init, build] | |
runs-on: ubuntu-latest | |
env: | |
PKIDIR: /tmp/workdir/pki | |
steps: | |
- name: Clone the repository | |
uses: actions/checkout@v3 | |
- 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-runner image | |
uses: actions/cache@v3 | |
with: | |
key: pki-runner-${{ github.sha }} | |
path: pki-runner.tar | |
- name: Load runner image | |
run: docker load --input pki-runner.tar | |
- name: Run master container | |
run: | | |
IMAGE=pki-runner \ | |
NAME=pki1 \ | |
HOSTNAME=pki1.example.com \ | |
tests/bin/runner-init.sh | |
- 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 \ | |
--ansible-host-pattern master \ | |
--ansible-inventory inventory \ | |
--ansible-module-path tests/dogtag/pytest-ansible/common-modules \ | |
--junit-xml pki_cert_junit.xml \ | |
-qsvvv \ | |
tests/dogtag/pytest-ansible/pytest/sanity/test_role_users.py | |
- name: Gather artifacts | |
if: always() | |
run: | | |
tests/bin/ds-artifacts-save.sh pki1 topology-02-testingmaster | |
mkdir -p /tmp/artifacts/pki1/etc/pki | |
mkdir -p /tmp/artifacts/pki1/var/log | |
docker exec pki1 ls -la /etc/pki | |
docker cp pki1:/etc/pki/pki.conf /tmp/artifacts/pki1/etc/pki | |
docker cp pki1:/etc/pki/topology-02-CA /tmp/artifacts/pki1/etc/pki | |
docker cp pki1:/etc/pki/topology-02-KRA /tmp/artifacts/pki1/etc/pki | |
docker cp pki1:/etc/pki/topology-02-OCSP /tmp/artifacts/pki1/etc/pki | |
docker cp pki1:/etc/pki/topology-02-TKS /tmp/artifacts/pki1/etc/pki | |
docker cp pki1:/etc/pki/topology-02-TPS /tmp/artifacts/pki1/etc/pki | |
docker exec pki1 ls -la /var/log/pki | |
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 | |
- name: Upload artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sanity | |
path: | | |
/tmp/artifacts/pki1 |