Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick hack for Openshift testing #214

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions ci/openshift/job.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions ci/openshift/sign-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
BASE_DOMAIN=apps.$(oc get dns cluster -o jsonpath='{ .spec.baseDomain }')
OIDC_ISSUER=https://keycloak-keycloak-system.$BASE_DOMAIN/auth/realms/sigstore
sed -i "s|https://your-oidc-issuer-url|$OIDC_ISSUER|g" config/samples/rhtas_v1alpha1_securesign.yaml
sed -i 's|ClientID: "trusted-artifact-signer"|ClientID: "sigstore"|g' config/samples/rhtas_v1alpha1_securesign.yaml
oc create ns securesign
oc apply -f config/samples/rhtas_v1alpha1_securesign.yaml -n securesign
timeout 300 bash -c 'for i in trillian-db trillian-logserver trillian-logsigner fulcio-server; do until [ ! -z "$(oc get deployment $i -n securesign 2>/dev/null)" ]; do echo "Waiting for $i deployment to be created. Pods in securesign namespace:"; oc get pods -n securesign; sleep 3; done; done'
oc wait --for=condition=available deployment/trillian-db -n securesign --timeout=60s
oc wait --for=condition=available deployment/trillian-logserver -n securesign --timeout=60s
oc wait --for=condition=available deployment/trillian-logsigner -n securesign --timeout=60s
oc wait --for=condition=available deployment/fulcio-server -n securesign --timeout=60s
oc set env -n securesign deployment/fulcio-server SSL_CERT_DIR=/var/run/fulcio
timeout 300 bash -c 'for i in tuf ctlog rekor-redis rekor-server; do until [ ! -z "$(oc get deployment $i -n securesign 2>/dev/null)" ]; do echo "Waiting for $i deployment to be created. Pods in securesign namespace:"; oc get pods -n securesign; sleep 3; done; done'
oc wait --for=condition=available deployment/tuf -n securesign --timeout=60s
oc wait --for=condition=available deployment/ctlog -n securesign --timeout=60s
oc wait --for=condition=available deployment/rekor-redis -n securesign --timeout=60s
oc wait --for=condition=available deployment/rekor-server -n securesign --timeout=60s
curl -o /tmp/job.yaml https://raw.githubusercontent.com/cooktheryan/hello-world/main/job.yaml
sed -i "s|BASE_DOMAIN|$BASE_DOMAIN|g" /tmp/job.yaml
oc apply -f /tmp/job.yaml -n default
oc wait --for=condition=complete job/tas-test-sign-verify --timeout=5m -n default
Loading