Repository navigation
chore(deps): update go dependencies #15192
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: Validate SecureSign | |
| on: | |
| push: | |
| branches: [ "main", "release*" ] | |
| tags: [ "*" ] | |
| paths-ignore: | |
| - '*.md' | |
| - 'LICENSE' | |
| - 'OWNERS' | |
| - '.tekton/**' | |
| - 'docs/**' | |
| - 'renovate.json' | |
| pull_request: | |
| branches: [ "main", "release*" ] | |
| paths-ignore: | |
| - '*.md' | |
| - 'LICENSE' | |
| - 'OWNERS' | |
| - '.tekton/**' | |
| - 'docs/**' | |
| - 'renovate.json' | |
| env: | |
| GO_VERSION: 1.26 | |
| REGISTRY: ghcr.io | |
| CONTAINER_TOOL: podman | |
| IMG: ghcr.io/securesign/secure-sign-operator:dev-${{ github.sha }} | |
| BUNDLE_IMG: ghcr.io/securesign/secure-sign-operator-bundle:dev-${{ github.sha }} | |
| CATALOG_IMG: ghcr.io/securesign/secure-sign-operator-fbc:dev-${{ github.sha }} | |
| NEW_OLM_CHANNEL: rhtas-operator.v1.5.2 | |
| BASE_CATALOG_IMG: ghcr.io/securesign/secure-sign-operator-k8s-catalog:rhtas-v1.5.0 | |
| OCP_VERSION: ${{ vars.OLM_INDEX_VERSION }} | |
| TARGET_PLATFORM: kubernetes | |
| CLI_CGW_VERSION: "1.5.1" | |
| jobs: | |
| build-operator: | |
| name: Build-operator | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Install Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Log in to GitHub Container Registry | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to registry.redhat.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| registry: registry.redhat.io | |
| auth_file_path: /tmp/config.json | |
| - name: Replace images | |
| run: make dev-images && cat config/default/images.env | |
| - name: Build operator container | |
| run: make docker-build docker-push | |
| - name: Upload coverage to Codecov | |
| if: always() | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| files: coverage.out | |
| flags: unit | |
| use_oidc: true | |
| fail_ci_if_error: false | |
| build-bundle: | |
| name: Build-bundle-image | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Log in to GitHub Container Registry | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to registry.redhat.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| registry: registry.redhat.io | |
| auth_file_path: /tmp/config.json | |
| - name: Replace images | |
| run: make dev-images && cat config/default/images.env | |
| - name: Build operator bundle | |
| run: make bundle-build bundle-push | |
| build-fbc: | |
| name: Build-fbc | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: write | |
| needs: build-bundle | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Log in to GitHub Container Registry | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to registry.redhat.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| registry: registry.redhat.io | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to registry.redhat.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| registry: brew.registry.redhat.io | |
| auth_file_path: /tmp/config.json | |
| - name: Install OPM | |
| uses: redhat-actions/openshift-tools-installer@144527c7d98999f2652264c048c7a9bd103f8a82 # v1.13.1 | |
| with: | |
| source: "github" | |
| github_pat: ${{ github.token }} | |
| opm: 1.61.0 | |
| - name: Checkout FBC source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| with: | |
| repository: "securesign/fbc" | |
| ref: main | |
| path: fbc | |
| - name: Build catalog | |
| env: | |
| BUNDLE_IMAGE: ${{ env.BUNDLE_IMG }} | |
| BUNDLE_NAME: ${{ env.NEW_OLM_CHANNEL }} | |
| FBC_DIR: rhtas-operator | |
| GRAPH: ${{ env.OCP_VERSION }}/rhtas-operator/graph.yaml | |
| CHANNELS: "stable,stable-v1.5" | |
| CATALOG_FILE: ${{ env.OCP_VERSION }}/rhtas-operator/catalog/rhtas-operator/catalog.json | |
| run: | | |
| cd fbc | |
| utils/configure_bundles.sh | |
| utils/configure_channels.sh | |
| utils/render_catalog.sh | |
| cat ${{ env.GRAPH }} | |
| opm validate ${{ env.OCP_VERSION }}/rhtas-operator/catalog/rhtas-operator | |
| podman build ${{ env.OCP_VERSION }}/rhtas-operator -f catalog.Dockerfile -t $CATALOG_IMG | |
| podman push $CATALOG_IMG | |
| build-tufcli: | |
| name: Build-tufcli | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout tufcli source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| with: | |
| repository: "securesign/tufcli" | |
| path: tufcli | |
| - name: Install Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Build | |
| run: cd tufcli && CGO_ENABLED=0 go build -o /tmp/tufcli . | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: tufcli | |
| path: /tmp/tufcli | |
| retention-days: 1 | |
| if-no-files-found: error | |
| test-kind: | |
| name: Test kind deployment | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: read | |
| needs: | |
| - build-operator | |
| - build-tufcli | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Install Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Download tufcli | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| name: tufcli | |
| path: /tmp/tufcli | |
| - name: Make tufcli executable | |
| run: chmod +x /tmp/tufcli/tufcli | |
| - run: echo "/tmp/tufcli" >> $GITHUB_PATH | |
| - name: Log in to GitHub Container Registry | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to registry.redhat.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| registry: registry.redhat.io | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to quay.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.QUAY_USER }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| registry: quay.io | |
| auth_file_path: /tmp/config.json | |
| - name: Install Cluster | |
| uses: ./.github/actions/kind-cluster | |
| with: | |
| config: ./ci/config.yaml | |
| prometheus: 'true' | |
| keycloak: 'true' | |
| olm: 'true' | |
| - name: Pull Container image from GHCR | |
| run: podman pull ${{ env.IMG }} | |
| - name: Load Docker image into Kind cluster | |
| run: | | |
| podman save ${{ env.IMG }} -o operator-oci.tar | |
| kind load image-archive operator-oci.tar | |
| - name: Replace images | |
| run: make dev-images && cat config/default/images.env | |
| - name: Deploy operator container | |
| run: make deploy | |
| - name: Wait for operator to be ready | |
| run: | | |
| kubectl wait --for=condition=available deployment/rhtas-operator-controller-manager --timeout=120s -n openshift-rhtas-operator | |
| - name: Configure Ingress hostname template | |
| run: | | |
| NODE_IP=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}') | |
| kubectl set env deployment/rhtas-operator-controller-manager -n openshift-rhtas-operator INGRESS_HOST_TEMPLATE="%[1]s.%[2]s.${NODE_IP}.nip.io" | |
| kubectl rollout status deployment/rhtas-operator-controller-manager -n openshift-rhtas-operator --timeout=120s | |
| - name: Wait for conversion webhook readiness | |
| run: | | |
| for i in $(seq 1 60); do | |
| kubectl create --dry-run=server -f config/samples/rhtas_v1_securesign.yaml 2>/dev/null && break | |
| echo "Waiting for conversion webhook... ($i/60)" | |
| sleep 2 | |
| done | |
| - name: Add service hosts to /etc/hosts | |
| run: | | |
| sudo echo "127.0.0.1 keycloak-internal.keycloak-system.svc" | sudo tee -a /etc/hosts | |
| - name: Install cosign | |
| run: go install github.com/sigstore/cosign/v3/cmd/cosign@v3.0.5 | |
| - name: Run tests | |
| run: make test-e2e | |
| env: | |
| DOCKER_CONFIG: /tmp | |
| - name: Archive test artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| if: always() | |
| with: | |
| name: test-kind | |
| path: test/**/k8s-dump-*.tar.gz | |
| if-no-files-found: ignore | |
| - name: dump the logs of the operator | |
| run: kubectl logs -n openshift-rhtas-operator deployment/rhtas-operator-controller-manager | |
| if: always() | |
| test-upgrade: | |
| name: Test upgrade operator (OLM ${{ matrix.olm }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| olm: [v0, v1] | |
| runs-on: | |
| labels: ubuntu-4core | |
| permissions: | |
| contents: read | |
| packages: read | |
| needs: | |
| - build-operator | |
| - build-bundle | |
| - build-fbc | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Install Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Log in to GitHub Container Registry | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to registry.redhat.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| registry: registry.redhat.io | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to quay.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.QUAY_USER }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| registry: quay.io | |
| auth_file_path: /tmp/config.json | |
| - name: Install Cluster | |
| uses: ./.github/actions/kind-cluster | |
| with: | |
| config: ./ci/config.yaml | |
| prometheus: 'true' | |
| keycloak: 'true' | |
| olm: 'true' | |
| olm-version: ${{ matrix.olm }} | |
| - name: Configure OLM v1 registry authentication | |
| if: matrix.olm == 'v1' | |
| run: | | |
| kubectl create secret generic registry-auth -n olmv1-system --type=kubernetes.io/dockerconfigjson --from-file=.dockerconfigjson=/tmp/config.json | |
| for deployment in catalogd-controller-manager operator-controller-controller-manager; do | |
| kubectl patch deployment "$deployment" -n olmv1-system --type=json -p='[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--global-pull-secret=olmv1-system/registry-auth"}]' | |
| kubectl rollout status -n olmv1-system "deployment/$deployment" --timeout=120s | |
| done | |
| - name: Pull Container image from GHCR | |
| run: | | |
| podman pull ${{ env.IMG }} | |
| podman pull ${{ env.BUNDLE_IMG }} | |
| podman pull ${{ env.CATALOG_IMG }} | |
| - name: Load Docker image into Kind cluster | |
| run: | | |
| podman save ${{ env.IMG }} -o operator-oci.tar | |
| podman save ${{ env.BUNDLE_IMG }} -o operator-bundle-oci.tar | |
| podman save ${{ env.CATALOG_IMG }} -o operator-fbc-oci.tar | |
| kind load image-archive operator-oci.tar | |
| kind load image-archive operator-bundle-oci.tar | |
| kind load image-archive operator-fbc-oci.tar | |
| # The base (released) operator version does not support INGRESS_HOST_TEMPLATE, | |
| # so it produces static .local hostnames that require /etc/hosts entries. | |
| - name: Add service hosts to /etc/hosts | |
| run: | | |
| sudo echo "127.0.0.1 fulcio-server.local tuf.local rekor-server.local keycloak-internal.keycloak-system.svc rekor-search-ui.local tsa-server.local" | sudo tee -a /etc/hosts | |
| - name: Install cosign | |
| #keep upgrade scenario on cosign v2 (latest released version does not support cosign v3) | |
| run: go install github.com/sigstore/cosign/v2/cmd/cosign@v2.4.0 | |
| - name: Replace images | |
| run: make dev-images generate && cat config/default/images.env | |
| - name: Run tests | |
| env: | |
| TEST_BASE_CATALOG: ${{ env.BASE_CATALOG_IMG }} | |
| TEST_TARGET_CATALOG: ${{ env.CATALOG_IMG }} | |
| TEST_UPGRADE_CHANNEL: stable-v1.5 | |
| # Keep default .local hostnames — the base operator doesn't support INGRESS_HOST_TEMPLATE, | |
| # and switching hostnames mid-upgrade would break Ingress routing. | |
| INGRESS_HOST_TEMPLATE: '%[1]s.local' | |
| DOCKER_CONFIG: /tmp | |
| OLM_GENERATION: ${{ matrix.olm }} | |
| run: | | |
| # OLM_V1 is presence-based: leave it unset for the v0 lane. | |
| if [[ "$OLM_GENERATION" == 'v1' ]]; then | |
| export OLM_V1=true | |
| fi | |
| go test -p 1 ./test/e2e/... -tags=upgrade -timeout 20m | |
| - name: Archive test artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| if: always() | |
| with: | |
| name: test-upgrade-${{ matrix.olm }} | |
| path: test/**/k8s-dump-*.tar.gz | |
| if-no-files-found: ignore | |
| test-ha-install: | |
| name: Test with High Availability | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: read | |
| needs: | |
| - build-operator | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Install Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Log in to GitHub Container Registry | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to registry.redhat.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| registry: registry.redhat.io | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to quay.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.QUAY_USER }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| registry: quay.io | |
| auth_file_path: /tmp/config.json | |
| - name: Install Cluster | |
| uses: ./.github/actions/kind-cluster | |
| with: | |
| config: ./ci/config.yaml | |
| prometheus: 'true' | |
| keycloak: 'true' | |
| olm: 'true' | |
| nfs-csi: 'true' | |
| - name: Pull Container image from GHCR | |
| run: podman pull ${{ env.IMG }} | |
| - name: Load Docker image into Kind cluster | |
| run: | | |
| podman save ${{ env.IMG }} -o operator-oci.tar | |
| kind load image-archive operator-oci.tar | |
| - name: Replace images | |
| run: make dev-images && cat config/default/images.env | |
| - name: Deploy operator container | |
| run: make deploy | |
| - name: Wait for operator to be ready | |
| run: | | |
| kubectl wait --for=condition=available deployment/rhtas-operator-controller-manager --timeout=120s -n openshift-rhtas-operator | |
| - name: Configure Ingress hostname template | |
| run: | | |
| NODE_IP=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}') | |
| kubectl set env deployment/rhtas-operator-controller-manager -n openshift-rhtas-operator INGRESS_HOST_TEMPLATE="%[1]s.%[2]s.${NODE_IP}.nip.io" | |
| kubectl rollout status deployment/rhtas-operator-controller-manager -n openshift-rhtas-operator --timeout=120s | |
| - name: Wait for conversion webhook readiness | |
| run: | | |
| for i in $(seq 1 60); do | |
| kubectl create --dry-run=server -f config/samples/rhtas_v1_securesign.yaml 2>/dev/null && break | |
| echo "Waiting for conversion webhook... ($i/60)" | |
| sleep 2 | |
| done | |
| - name: Add service hosts to /etc/hosts | |
| run: | | |
| sudo echo "127.0.0.1 keycloak-internal.keycloak-system.svc" | sudo tee -a /etc/hosts | |
| - name: Install cosign | |
| run: go install github.com/sigstore/cosign/v3/cmd/cosign@v3.0.5 | |
| - name: Run tests | |
| env: | |
| DOCKER_CONFIG: /tmp | |
| run: | | |
| make generate && go test -p 1 ./test/e2e/... -tags=ha -timeout 20m | |
| - name: Archive test artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| if: always() | |
| with: | |
| name: test-ha-install | |
| path: test/**/k8s-dump-*.tar.gz | |
| if-no-files-found: ignore | |
| - name: dump the logs of the operator | |
| run: kubectl logs -n openshift-rhtas-operator deployment/rhtas-operator-controller-manager | |
| if: always() | |
| - name: Cleanup Cluster | |
| uses: ./.github/actions/kind-cluster-cleanup | |
| if: always() | |
| with: | |
| nfs-csi: true | |
| test-custom-install: | |
| name: Test with custom operator installation | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: read | |
| needs: | |
| - build-operator | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Install Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Log in to GitHub Container Registry | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to registry.redhat.io | |
| uses: redhat-actions/podman-login@9184318aae1ee5034fbfbacc0388acf12669171f # v1.6 | |
| with: | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| registry: registry.redhat.io | |
| auth_file_path: /tmp/config.json | |
| - name: Install Cluster | |
| uses: ./.github/actions/kind-cluster | |
| with: | |
| config: ./ci/config.yaml | |
| nfs-csi: true | |
| keycloak: 'false' # keycloak use a lot of resources and is not needed for custom_intall tests | |
| - name: Pull Container image from GHCR | |
| run: | | |
| podman pull ${{ env.IMG }} | |
| - name: Load Docker image into Kind cluster | |
| run: | | |
| podman save ${{ env.IMG }} -o operator-oci.tar | |
| kind load image-archive operator-oci.tar | |
| - name: Add service hosts to /etc/hosts | |
| run: | | |
| echo "# service hosts added here if needed" | |
| - name: Replace images | |
| run: make dev-images generate && cat config/default/images.env | |
| - name: Run tests | |
| env: | |
| TEST_MANAGER_IMAGE: ${{ env.IMG }} | |
| run: make install && go test ./test/e2e/... -tags=custom_install -p 1 -timeout 20m | |
| - name: Archive test artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| if: always() | |
| with: | |
| name: test-custom-install | |
| path: test/**/k8s-dump-*.tar.gz | |
| if-no-files-found: ignore | |
| - name: Cleanup Cluster | |
| uses: ./.github/actions/kind-cluster-cleanup | |
| if: always() | |
| with: | |
| nfs-csi: true | |
| test-e2e: | |
| name: Execute securesign/sigstore-e2e | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| packages: read | |
| needs: | |
| - build-operator | |
| env: | |
| TEST_NAMESPACE: test | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Checkout test source repository | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| with: | |
| repository: "securesign/sigstore-e2e" | |
| path: e2e | |
| - name: Install Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Log in to GitHub Container Registry | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to registry.redhat.io | |
| uses: redhat-actions/podman-login@9184318aae1ee5034fbfbacc0388acf12669171f # v1.6 | |
| with: | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| registry: registry.redhat.io | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to quay.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.QUAY_USER }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| registry: quay.io | |
| auth_file_path: /tmp/config.json | |
| - name: Install Cluster | |
| id: kind | |
| uses: ./.github/actions/kind-cluster | |
| with: | |
| config: ./ci/config.yaml | |
| keycloak: 'true' | |
| olm: 'true' | |
| prometheus: 'true' | |
| - name: Pull Container image from GHCR | |
| run: | | |
| podman pull ${{ env.IMG }} | |
| - name: Load Docker image into Kind cluster | |
| run: | | |
| podman save ${{ env.IMG }} -o operator-oci.tar | |
| kind load image-archive operator-oci.tar | |
| - name: Add service hosts to /etc/hosts | |
| run: | | |
| sudo echo "127.0.0.1 ${{ steps.kind.outputs.oidc_host }}" | sudo tee -a /etc/hosts | |
| - name: Replace images | |
| run: make dev-images generate && cat config/default/images.env | |
| - name: Deploy operator container | |
| run: make deploy | |
| - name: Wait for operator to be ready | |
| run: | | |
| kubectl wait --for=condition=available deployment/rhtas-operator-controller-manager --timeout=120s -n openshift-rhtas-operator | |
| - name: Configure Ingress hostname template | |
| run: | | |
| NODE_IP=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}') | |
| kubectl set env deployment/rhtas-operator-controller-manager -n openshift-rhtas-operator INGRESS_HOST_TEMPLATE="%[1]s.%[2]s.${NODE_IP}.nip.io" | |
| kubectl rollout status deployment/rhtas-operator-controller-manager -n openshift-rhtas-operator --timeout=120s | |
| - name: Wait for conversion webhook readiness | |
| run: | | |
| for i in $(seq 1 60); do | |
| kubectl create --dry-run=server -f config/samples/rhtas_v1_securesign.yaml 2>/dev/null && break | |
| echo "Waiting for conversion webhook... ($i/60)" | |
| sleep 2 | |
| done | |
| - name: Install securesign | |
| run: | | |
| sed -i 's#https://your-oidc-issuer-url#http://${{ steps.kind.outputs.oidc_host }}/realms/trusted-artifact-signer#' config/samples/rhtas_v1_securesign.yaml | |
| kubectl create ns ${{ env.TEST_NAMESPACE }} | |
| kubectl create -f config/samples/rhtas_v1_securesign.yaml -n ${{ env.TEST_NAMESPACE }} | |
| sleep 1 | |
| kubectl wait --for=condition=Ready securesign/securesign-sample --timeout=5m -n ${{ env.TEST_NAMESPACE }} | |
| - name: Run tests | |
| env: | |
| DOCKER_CONFIG: /tmp | |
| run: | | |
| export OIDC_ISSUER_URL="http://${{ steps.kind.outputs.oidc_host }}/realms/trusted-artifact-signer" | |
| export TUF_URL=$(kubectl get tuf -o jsonpath='{.items[0].status.url}' -n ${{ env.TEST_NAMESPACE }}) | |
| export REKOR_URL=$(kubectl get rekor -o jsonpath='{.items[0].status.url}' -n ${{ env.TEST_NAMESPACE }}) | |
| export FULCIO_URL=$(kubectl get fulcio -o jsonpath='{.items[0].status.url}' -n ${{ env.TEST_NAMESPACE }}) | |
| export CLI_STRATEGY=cgw | |
| export CGW_URL="https://developers.redhat.com/content-gateway/file/RHTAS/${{ env.CLI_CGW_VERSION }}" | |
| cd e2e | |
| source ./tas-env-variables.sh | |
| go test -v $(go list ./test/... | grep -v rekorsearchui) | |
| - name: dump the logs of the operator | |
| run: | | |
| kubectl logs -n openshift-rhtas-operator deployment/rhtas-operator-controller-manager | |
| if: failure() | |
| build-operator-coverage: | |
| name: Build-operator-coverage | |
| runs-on: ubuntu-24.04 | |
| if: >- | |
| (github.event_name == 'push' && github.ref == 'refs/heads/main') || | |
| (github.event_name == 'pull_request' && github.base_ref == 'main') | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Log in to GitHub Container Registry | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| auth_file_path: /tmp/config.json | |
| - name: Replace images | |
| run: make dev-images && cat config/default/images.env | |
| - name: Build coverage-instrumented operator container | |
| run: make docker-build-coverage | |
| - name: Push coverage image | |
| run: podman push ${{ env.IMG }}-coverage | |
| test-kind-coverage: | |
| name: Test E2E with coverage | |
| runs-on: ubuntu-24.04 | |
| if: >- | |
| (github.event_name == 'push' && github.ref == 'refs/heads/main') || | |
| (github.event_name == 'pull_request' && github.base_ref == 'main') | |
| permissions: | |
| contents: read | |
| packages: read | |
| id-token: write | |
| needs: | |
| - build-operator-coverage | |
| - build-tufcli | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 | |
| - name: Install Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Install coverport CLI | |
| run: | | |
| go install github.com/konflux-ci/coverport/cli@latest | |
| mv "$(go env GOPATH)/bin/cli" "$(go env GOPATH)/bin/coverport" | |
| - name: Download tufcli | |
| uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| with: | |
| name: tufcli | |
| path: /tmp/tufcli | |
| - name: Make tufcli executable | |
| run: chmod +x /tmp/tufcli/tufcli | |
| - run: echo "/tmp/tufcli" >> $GITHUB_PATH | |
| - name: Log in to GitHub Container Registry | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to registry.redhat.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.REGISTRY_USER }} | |
| password: ${{ secrets.REGISTRY_PASSWORD }} | |
| registry: registry.redhat.io | |
| auth_file_path: /tmp/config.json | |
| - name: Log in to quay.io | |
| uses: redhat-actions/podman-login@4934294ad0449894bcd1e9f191899d7292469603 # v1.7 | |
| with: | |
| username: ${{ secrets.QUAY_USER }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| registry: quay.io | |
| auth_file_path: /tmp/config.json | |
| - name: Install Cluster | |
| uses: ./.github/actions/kind-cluster | |
| with: | |
| config: ./ci/config.yaml | |
| prometheus: 'true' | |
| keycloak: 'true' | |
| olm: 'true' | |
| - name: Pull coverage image from GHCR | |
| run: podman pull ${{ env.IMG }}-coverage | |
| - name: Load coverage image into Kind cluster | |
| run: | | |
| podman save ${{ env.IMG }}-coverage -o operator-coverage-oci.tar | |
| kind load image-archive operator-coverage-oci.tar | |
| - name: Replace images | |
| run: make dev-images && cat config/default/images.env | |
| - name: Deploy operator with coverage image | |
| run: make deploy | |
| env: | |
| IMG: ${{ env.IMG }}-coverage | |
| - name: Wait for operator to be ready | |
| run: | | |
| kubectl wait --for=condition=available deployment/rhtas-operator-controller-manager --timeout=120s -n openshift-rhtas-operator | |
| - name: Configure Ingress hostname template | |
| run: | | |
| NODE_IP=$(kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}') | |
| kubectl set env deployment/rhtas-operator-controller-manager -n openshift-rhtas-operator INGRESS_HOST_TEMPLATE="%[1]s.%[2]s.${NODE_IP}.nip.io" | |
| kubectl rollout status deployment/rhtas-operator-controller-manager -n openshift-rhtas-operator --timeout=120s | |
| - name: Wait for conversion webhook readiness | |
| run: | | |
| for i in $(seq 1 60); do | |
| kubectl create --dry-run=server -f config/samples/rhtas_v1_securesign.yaml 2>/dev/null && break | |
| echo "Waiting for conversion webhook... ($i/60)" | |
| sleep 2 | |
| done | |
| - name: Add service hosts to /etc/hosts | |
| run: | | |
| sudo echo "127.0.0.1 keycloak-internal.keycloak-system.svc" | sudo tee -a /etc/hosts | |
| - name: Install cosign | |
| run: go install github.com/sigstore/cosign/v3/cmd/cosign@v3.0.5 | |
| - name: Run E2E tests | |
| run: make test-e2e | |
| env: | |
| DOCKER_CONFIG: /tmp | |
| - name: Collect coverage from operator pod via Coverport | |
| if: always() | |
| run: | | |
| coverport collect \ | |
| --namespace=openshift-rhtas-operator \ | |
| --label-selector=control-plane=operator-controller-manager \ | |
| --test-name=e2e \ | |
| --output=./e2e-coverage-data \ | |
| --source-dir=. \ | |
| --auto-process | |
| find ./e2e-coverage-data -name '*.out' -type f || true | |
| - name: Upload E2E coverage to Codecov | |
| if: always() | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| directory: ./e2e-coverage-data | |
| flags: e2e | |
| use_oidc: true | |
| fail_ci_if_error: false | |
| - name: Archive test artifacts | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| if: always() | |
| with: | |
| name: test-kind-coverage | |
| path: test/**/k8s-dump-*.tar.gz | |
| if-no-files-found: ignore | |
| - name: dump the logs of the operator | |
| run: kubectl logs -n openshift-rhtas-operator deployment/rhtas-operator-controller-manager | |
| if: always() |