-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
191 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
# 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: kind-kubernetes | ||
name: 🔨 Kind Kubernetes 🔨 | ||
uses: helm/kind-action@v1.10.0 | ||
env: | ||
ACTIONS_STEP_DEBUG: false | ||
KUBECONFIG: .kube/config | ||
with: | ||
wait: 30s | ||
cluster_name: kargo | ||
config: hack/kind.yaml | ||
ignore_failed_clean: true | ||
|
||
- id: pulumi-install | ||
name: 📦️ Pulumi Install 📦️ | ||
uses: pulumi/actions@v5 | ||
|
||
- id: pulumi-up | ||
name: 🚀 Pulumi Up 🚀 | ||
uses: pulumi/actions@v5 | ||
env: | ||
ACTIONS_STEP_DEBUG: false | ||
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 | ||
refresh: true | ||
upsert: true | ||
stack-name: /kargo/ci | ||
secrets-provider: passphrase | ||
cloud-url: file://./.pulumi | ||
work-dir: ./ | ||
|
||
- name: 🕚 Wait for pods 🕛 | ||
uses: CodingNagger/minikube-wait-action@v1.1.1 | ||
env: | ||
ACTIONS_STEP_DEBUG: false | ||
KUBECONFIG: .kube/config | ||
with: | ||
max-retry-attempts: 12 | ||
retry-delay: 10 | ||
|
||
- id: kind-destroy | ||
if: always() | ||
name: 🛠️ Pulumi Config 🛠️ | ||
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 | ||
run: | | ||
make clean | ||
make clean-all | ||
|
||
- id: pulumi-destroy | ||
name: 💣 Pulumi Destroy 💣 | ||
uses: pulumi/actions@v5 | ||
continue-on-error: true | ||
if: always() | ||
env: | ||
ACTIONS_STEP_DEBUG: false | ||
KUBECONFIG: .kube/config | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | ||
PULUMI_CONFIG_PASSPHRASE: foobarbaz | ||
PULUMI_BACKEND_URL: file://./.pulumi | ||
PULUMI_K8S_DELETE_UNREACHABLE: true | ||
with: | ||
command: destroy | ||
refresh: true | ||
stack-name: organization/kargo/ci | ||
secrets-provider: passphrase | ||
cloud-url: file://./.pulumi | ||
work-dir: ./ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# This Github Workflow will run on every push to the repository | ||
# and will test and validate the Kargo codebase using Kind Kubernetes. | ||
name: CI Testing - Konductor on Talos | ||
|
||
on: push | ||
|
||
jobs: | ||
readme: | ||
runs-on: ubuntu-latest | ||
|
||
container: | ||
image: ghcr.io/containercraft/konductor:latest | ||
options: --user runner --security-opt seccomp=unconfined | ||
|
||
steps: | ||
- id: checkout | ||
name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- id: list | ||
name: List Runme Commands | ||
run: | | ||
runme list | ||
- id: login | ||
name: Login to Cloud Accounts | ||
run: | | ||
runme run login | ||
env: | ||
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- id: configure | ||
name: Configure Kargo Deployment | ||
run: | | ||
export ORGANIZATION="${GITHUB_USER:-${GITHUB_REPOSITORY_OWNER:-}}" | ||
runme run configure | ||
env: | ||
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_USER: ${{ github.actor }} | ||
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }} | ||
|
||
# - id: kubernetes | ||
# name: Deploy Kubernetes | ||
# run: | | ||
# runme run kubernetes | ||
|
||
# - id: deploy | ||
# name: Deploy Kargo Platform on Kubernetes | ||
# run: | | ||
# runme run deploy | ||
# env: | ||
# PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Debug Build | ||
# uses: stateful/vscode-server-action@v1 | ||
# if: failure() | ||
# with: | ||
# timeout: "300000" | ||
|
||
- id: clean | ||
name: Clean Up Kubernetes & Kargo Deployment | ||
if: failure() || success() | ||
run: | | ||
runme run clean | ||
env: | ||
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |