diff --git a/content/docs/14.best-practices/1.from-dev-to-prod.md b/content/docs/14.best-practices/1.from-dev-to-prod.md index e9ba91bccb..251013f558 100644 --- a/content/docs/14.best-practices/1.from-dev-to-prod.md +++ b/content/docs/14.best-practices/1.from-dev-to-prod.md @@ -59,6 +59,12 @@ You can find more about CI/CD pattern with Kestra [here](../version-control-cicd #### Git Example +
+ +
+ +--- + We can use the [`git.SyncFlows` task](/plugins/plugin-git/tasks/io.kestra.plugin.git.syncflows) combined with a [Trigger](../04.workflow-components/07.triggers/index.md) to automatically pull Flows from the `main` branch of the Git repository. This means Kestra will manage the process, reducing the number of systems needed to automate the dev to prod process. @@ -75,6 +81,10 @@ While we can be sure that our flows are valid, this will not check for logical e #### CI/CD Example +
+ +
+ We can use CI/CD to automatically deploy our flows from our Git repository to our production instance of Kestra when they are merged to the `main` branch. With GitHub, we can use the official [Deploy Action](../version-control-cicd/cicd/01.github-action.md#kestra-actions), which uses the Kestra Server CLI under the hood, to deploy when a Pull Request is merged to `main`. diff --git a/content/docs/14.best-practices/3.manage-environments.md b/content/docs/14.best-practices/3.manage-environments.md index 93cb53516f..135cbc55a5 100644 --- a/content/docs/14.best-practices/3.manage-environments.md +++ b/content/docs/14.best-practices/3.manage-environments.md @@ -3,7 +3,6 @@ title: Manage Environments icon: /docs/icons/best-practices.svg --- - Kestra users can manage their "environments" through different levels of granularity. Kestra has three main concepts: instance, tenant, and namespace. ## When to use multiple instances? diff --git a/content/docs/14.best-practices/6.git.md b/content/docs/14.best-practices/6.git.md index 7decc557ca..a192243629 100644 --- a/content/docs/14.best-practices/6.git.md +++ b/content/docs/14.best-practices/6.git.md @@ -4,12 +4,16 @@ icon: /docs/icons/best-practices.svg version: ">= 0.17.0" --- -This section describes best practices for Version Control with Git in Kestra. +Best practices for Version Control with Git in Kestra. -By default, **all Kestra flows are automatically versioned**. You don't need to use any additional version control system to track changes to your flows. Kestra automatically creates a new revision of a flow whenever you save it, and you can view the history of changes to a flow, compare changes between revisions, and restore a previous version at any time. +By default, **all Kestra flows are automatically versioned** with [Revisions](../05.concepts/03.revision.md). You don't need to use any additional version control system to track changes to your flows. Kestra automatically creates a new revision of a flow whenever you save it, and you can view the history of changes to a flow, compare changes between revisions, and restore a previous version at any time. However, if you want to use Git to track changes to your [Flows](../04.workflow-components/01.flow.md) and [Namespace Files](../05.concepts/02.namespace-files.md), you can do so using the built-in Git support in Kestra. +
+ +
+ There are multiple ways to use Git with Kestra: - The [git.SyncFlows](/plugins/plugin-git/tasks/io.kestra.plugin.git.syncflows) pattern allows you to implement GitOps and use Git as a single source of truth for your flows. - The [git.SyncNamespaceFiles](/plugins/plugin-git/tasks/io.kestra.plugin.git.syncnamespacefiles) pattern allows you to implement GitOps and use Git as a single source of truth for your namespace files. @@ -22,4 +26,3 @@ The image below shows how to choose the right pattern based on your needs: ![git](/docs/developer-guide/git/git.png) For a detailed comparison of the three patterns, check the [Version Control with Git](../version-control-cicd/04.git.md) page. - diff --git a/content/docs/14.best-practices/index.md b/content/docs/14.best-practices/index.md index 51b02fb855..aebbc56855 100644 --- a/content/docs/14.best-practices/index.md +++ b/content/docs/14.best-practices/index.md @@ -3,7 +3,7 @@ title: Best Practices icon: /docs/icons/best-practices.svg --- -This section describes best practices for building reliable workflows in Kestra. +Best practices for building reliable workflows in Kestra. ::ChildCard :: diff --git a/content/docs/version-control-cicd/04.git.md b/content/docs/version-control-cicd/04.git.md index bb52c1d19a..82b4cce51b 100644 --- a/content/docs/version-control-cicd/04.git.md +++ b/content/docs/version-control-cicd/04.git.md @@ -5,6 +5,12 @@ icon: /docs/icons/dev.svg Setup Version Control with Git to store your flows and namespace files. +
+ +
+ +--- + Kestra supports version control with Git. You can use one or more Git repositories to store your [Flows](../04.workflow-components/01.flow.md) and [Namespace Files](../05.concepts/02.namespace-files.md), and track changes to them over time via Git commit history. There are multiple ways to use Git with Kestra: