add support for initcontainers for lake deployment (#359) #34
This file contains hidden or 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: DevLake Helm Smoke Test | |
| on: | |
| push: | |
| branches: [ "**" ] | |
| pull_request: | |
| branches: [ "**" ] | |
| jobs: | |
| smoke-test: | |
| name: Smoke Test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 50 | |
| env: | |
| RELEASE_NAME: devlake | |
| NAMESPACE: devlake | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up kubectl | |
| run: | | |
| KVER="$(curl -sL https://dl.k8s.io/release/stable.txt)" | |
| curl -L -o kubectl "https://dl.k8s.io/release/${KVER}/bin/linux/amd64/kubectl" | |
| chmod +x kubectl && sudo mv kubectl /usr/local/bin/ | |
| - name: Set up Helm | |
| run: | | |
| HELM_VER="v3.18.6" | |
| curl -L "https://get.helm.sh/helm-${HELM_VER}-linux-amd64.tar.gz" | tar xz | |
| sudo mv linux-amd64/helm /usr/local/bin/helm | |
| - name: Set up kind | |
| run: | | |
| KIND_VER="v0.30.0" | |
| curl -L -o kind "https://kind.sigs.k8s.io/dl/${KIND_VER}/kind-linux-amd64" | |
| chmod +x kind && sudo mv kind /usr/local/bin/kind | |
| - name: Create cluster | |
| run: | | |
| kind create cluster --name devlake-smoke-test | |
| - name: Add Helm repos | |
| run: | | |
| helm repo add grafana https://grafana.github.io/helm-charts | |
| helm repo update | |
| - name: Build chart dependencies | |
| run: | | |
| helm dependency build charts/devlake | |
| - name: Install DevLake chart | |
| run: | | |
| kubectl get events -n "$NAMESPACE" -w & | |
| kubectl get pods -n "$NAMESPACE" -w & | |
| ENCRYPTION_SECRET=$(openssl rand -base64 2000 | tr -dc 'A-Z' | fold -w 128 | head -n 1) | |
| helm install "$RELEASE_NAME" ./charts/devlake \ | |
| --namespace "$NAMESPACE" \ | |
| --create-namespace \ | |
| --wait \ | |
| --set lake.encryptionSecret.secret="${ENCRYPTION_SECRET}" | |
| - name: Dump diagnostics on failure | |
| if: failure() | |
| run: | | |
| echo "=== Helm status for release ===" | |
| helm status "$RELEASE_NAME" -n "$NAMESPACE" || true | |
| echo "=== Kubernetes resources (all) ===" | |
| kubectl get all -n "$NAMESPACE" -o wide || true | |
| echo "=== Kubernetes events (latest 200) ===" | |
| kubectl get events -n "$NAMESPACE" --sort-by=.lastTimestamp | tail -n 200 || true | |
| echo "=== Describe deployments/statefulsets ===" | |
| kubectl describe deploy -n "$NAMESPACE" || true | |
| kubectl describe statefulset -n "$NAMESPACE" || true | |
| echo "=== Describe pods ===" | |
| kubectl describe pods -n "$NAMESPACE" || true | |
| echo "=== Logs from all pods (current and previous, last 200 lines) ===" | |
| for pod in $(kubectl get pods -n "$NAMESPACE" -o jsonpath='{.items[*].metadata.name}'); do | |
| echo "----- logs for ${pod} -----" | |
| kubectl logs -n "$NAMESPACE" "$pod" --all-containers --tail=200 || true | |
| echo "----- previous logs for ${pod} -----" | |
| kubectl logs -n "$NAMESPACE" "$pod" --all-containers --previous --tail=200 || true | |
| done |