Skip to content

finding PATH

finding PATH #93

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: pulumi-up
name: 🚀 Pulumi Up 🚀
uses: pulumi/actions@v5
env:
KUBECONFIG: .kube/config
ACTIONS_STEP_DEBUG: true
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
command: up
work-dir: ./
cloud-url: file://~
refresh: true
secrets-provider: passphrase
stack-name: ci
- id: kind-kubernetes
name: Kubernetes KinD Cluster
uses: helm/[email protected]
with:
wait: 30s
cluster_name: kargo
config: hack/kind.yaml
ignore_failed_clean: true
- id: kubectl-get-pods
name: Kubectl Get Pods
run: |
set -x
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 }}