Helm Deployment Test #7
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: Helm Deployment Test | |
| on: | |
| pull_request_target: | |
| types: [labeled] | |
| branches: [main, gh-pages] | |
| schedule: | |
| - cron: '0 10 * * 1' # Mondays 10 AM UTC (1 hour after lint) | |
| workflow_dispatch: | |
| jobs: | |
| deploy-test: | |
| runs-on: ubuntu-latest | |
| # Security: Only run pull_request_target if 'deploy-test' label present | |
| if: | | |
| github.event_name != 'pull_request_target' || | |
| contains(github.event.pull_request.labels.*.name, 'deploy-test') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Helm | |
| uses: azure/setup-helm@v3 | |
| with: | |
| version: 'v3.14.0' | |
| - name: Add Bitnami Helm repository | |
| run: | | |
| helm repo add bitnami https://charts.bitnami.com/bitnami | |
| helm repo update | |
| timeout-minutes: 5 | |
| - name: Determine chart path | |
| id: chart-path | |
| run: | | |
| if [ -f "Chart.yaml" ]; then | |
| echo "path=." >> $GITHUB_OUTPUT | |
| elif [ -d "charts/tooljet" ]; then | |
| echo "path=charts/tooljet" >> $GITHUB_OUTPUT | |
| else | |
| echo "Error: Chart not found" | |
| exit 1 | |
| fi | |
| - name: Update Helm chart dependencies | |
| run: | | |
| cd ${{ steps.chart-path.outputs.path }} | |
| helm dependency update | |
| - name: Create Kind Kubernetes cluster | |
| uses: helm/kind-action@v1.8.0 | |
| with: | |
| cluster_name: tooljet-test | |
| wait: 120s | |
| - name: Verify cluster is ready | |
| run: | | |
| kubectl cluster-info | |
| kubectl get nodes | |
| - name: Deploy ToolJet chart | |
| run: | | |
| echo "π Installing chart (without waiting for pods to be ready)..." | |
| helm install tooljet ${{ steps.chart-path.outputs.path }} \ | |
| --namespace tooljet \ | |
| --create-namespace \ | |
| --set postgresql.enabled=true \ | |
| --set redis.enabled=false \ | |
| --debug | |
| - name: Verify resources were created | |
| run: | | |
| echo "β Helm install completed successfully" | |
| echo "" | |
| echo "π Checking deployed resources..." | |
| kubectl get all -n tooljet | |
| echo "" | |
| echo "π Checking Deployments..." | |
| kubectl get deployments -n tooljet -o wide | |
| echo "" | |
| echo "π Checking Services..." | |
| kubectl get services -n tooljet | |
| echo "" | |
| echo "π Checking Secrets..." | |
| kubectl get secrets -n tooljet | |
| echo "" | |
| echo "π Pod Status:" | |
| kubectl get pods -n tooljet -o wide || true | |
| echo "" | |
| echo "βΉοΈ Note: Pods may not be ready without proper configuration" | |
| echo "βΉοΈ This test validates that resources deploy correctly, not that the app runs" | |
| - name: Describe pods for debugging | |
| if: always() | |
| run: | | |
| echo "π Describing pods for debugging..." | |
| kubectl describe pods -n tooljet || true | |
| echo "" | |
| echo "π Recent pod events:" | |
| kubectl get events -n tooljet --sort-by='.lastTimestamp' || true | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| helm uninstall tooljet -n tooljet || true |