-
Notifications
You must be signed in to change notification settings - Fork 1
/
ci-cd-for-kestra-flows.yaml
59 lines (52 loc) · 1.97 KB
/
ci-cd-for-kestra-flows.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
id: ci-cd-for-kestra-flows
namespace: company.team
tasks:
- id: deploy
type: io.kestra.plugin.core.flow.WorkingDirectory
tasks:
- id: cloneRepository
type: io.kestra.plugin.git.Clone
url: https://github.com/anna-geller/kestra-ci-cd
branch: main
- id: validate_flows
type: io.kestra.plugin.scripts.shell.Commands
taskRunner:
type: io.kestra.plugin.core.runner.Process
commands:
- /app/kestra flow validate flows/
- id: deploy_flows
type: io.kestra.plugin.scripts.shell.Commands
taskRunner:
type: io.kestra.plugin.core.runner.Process
commands:
- /app/kestra flow namespace update prod flows/prod/ --no-delete
- /app/kestra flow namespace update prod.marketing
flows/prod.marketing/ --no-delete
triggers:
- id: github
type: io.kestra.plugin.core.trigger.Webhook
key: 1KERKzRQZSMtLdMdNI7Nkr
extend:
title: CI/CD to deploy Kestra flows using a GitHub webhook trigger
description: >-
This blueprint demonstrates how to use Kestra to build a CI/CD pipeline.
This flow:
- deploys other flows effectively running a CI/CD pipeline for Kestra flows
directly from Kestra itself
- clones a GitHub repository, validates the flows, and then deploys them to
a given Kestra namespace
- uses a [webhook trigger](https://kestra.io/docs/how-to-guides/webhooks) so
that the flow can be triggered upon GitHub push event sent by a GitHub
webhook.
To learn more about this CI/CD pattern, check the following [documentation
page](https://kestra.io/docs/developer-guide/cicd#deploy-flows-from-a-flow)
and [blog
post](https://levelup.gitconnected.com/when-github-actions-get-painful-to-troubleshoot-try-this-instead-9a134c9e9baf).
tags:
- Trigger
- Git
- DevOps
- Task Runner
ee: false
demo: true
meta_description: This blueprint demonstrates how to use Kestra to build a CI/CD pipeline.