generated from ContainerCraft/devcontainer
-
Notifications
You must be signed in to change notification settings - Fork 14
140 lines (129 loc) · 3.91 KB
/
kind.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# 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
container:
image: ghcr.io/containercraft/konductor:latest
options: --user runner --security-opt seccomp=unconfined
steps:
- name: Checkout
uses: actions/checkout@v4
id: checkout
with:
fetch-depth: 1
- name: Pulumi Login
id: pulumi-login
run: |
direnv allow
make login
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Kind Cluster
id: create-kind-kubernetes
env:
ACTIONS_STEP_DEBUG: true
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KUBECONFIG: /workspaces/Kargo/.kube/config
KINDCONFIG: /workspaces/Kargo/hack/kind.yaml
run: |
set -ex
direnv allow
make kind-cluster
- id: wait-kind-ready
name: Wait for Kind Kubernetes API to be Ready
env:
ACTIONS_STEP_DEBUG: true
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -ex
direnv allow
make kind-ready
- name: Deploy Pulumi Infrastructure
id: deploy
run: |
set -ex
direnv allow
make pulumi-up
env:
ACTIONS_STEP_DEBUG: true
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KUBECONFIG: /workspaces/Kargo/.kube/config
KINDCONFIG: /workspaces/Kargo/hack/kind.yaml
- name: Wait for All Pods to be Ready
id: wait-all-pods
run: |
set -ex
direnv allow
make wait-all-pods
env:
ACTIONS_STEP_DEBUG: false
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KUBECONFIG: /workspaces/Kargo/.kube/config
KINDCONFIG: /workspaces/Kargo/hack/kind.yaml
- name: Destroy Pulumi Infrastructure
id: destroy
run: |
direnv allow
make pulumi-down
env:
ACTIONS_STEP_DEBUG: false
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KUBECONFIG: /workspaces/Kargo/.kube/config
KINDCONFIG: /workspaces/Kargo/hack/kind.yaml
- name: Clean Up Resources
id: clean
run: |
direnv allow
make clean
env:
ACTIONS_STEP_DEBUG: false
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KUBECONFIG: /workspaces/Kargo/.kube/config
KINDCONFIG: /workspaces/Kargo/hack/kind.yaml
- name: Perform Extended Cleanup
id: clean-all
if: always()
run: |
direnv allow
make clean-all
env:
ACTIONS_STEP_DEBUG: false
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KUBECONFIG: /workspaces/Kargo/.kube/config
KINDCONFIG: /workspaces/Kargo/hack/kind.yaml