Update Konflux references #116
This file contains hidden or 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: Integration test (foremanctl) | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| foremanctl_ref: | |
| description: 'foremanctl branch or tag to test against' | |
| required: false | |
| default: 'master' | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: integration-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| env: | |
| IMAGE_TAG: "3.19" | |
| jobs: | |
| integration: | |
| runs-on: ubuntu-24.04 | |
| name: foremanctl integration | |
| steps: | |
| - name: Checkout foreman-oci-images | |
| uses: actions/checkout@v6 | |
| - name: Build foreman image | |
| run: make build PROJECT=foreman FOREMAN_XY_TAG=${{ env.IMAGE_TAG }} | |
| - name: Build foreman-proxy image | |
| run: make build PROJECT=foreman-proxy FOREMAN_XY_TAG=${{ env.IMAGE_TAG }} | |
| - name: Export images as tarballs | |
| run: | | |
| podman save -o foreman-image.tar quay.io/foreman/foreman:${{ env.IMAGE_TAG }} | |
| podman save -o foreman-proxy-image.tar quay.io/foreman/foreman-proxy:${{ env.IMAGE_TAG }} | |
| - name: Checkout foremanctl | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: theforeman/foremanctl | |
| ref: ${{ github.event.inputs.foremanctl_ref || 'master' }} | |
| path: foremanctl | |
| - name: Prepare images for VM transfer | |
| run: | | |
| mv foreman-image.tar foremanctl/ | |
| mv foreman-proxy-image.tar foremanctl/ | |
| - name: Set container_tag_stream to ${{ env.IMAGE_TAG }} | |
| run: | | |
| sed -i '/container_tag_stream:/ s/:.*/: "${{ env.IMAGE_TAG }}"/' foremanctl/src/vars/images.yml | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.12' | |
| - name: Setup libvirt for Vagrant | |
| uses: voxpupuli/setup-vagrant@v0 | |
| - name: Install Ansible | |
| run: pip install --upgrade ansible-core | |
| - name: Setup environment | |
| working-directory: foremanctl | |
| run: ./setup-environment | |
| - name: Start VM | |
| working-directory: foremanctl | |
| run: ./forge vms start --vms "quadlet" | |
| - name: Install podman in VM | |
| working-directory: foremanctl | |
| run: vagrant ssh quadlet -- sudo dnf install -y podman | |
| - name: Load images into VM | |
| working-directory: foremanctl | |
| run: | | |
| vagrant ssh quadlet -- sudo podman load -i /vagrant/foreman-image.tar | |
| vagrant ssh quadlet -- sudo podman load -i /vagrant/foreman-proxy-image.tar | |
| - name: Free disk space | |
| run: | | |
| rm -f foremanctl/foreman-image.tar foremanctl/foreman-proxy-image.tar | |
| podman system prune --all --force | |
| - name: Configure repositories | |
| working-directory: foremanctl | |
| run: ./forge setup-repositories | |
| - name: Run deployment | |
| working-directory: foremanctl | |
| run: | | |
| ./foremanctl deploy --initial-admin-password=changeme --tuning development --add-feature hammer --add-feature foreman-proxy --add-feature remote-execution | |
| - name: Run tests | |
| working-directory: foremanctl | |
| run: | | |
| ./forge test --pytest-args="-k 'not candlepin_events' tests/foreman_target_test.py tests/foreman_test.py tests/foreman_proxy_test.py tests/redis_test.py tests/postgresql_test.py tests/httpd_test.py tests/hammer_test.py" | |
| - name: Generate sos reports | |
| if: ${{ always() }} | |
| working-directory: foremanctl | |
| run: ./forge sos | |
| - name: Archive sos reports | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: sosreport-integration | |
| path: foremanctl/sos/ |