Test Registry Proxy #779
Workflow file for this run
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: Test Registry Proxy | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - "**.md" | |
| - "**.jpg" | |
| - "**.png" | |
| - "**.gif" | |
| - "**.svg" | |
| - "adr/**" | |
| - "docs/**" | |
| - "CODEOWNERS" | |
| merge_group: | |
| paths-ignore: | |
| - "**.md" | |
| - "**.jpg" | |
| - "**.png" | |
| - "**.gif" | |
| - "**.svg" | |
| - "adr/**" | |
| - "docs/**" | |
| - "CODEOWNERS" | |
| permissions: | |
| contents: read | |
| # Abort prior jobs in the same workflow / PR | |
| concurrency: | |
| group: proxy-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Build the binary and init package | |
| build-zarf: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Setup golang | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| go-version-file: go.mod | |
| - name: Build binary and zarf packages | |
| uses: ./.github/actions/packages | |
| with: | |
| build-examples: "false" | |
| # Upload the contents of the build directory for later stages to use | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: build-artifacts | |
| path: build/ | |
| retention-days: 1 | |
| # Run the tests on kind | |
| validate-proxy: | |
| runs-on: ubuntu-latest | |
| needs: build-zarf | |
| strategy: | |
| matrix: | |
| ipfamily: [ipv4, ipv6] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: build-artifacts | |
| path: build/ | |
| - name: setup kind config | |
| run: | | |
| cat <<EOF > kind-nftables-config.yml | |
| kind: Cluster | |
| apiVersion: kind.x-k8s.io/v1alpha4 | |
| networking: | |
| kubeProxyMode: "nftables" | |
| ipFamily: ${{ matrix.ipfamily }} | |
| nodes: | |
| - role: control-plane | |
| - role: worker | |
| EOF | |
| - name: Setup Kind | |
| run: | | |
| kind delete cluster && kind create cluster --config=kind-nftables-config.yml | |
| - name: Make Zarf executable | |
| run: | | |
| chmod +x build/zarf | |
| - name: Run tests | |
| run: | | |
| build/zarf init --features=registry-proxy=true --registry-mode=proxy --confirm | |
| - name: get cluster info | |
| uses: ./.github/actions/debug-cluster | |
| if: always() |