@@ -205,24 +205,12 @@ jobs:
205
205
run : podman load -i /tmp/operator-oci.tar
206
206
207
207
- name : Install Cluster
208
- uses :
container-tools/ kind-[email protected]
208
+ uses : ./.github/actions/ kind-cluster
209
209
with :
210
- version : v0.24.0
211
- node_image : kindest/node:v1.27.17@sha256:3fd82731af34efe19cd54ea5c25e882985bafa2c9baefe14f8deab1737d9fabe
212
- cpu : 3
213
- registry : false
214
210
config : ./ci/config.yaml
215
-
216
- - name : Install Ingress
217
- run : |
218
- kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
219
- kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=90s
220
-
221
- - name : Install prometheus
222
- run : |
223
- LATEST=$(curl -s https://api.github.com/repos/prometheus-operator/prometheus-operator/releases/latest | jq -cr .tag_name)
224
- curl -sL https://github.com/prometheus-operator/prometheus-operator/releases/download/${LATEST}/bundle.yaml | kubectl create -f -
225
- kubectl wait --for=condition=Ready pods -l app.kubernetes.io/name=prometheus-operator -n default
211
+ prometheus : ' true'
212
+ keycloak : ' true'
213
+ olm : ' true'
226
214
227
215
- name : Deploy operator container
228
216
env :
@@ -233,51 +221,6 @@ jobs:
233
221
run : |
234
222
kubectl wait --for=condition=available deployment/rhtas-operator-controller-manager --timeout=120s -n openshift-rhtas-operator
235
223
236
- - name : Install Keycloak
237
- run : |
238
- #install OLM
239
- kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/crds.yaml
240
- # wait for a while to be sure CRDs are installed
241
- sleep 1
242
- kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/olm.yaml
243
-
244
- kubectl create --kustomize ci/keycloak/operator/overlay/kind
245
- until [ ! -z "$(kubectl get pod -l name=keycloak-operator -n keycloak-system 2>/dev/null)" ]
246
- do
247
- echo "Waiting for keycloak operator. Pods in keycloak-system namespace:"
248
- kubectl get pods -n keycloak-system
249
- sleep 10
250
- done
251
- kubectl create --kustomize ci/keycloak/resources/overlay/kind
252
- until [[ $( oc get keycloak keycloak -o jsonpath='{.status.ready}' -n keycloak-system 2>/dev/null) == "true" ]]
253
- do
254
- printf "Waiting for keycloak deployment. \n Keycloak ready: %s\n" $(oc get keycloak keycloak -o jsonpath='{.status.ready}' -n keycloak-system)
255
- sleep 10
256
- done
257
-
258
- # HACK - expose keycloak under the same name as the internal SVC has so it will be accessible:
259
- # - within the cluster (where the localhost does not work)
260
- # - outside the cluster (resolved from /etc/hosts and redirect to the localhost)
261
- kubectl create -n keycloak-system -f - <<EOF
262
- apiVersion: networking.k8s.io/v1
263
- kind: Ingress
264
- metadata:
265
- name: keycloak
266
- spec:
267
- rules:
268
- - host: keycloak-internal.keycloak-system.svc
269
- http:
270
- paths:
271
- - backend:
272
- service:
273
- name: keycloak-internal
274
- port:
275
- number: 80
276
- path: /
277
- pathType: Prefix
278
- EOF
279
- shell : bash
280
-
281
224
- name : Add service hosts to /etc/hosts
282
225
run : |
283
226
sudo echo "127.0.0.1 fulcio-server.local tuf.local rekor-server.local keycloak-internal.keycloak-system.svc rekor-search-ui.local cli-server.local tsa-server.local" | sudo tee -a /etc/hosts
@@ -343,66 +286,12 @@ jobs:
343
286
podman load -i /tmp/catalog-oci.tar
344
287
345
288
- name : Install Cluster
346
- uses :
container-tools/ kind-[email protected]
289
+ uses : ./.github/actions/ kind-cluster
347
290
with :
348
- version : v0.20.0
349
- node_image : kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
350
- cpu : 3
351
- registry : false
352
291
config : ./ci/config.yaml
353
-
354
- - name : Configure cluster
355
- run : |
356
- kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
357
- kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=90s
358
-
359
- #install Prometheus
360
- LATEST=$(curl -s https://api.github.com/repos/prometheus-operator/prometheus-operator/releases/latest | jq -cr .tag_name)
361
- curl -sL https://github.com/prometheus-operator/prometheus-operator/releases/download/${LATEST}/bundle.yaml | kubectl create -f -
362
- kubectl wait --for=condition=Ready pods -l app.kubernetes.io/name=prometheus-operator -n default
363
-
364
- #install OLM
365
- kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/crds.yaml
366
- # wait for a while to be sure CRDs are installed
367
- sleep 1
368
- kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/olm.yaml
369
-
370
- kubectl create --kustomize ci/keycloak/operator/overlay/kind
371
- until [ ! -z "$(kubectl get pod -l name=keycloak-operator -n keycloak-system 2>/dev/null)" ]
372
- do
373
- echo "Waiting for keycloak operator. Pods in keycloak-system namespace:"
374
- kubectl get pods -n keycloak-system
375
- sleep 10
376
- done
377
- kubectl create --kustomize ci/keycloak/resources/overlay/kind
378
- until [[ $( oc get keycloak keycloak -o jsonpath='{.status.ready}' -n keycloak-system 2>/dev/null) == "true" ]]
379
- do
380
- printf "Waiting for keycloak deployment. \n Keycloak ready: %s\n" $(oc get keycloak keycloak -o jsonpath='{.status.ready}' -n keycloak-system)
381
- sleep 10
382
- done
383
-
384
- # HACK - expose keycloak under the same name as the internal SVC has so it will be accessible:
385
- # - within the cluster (where the localhost does not work)
386
- # - outside the cluster (resolved from /etc/hosts and redirect to the localhost)
387
- kubectl create -n keycloak-system -f - <<EOF
388
- apiVersion: networking.k8s.io/v1
389
- kind: Ingress
390
- metadata:
391
- name: keycloak
392
- spec:
393
- rules:
394
- - host: keycloak-internal.keycloak-system.svc
395
- http:
396
- paths:
397
- - backend:
398
- service:
399
- name: keycloak-internal
400
- port:
401
- number: 80
402
- path: /
403
- pathType: Prefix
404
- EOF
405
- shell : bash
292
+ prometheus : ' true'
293
+ keycloak : ' true'
294
+ olm : ' true'
406
295
407
296
- name : Add service hosts to /etc/hosts
408
297
run : |
@@ -467,20 +356,10 @@ jobs:
467
356
run : podman load -i /tmp/operator-oci.tar
468
357
469
358
- name : Install Cluster
470
- uses :
container-tools/ kind-[email protected]
359
+ uses : ./.github/actions/ kind-cluster
471
360
with :
472
- version : v0.20.0
473
- node_image : kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
474
- cpu : 3
475
- registry : false
476
361
config : ./ci/config.yaml
477
362
478
- - name : Configure cluster
479
- run : |
480
- kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
481
- kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=90s
482
- shell : bash
483
-
484
363
- name : Add service hosts to /etc/hosts
485
364
run : |
486
365
sudo echo "127.0.0.1 fulcio-server.local tuf.local rekor-server.local rekor-search-ui.local cli-server.local" | sudo tee -a /etc/hosts
@@ -501,6 +380,99 @@ jobs:
501
380
name : test-custom-install
502
381
path : test/**/k8s-dump-*.tar.gz
503
382
383
+ test-e2e :
384
+ name : Execute securesign/sigstore-e2e
385
+ runs-on : ubuntu-24.04
386
+ needs :
387
+ - build-operator
388
+ env :
389
+ TEST_NAMESPACE : test
390
+ steps :
391
+ - name : Checkout source
392
+ uses : actions/checkout@v4
393
+ - name : Checkout test source repository
394
+ uses : actions/checkout@v4
395
+ with :
396
+ repository : " securesign/sigstore-e2e"
397
+ path : e2e
398
+
399
+ - name : Install Go
400
+ uses : actions/setup-go@v5
401
+ with :
402
+ go-version : ${{ env.GO_VERSION }}
403
+
404
+ - name : Log in to registry.redhat.io
405
+ uses : redhat-actions/podman-login@9184318aae1ee5034fbfbacc0388acf12669171f # v1
406
+ with :
407
+ username : ${{ secrets.REGISTRY_USER }}
408
+ password : ${{ secrets.REGISTRY_PASSWORD }}
409
+ registry : registry.redhat.io
410
+ auth_file_path : /tmp/config.json
411
+
412
+ - name : Image prune
413
+ run : podman image prune -af
414
+
415
+ - name : Download artifact
416
+ uses : actions/download-artifact@v4
417
+ with :
418
+ pattern : " *-image"
419
+ merge-multiple : true
420
+ path : /tmp
421
+
422
+ - name : Load images
423
+ run : |
424
+ podman load -i /tmp/operator-oci.tar
425
+
426
+ - name : Install Cluster
427
+ id : kind
428
+ uses : ./.github/actions/kind-cluster
429
+ with :
430
+ config : ./ci/config.yaml
431
+ keycloak : ' true'
432
+ olm : ' true'
433
+ prometheus : ' true'
434
+
435
+ - name : Add service hosts to /etc/hosts
436
+ run : |
437
+ sudo echo "127.0.0.1 fulcio-server.local tuf.local rekor-server.local rekor-search-ui.local cli-server.local" | sudo tee -a /etc/hosts
438
+
439
+ - name : Deploy operator container
440
+ env :
441
+ OPENSHIFT : false
442
+ run : make deploy
443
+
444
+ - name : Wait for operator to be ready
445
+ run : |
446
+ kubectl wait --for=condition=available deployment/rhtas-operator-controller-manager --timeout=120s -n openshift-rhtas-operator
447
+
448
+ - name : Install securesign
449
+ run : |
450
+ sed -i 's#https://your-oidc-issuer-url#${{ steps.kind.outputs.oidc_url }}#' config/samples/rhtas_v1alpha1_securesign.yaml
451
+ sed -i 's#rhtas.redhat.com/metrics: "true"#rhtas.redhat.com/metrics: "false"#' config/samples/rhtas_v1alpha1_securesign.yaml
452
+ kubectl create ns ${{ env.TEST_NAMESPACE }}
453
+ kubectl create -f config/samples/rhtas_v1alpha1_securesign.yaml -n ${{ env.TEST_NAMESPACE }}
454
+ sleep 1
455
+ kubectl wait --for=condition=Ready securesign/securesign-sample -n ${{ env.TEST_NAMESPACE }}
456
+
457
+ - name : Run tests
458
+ run : |
459
+ export SIGSTORE_OIDC_ISSUER=${{ steps.kind.outputs.oidc_url }}
460
+ export FULCIO_URL=$(kubectl get securesign -o jsonpath='{.items[0].status.fulcio.url}' -n ${{ env.TEST_NAMESPACE }})
461
+ export REKOR_URL=$(kubectl get securesign -o jsonpath='{.items[0].status.rekor.url}' -n ${{ env.TEST_NAMESPACE }})
462
+ export TUF_URL=$(kubectl get securesign -o jsonpath='{.items[0].status.tuf.url}' -n ${{ env.TEST_NAMESPACE }})
463
+ export TSA_URL=$(kubectl get securesign -o jsonpath='{.items[0].status.tsa.url}' -n ${{ env.TEST_NAMESPACE }})
464
+
465
+ export CLI_STRATEGY=cli_server
466
+ export CLI_SERVER_URL="http://cli-server.local"
467
+
468
+ cd e2e
469
+ go test -v ./test/...
470
+
471
+ - name : dump the logs of the operator
472
+ run : |
473
+ kubectl logs -n openshift-rhtas-operator deployment/rhtas-operator-controller-manager
474
+ if : failure()
475
+
504
476
test-eks :
505
477
name : Test EKS deployment
506
478
runs-on : ubuntu-20.04
0 commit comments