Skip to content

dbg ci

dbg ci #99

Workflow file for this run

# This GitHub Workflow will run on every push to the repository
# and will test the Kargo codebase on a Kind Kubernetes cluster.
name: CI - Kargo on Kind
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- "devcontainer/**"
- ".devcontainer/**"
- ".pulumi/**"
- ".talos/**"
- ".kube/**"
- "docs/**"
- "**.md"
pull_request:
branches:
- main
paths-ignore:
- "devcontainer/**"
- ".devcontainer/**"
- ".pulumi/**"
- ".talos/**"
- ".kube/**"
- "docs/**"
- "**.md"
schedule:
- cron: "0 2 * * *"
jobs:
ci-kargo-kind:
runs-on: ubuntu-latest
steps:
- id: checkout
name: ✨ Checkout ✨
uses: actions/checkout@v4
with:
fetch-depth: 1
- id: pulumi-install
name: 📦️ Pulumi Install 📦️
uses: pulumi/actions@v5
- id: kind-kubernetes
name: 🔨 Kubernetes KinD Cluster 🔨
uses: helm/[email protected]
env:
ACTIONS_STEP_DEBUG: true
KUBECONFIG: .kube/config
with:
wait: 30s
cluster_name: kargo
config: hack/kind.yaml
ignore_failed_clean: true
- id: pulumi-up
name: 🚀 Pulumi Up 🚀
uses: pulumi/actions@v5
env:
ACTIONS_STEP_DEBUG: true
KUBECONFIG: .kube/config
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_CONFIG_PASSPHRASE: foobarbaz
PULUMI_BACKEND_URL: file://./.pulumi
with:
command: up
work-dir: ./
cloud-url: file://./.pulumi
refresh: true
secrets-provider: passphrase
stack-name: organization/kargo/ci
upsert: true
- name: Wait for pods
uses: CodingNagger/[email protected]
- id: kubectl-get-pods
name: Kubectl Get Pods
run: |
set -x
sleep 30
sudo kind get kubeconfig --name kargo > .kube/config
kubectl cluster-info --context kind-kargo
kubectl get po --all-namespaces --context kind-kargo
env:
KUBECONFIG: .kube/config
ACTIONS_STEP_DEBUG: true
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - id: pulumi-up
# name: Deploy Pulumi IaC
# env:
# KUBECONFIG: .kube/config
# ACTIONS_STEP_DEBUG: true
# PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# source .envrc
# pulumi login
# pulumi install
# pulumi stack select --create dev
# pulumi config set kubernetes kind
# pulumi up --refresh --skip-preview
# - id: pulumi-destroy
# name: 💣 Pulumi Destroy 💣
# run: |
# source .envrc
# pulumi down --skip-preview --refresh \
# || PULUMI_K8S_DELETE_UNREACHABLE=true pulumi down --skip-preview --refresh
# env:
# KUBECONFIG: .kube/config
# ACTIONS_STEP_DEBUG: false
# PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Cleanup
# id: clean-all
# if: always()
# run: |
# make clean-all
# env:
# KUBECONFIG: /tmp/kubeconfig
# ACTIONS_STEP_DEBUG: false
# PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}