Skip to content

Fix CI

Fix CI #27

Workflow file for this run

name: Validate SecureSign
on:
push:
branches: ["main", "release*"]
tags: ["*"]
pull_request:
branches: ["main", "release*"]
env:
GO_VERSION: 1.19
CONTROLLER_IMAGE: kind-registry:5000/securesign-controller:latest
jobs:
build-operator:
name: Build-operator
runs-on: ubuntu-20.04
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Cluster
uses: container-tools/[email protected]
with:
version: v0.20.0
node_image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
cpu: 3
- name: Test
run: make test
- name: Build and Deploy operator container
run: IMAGE_TAG_BASE=${CONTROLLER_IMAGE} make docker-build docker-push deploy
- name: Wait for operator to be ready
run: kubectl wait --for=condition=available deployment/operator-controller-manager --timeout=60s -n operator-system
- name: Install Keycloak
run: |
#install OLM
kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/crds.yaml
# wait for a while to be sure CRDs are installed
sleep 1
kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.25.0/olm.yaml
kubectl create --kustomize keycloak/operator/overlay/kind
until [ ! -z "$(kubectl get pod -l name=keycloak-operator -n keycloak-system 2>/dev/null)" ]
do
echo "Waiting for keycloak operator. Pods in keycloak-system namespace:"
kubectl get pods -n keycloak-system
sleep 10
done
kubectl create --kustomize keycloak/resources/overlay/kind
until [[ $( oc get keycloak keycloak -o jsonpath='{.status.ready}' -n keycloak-system 2>/dev/null) == "true" ]]
do
printf "Waiting for keycloak deployment. \n Keycloak ready: %s\n" $(oc get keycloak keycloak -o jsonpath='{.status.ready}' -n keycloak-system)
sleep 10
done
shell: bash
- name: Create test namespace
run: |
kubectl create ns test
echo ${{ secrets.PULL_SECRET }} > /tmp/pull-secret.txt
kubectl create secret generic pull-secret --from-file=.dockerconfigjson=/tmp/pull-secret.txt --type=kubernetes.io/dockerconfigjson -n test
- name: Apply sample config
run: kubectl apply -f config/samples/rhtas_v1alpha1_securesign.yaml -n test
- name: sleep then print pods in test namespace
run: |
sleep 60
kubectl get pods -n test