debug: only check status #40
Workflow file for this run
This file contains 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: End2End Testing | |
on: [push] | |
jobs: | |
end2end: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Create Cluster | |
uses: AbsaOSS/k3d-action@v2 | |
with: | |
cluster-name: cosign-tests | |
k3d-version: v5.4.6 | |
- name: Create Local Registry | |
run: | | |
k3d registry create registry.localhost --port 5000 | |
- name: Check Cluster Nodes | |
run: | | |
kubectl get nodes | |
- name: Check Coredns Deployment | |
run: | | |
kubectl -n kube-system rollout status deployment/coredns --timeout=60s | |
STATUS=$(kubectl -n kube-system get deployment coredns -o jsonpath={.status.readyReplicas}) | |
if [[ $STATUS -ne 1 ]] | |
then | |
echo "Deployment coredns not ready" | |
kubectl -n kube-system get events | |
exit 1 | |
else | |
echo "Deployment coredns OK" | |
fi | |
- name: Check Metricsserver Deployment | |
run: | | |
kubectl -n kube-system rollout status deployment/metrics-server --timeout=60s | |
STATUS=$(kubectl -n kube-system get deployment metrics-server -o jsonpath={.status.readyReplicas}) | |
if [[ $STATUS -ne 1 ]] | |
then | |
echo "Deployment metrics-server not ready" | |
kubectl -n kube-system get events | |
exit 1 | |
else | |
echo "Deployment metrics-server OK" | |
fi | |
- name: Setup Helm | |
run: | | |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | |
helm version | |
- name: Install Cosign | |
uses: sigstore/cosign-installer@main | |
with: | |
cosign-release: 'v2.2.0' | |
- name: Create ephemeral keys | |
run: | | |
make test-generate-key | |
- name: Build test image | |
run: | | |
make test-image | |
- name: Install Cosignwebhook | |
run: | | |
make test-deploy | |
- name: Check Deployment | |
run: | | |
STATUS=$(kubectl -n cosignwebhook get deployment cosignwebhook -o jsonpath={.status.readyReplicas}) | |
if [[ $STATUS -ne 1 ]] | |
then | |
echo "Deployment cosignwebhook not ready" | |
kubectl -n cosignwebhook get events | |
kubectl logs -n cosignwebhook deployment/cosignwebhook cosignwebhook | |
kubectl logs -n cosignwebhook deployment/cosignwebhook sccosign | |
kubectl logs -n cosignwebhook deployment/cosignwebhook scwebhook | |
kubectl describe -n cosignwebhook deployment/cosignwebhook | |
exit 1 | |
else | |
echo "Deployment cosignwebhook OK" | |
fi | |
- name: Run End2End Tests | |
run: | | |
make test-e2e |