name: 'Periodic job: LOCAL (test Konflux UI against local cluster)' on: workflow_dispatch: schedule: - cron: '0 0 * * *' jobs: periodic-local-e2e-test: runs-on: ubuntu-latest env: REF_BRANCH: ${{ github.ref_name}} HEAD_SHA: ${{ github.sha }} JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} PERIODIC_JOBS_SLACK_WEBHOOK_URL: ${{ secrets.PERIODIC_JOBS_SLACK_WEBHOOK_URL }} # secrets CYPRESS_GH_TOKEN: ${{ secrets.HAC_TEST_GH_TOKEN }} GH_APP_ID: ${{ secrets.GH_APP_ID }} GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }} GH_APP_WEBHOOK_SECRET: ${{ secrets.GH_APP_WEBHOOK_SECRET }} QUAY_TEST_ORG: ${{ secrets.QUAY_TEST_ORG }} QUAY_TOKEN_TEST: ${{ secrets.QUAY_TOKEN_TEST }} SMEE_URL: ${{ secrets.SMEE_URL }} CYPRESS_USERNAME: ${{ secrets.CYPRESS_USERNAME }} CYPRESS_PASSWORD: ${{ secrets.CYPRESS_PASSWORD }} CYPRESS_KONFLUX_BASE_URL: 'https://localhost:9443' CYPRESS_PROJECT_ID: ${{ secrets.PROJECT_ID }} CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} JOB_TYPE: 'periodic-local' steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: ${{ github.repository }} ref: '${{ env.HEAD_SHA }}' - name: Enable Corepack 📦 run: corepack enable - name: Disc space stats run: | set -x df -h --total free -m # Redirect Cypress Cache to /mnt to free up disk space on /dev/root - name: Redirect Cypress Cache to /mnt run: | sudo mkdir -p /mnt/cypress_cache sudo chown -R runner:docker /mnt/cypress_cache # Create the link so Cypress installs to /mnt instead of / mkdir -p ~/.cache ln -s /mnt/cypress_cache ~/.cache/Cypress - name: Force Docker to /mnt run: | # Stop Docker completely sudo systemctl stop docker.socket sudo systemctl stop docker sudo mkdir -p /mnt/docker # Create a Systemd Override (This is more powerful than daemon.json) sudo mkdir -p /etc/systemd/system/docker.service.d printf '[Service]\nExecStart=\nExecStart=/usr/bin/dockerd --data-root=/mnt/docker -H fd://' | sudo tee /etc/systemd/system/docker.service.d/override.conf sudo systemctl daemon-reload sudo systemctl start docker - name: Move npm/yarn cache to /mnt run: | sudo mkdir -p /mnt/npm_cache sudo chown -R runner:docker /mnt/npm_cache sudo npm config set cache /mnt/npm_cache --global # Configure Yarn Berry cache location sudo mkdir -p /mnt/yarn_cache sudo chown -R runner:docker /mnt/yarn_cache export YARN_CACHE_FOLDER=/mnt/yarn_cache - name: Redirect Podman Storage to /mnt run: | # 1. Create the new storage directory sudo mkdir -p /mnt/podman_storage sudo chown -R runner:docker /mnt/podman_storage # 2. Create/Override the Podman storage config mkdir -p ~/.config/containers cat < ~/.config/containers/storage.conf [storage] driver = "overlay" graphroot = "/mnt/podman_storage" EOF # 3. Verify the change podman info --format '{{.Store.GraphRoot}}' - name: Deploy konflux-ci id: pr-check-action uses: ./.github/actions/konflux-ui-deploy-test with: job-type: ${{ env.JOB_TYPE }} - name: Disc space stats after deploy run: | set -x df -h --total free -m kubectl describe nodes - name: Konflux-ui e2e test uses: ./.github/actions/konflux-ui-e2e-test - name: Disc space stats after e2e test if: ${{ always() }} run: | set -x df -h --total free -m kubectl describe nodes # This finds the top 10 largest directories on the root partition du -h / --max-depth=2 2>/dev/null | sort -hr | head -n 10 - name: Upload e2e coverage to Codecov if: ${{ always() && env.CODECOV_TOKEN != '' }} run: ./pr_check.sh upload-coverage - name: Generate error logs if: ${{ always() }} uses: ./.github/actions/generate-error-logs