Skip to content

[WIP] clean-up: build make targets #75

[WIP] clean-up: build make targets

[WIP] clean-up: build make targets #75

Workflow file for this run

name: release-checks
on:
pull_request:
paths:
- 'deploy/upstream/quickstart/**'
workflow_dispatch:
jobs:
install-quickstart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
curl -sLo kind "$(curl -sL https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r '[.assets[] | select(.name == "kind-linux-amd64")] | first | .browser_download_url')"
chmod +x kind
sudo mv kind /bin/
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /bin/
kind create cluster
kind export kubeconfig
kubectl create -f deploy/upstream/quickstart/crds.yaml
kubectl wait --timeout=5m --for=condition=Established crd $(kubectl get crd --output=jsonpath='{.items[*].metadata.name}')
kubectl apply -f deploy/upstream/quickstart/olm.yaml
# Note(tflannag): `kubectl wait` does not support waiting for resource creation: https://github.com/kubernetes/kubernetes/pull/87399.
wait_for_deployment() {
local deployment_name=$1
timeout=60
i=1
echo "Checking if the ${deployment_name} deployment is ready"
until kubectl -n olm get deployment ${deployment_name} -o jsonpath='{.status.conditions[?(@.status=="True")].type}' | grep "Available" 2>/dev/null; do
((i++))
if [[ ${i} -gt ${timeout} ]]; then
echo "the ${deployment_name} deployment has not become ready before the timeout period"
exit 1
fi
echo "waiting for ${deployment_name} deployment to report a ready status"
sleep 5
done
echo "The ${deployment_name} deployment is ready"
}
wait_for_deployment catalog-operator
wait_for_deployment olm-operator
wait_for_deployment packageserver