Skip to content

Commit 57587e5

Browse files
authored
Deploy to prod using a git workflow video & clarifications (windmill-labs#466)
* Deploy to prod using a git workflow video & clarifications * Updated video & forms for approvals
1 parent 8493c43 commit 57587e5

File tree

11 files changed

+93
-25
lines changed

11 files changed

+93
-25
lines changed

docs/advanced/11_git_sync/index.mdx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ For all details on Version Control in Windmill, see [Version Control](../../adva
1010

1111
:::
1212

13+
The first 5 minutes of this video show how to set up a Git repository for a workspace, the rest of the video shows how to use it to deploy to a Prod workspace using GitHub Actions:
14+
1315
<iframe
1416
style={{ aspectRatio: '16/9' }}
15-
src="https://www.youtube.com/embed/JqG0KNYWLx0?vq=hd1080"
16-
title="Git Sync"
17+
src="https://www.youtube.com/embed/es8FUC2M73o?vq=hd1080"
18+
title="Deploy to a Prod Workspace using a Git Workflow"
1719
frameBorder="0"
1820
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
1921
allowFullScreen
@@ -48,11 +50,18 @@ Run the following commands from the git repo folder to push the initial workspac
4850

4951
This feature is [Cloud & Enterprise Self-Hosted](../../misc/7_plans_details/index.mdx) only.
5052

51-
<div class="text-xl mb-2 font-semibold"></div>
53+
## Deploy to Prod using a Git Workflow
54+
55+
This feature can be used alongside GiHub Actions to adopt a robust development process for your Windmill scripts, flows and apps,
56+
with for example a Staging Workspace making automatically PRs on a repo that pushes to a Prod workspace upon merge.
57+
58+
More details at:
59+
60+
5261
<div class="grid grid-cols-2 gap-6 mb-4">
5362
<DocCard
54-
title="Command-Line Interface"
55-
description="Interact with Windmill instances right from your terminal."
56-
href="/docs/advanced/cli"
63+
title="Deploy to Prod using a Git Workflow"
64+
description="Windmill integration with Git repositories makes it possible to adopt a robust development process for your Windmill scripts, flows and apps."
65+
href="/docs/advanced/deploy_gh_gl"
5766
/>
5867
</div>

docs/advanced/13_version_control/index.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ Manage changes to scripts workflows, apps and resources using commits & push on
88

99
From the workspace settings, you can set a [git_repository](../../integrations/git_repository.mdx) resource on which the workspace will automatically commit and push scripts, flows and apps to the repository on each [deploy](../../core_concepts/0_draft_and_deploy/index.mdx).
1010

11+
The first 5 minutes of this video show how to set up a Git repository for a workspace, the rest of the video shows how to use it to deploy to a Prod workspace using GitHub Actions:
12+
1113
<iframe
1214
style={{ aspectRatio: '16/9' }}
13-
src="https://www.youtube.com/embed/JqG0KNYWLx0?vq=hd1080"
14-
title="Git Sync"
15+
src="https://www.youtube.com/embed/es8FUC2M73o?vq=hd1080"
16+
title="Deploy to a Prod Workspace using a Git Workflow"
1517
frameBorder="0"
1618
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
1719
allowFullScreen

docs/advanced/3_cli/workspace-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Example here just using `windmill -h`:
133133

134134
:::
135135

136-
## Whoami
136+
## whoami
137137

138138
The wmill workspace whoami command allows you to display the currently active user and the active workspace.
139139

docs/advanced/9_deploy_gh_gl/index.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Deploy to prod using a Git Workflow
1+
# Deploy to Prod using a Git Workflow
22

33
Windmill integration with Git repositories makes it possible to adopt a robust development process for your Windmill scripts, flows and apps.
44

@@ -16,22 +16,31 @@ The process is as follows:
1616

1717
This gives the flexibility to fully test new Windmill scripts, flows and apps, while having them [version-controlled](../13_version_control/index.mdx) and deployed in an automated way to the production environment.
1818

19-
:::info
20-
21-
Windmill workspace sync to a Git repository is a [Cloud and Self-Hosted Enterprise Edition](/pricing)-only feature.
22-
23-
:::
2419

2520
:::tip
2621

2722
Check out the [windmill-sync-example repository](https://github.com/windmill-labs/windmill-sync-example) as an illustration of this process.
2823

2924
:::
3025

26+
## Git Sync
27+
28+
Deploying to a prod workspace using git requires the [Git Sync](../11_git_sync/index.mdx) feature, which is is a [Cloud and Self-Hosted Enterprise Edition](/pricing)-only feature.
29+
3130
## Setup
3231

3332
Note: this is the detailed setup steps for a [GitHub](https://github.com/) repository. It will need to be adapted for [GitLab](https://about.gitlab.com/).
3433

34+
<iframe
35+
style={{ aspectRatio: '16/9' }}
36+
src="https://www.youtube.com/embed/es8FUC2M73o?vq=hd1080"
37+
title="Deploy to a Prod Workspace using a Git Workflow"
38+
frameBorder="0"
39+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
40+
allowFullScreen
41+
className="border-2 rounded-xl object-cover w-full dark:border-gray-800"
42+
></iframe>
43+
3544
### GitHub repository setup
3645

3746
First, the GitHub repo needs to be set up and Windmill needs to be able to commit to it.

docs/core_concepts/3_resources_and_types/index.mdx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@ a link, for example:
7474

7575
## Create a Resource Type
7676

77-
Windmill comes preloaded with some common Resource Types, such as databases, apps, SMTP, etc. You can see the full list on [Windmill Hub](https://hub.windmill.dev/resources). You
78-
can also add custom Resource Types by clicking "Add a resource type" on the
79-
[Resources](https://app.windmill.dev/resources) page.
77+
Windmill comes preloaded with some common Resource Types, such as databases, apps, SMTP, etc. You can see the full list on [Windmill Hub](https://hub.windmill.dev/resources).
78+
You can also add custom Resource Types by clicking "Add a resource type" on the [Resources](https://app.windmill.dev/resources) page.
8079

8180
![Create resource type](./add_resource_type.png.webp)
8281

@@ -86,6 +85,16 @@ default, etc). You can also view the schema by toggling the "As JSON" option:
8685

8786
![Resource type schema view](./resource_type_json.png.webp)
8887

88+
### Share Resource Type on Hub
89+
90+
You can contribute to the [Windmill Hub](https://hub.windmill.dev/) by sharing your Resource Type. To do so, add a Resource Type on the [Resources section](https://hub.windmill.dev/resources) of the Hub.
91+
92+
You will be asked to fill Name, Integration (the corresponding service it interacts with) and Schema (the JSON Schema of the Resource Type).
93+
94+
Verified Resource Types on the Hub are directly added to the list of available Resource Types on each new Windmill instance synced with the Hub.
95+
96+
![Share resource type](./new_resource_type_hub.png)
97+
8998
## States
9099

91100
States are used by scripts to keep data persistent between runs of the same script by the same trigger (schedule or user).
Loading

docs/flows/11_flow_approval.mdx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ Note that approval steps can be applied the same configurations as regular steps
7171

7272
You can add an arbitrary schema form to be provided and displayed on the approval page. Users opening the approval page would then be offered to fill arguments you can use in the flow.
7373

74+
Adding a form to an approval step is a [Cloud & Enterprise Self-Hosted](/pricing) only feature.
75+
7476
<video
7577
className="border-2 rounded-xl object-cover w-full h-full"
7678
controls
@@ -95,6 +97,31 @@ You can use the arguments values [connecting](./16_architecture.mdx#input-transf
9597

9698
This is a way to introduce human-in-the-loop workflows and condition branches on approval steps inputs.
9799

100+
### How to add dynamic default args & enums?
101+
102+
On your form, you can dynamically set the default arguments and enums with the logic of the approval script.
103+
Which means they can depend on previous results/API.
104+
105+
As one of the return key of this step, return an object `default_args` that contains the default arguments of the form arguments. e.g:
106+
107+
```
108+
return {
109+
endpoints,
110+
default_args: {
111+
foo: "foo",
112+
bar: true,
113+
},
114+
}
115+
116+
For enums, use `enums`, e.g:
117+
return {
118+
endpoints,
119+
enums: {
120+
foo: ["choice1", "choice2"]
121+
},
122+
}
123+
```
124+
98125
## Tutorial: A Slack Approval Step Conditioning Flow Branches
99126

100127
The answer to the arguments of an approval page can be used as an input to condition branches in human-in-the-loop workflows.

docs/integrations/0_integrations_on_windmill.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,13 @@ Interacting with an integration means using a resource, see the dedicated doc pa
4242

4343
You can [create a resource type](../core_concepts/3_resources_and_types/index.mdx#create-a-resource-type). Use the "Add Property" button to add a field to the resource type. You can specify constraints for the field (a type, making it mandatory, specifying a default, etc). You can also view the schema by toggling the "As JSON" option.
4444

45-
Once you're comfortable with the new integration, we would be super grateful if you could [share it on hub](/docs/misc/share_on_hub).
45+
Once you're comfortable with the new integration, we would be super grateful if you could [share it on Hub](../misc/1_share_on_hub/index.md).
46+
47+
You will be asked to fill Name, Integration (the corresponding service it interacts with) and Schema (the JSON Schema of the Resource Type).
48+
49+
Verified Resource Types on the Hub are directly added to the list of available Resource Types on each new Windmill instance synced with the Hub.
50+
51+
![Share resource type](../core_concepts/3_resources_and_types//new_resource_type_hub.png)
4652

4753
<div class="grid grid-cols-2 gap-6 mb-4">
4854
<DocCard

docs/integrations/git_repository.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ More:
1414
/>
1515
</div>
1616

17+
The first 5 minutes of this video show how to set up a Git repository for a workspace, the rest of the video shows how to use it to deploy to a Prod workspace using GitHub Actions:
18+
1719
<iframe
1820
style={{ aspectRatio: '16/9' }}
19-
src="https://www.youtube.com/embed/JqG0KNYWLx0?vq=hd1080"
20-
title="Git Sync"
21+
src="https://www.youtube.com/embed/es8FUC2M73o?vq=hd1080"
22+
title="Deploy to a Prod Workspace using a Git Workflow"
2123
frameBorder="0"
2224
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
2325
allowFullScreen

docs/misc/9_guides/airplane/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The migration from Airplane to Windmill is made easy by the same developer-first
66

77
Windmill offers 3 months of [Enterprise Edtion](/pricing) to Airplane users. To get started, contact us at [ruben@windmill.dev](mailto:ruben@windmill.dev).
88

9+
The migration from Airplane is included in the Enterprise Edition. Upon subscription, we can organize a migration session from Airplane to Windmill. We can also recreate your scripts, flows, and applications from exports and screenshots of Airplane, in collaboration with you if your instance is self-hosted. If you are interested, contact us at [ruben@windmill.dev](mailto:ruben@windmill.dev).
10+
911
The following section covers the main concepts of Windmill, starting from those of Airplane. To see all the Core Concepts of Windmill, see:
1012

1113
<div class="grid grid-cols-2 gap-6 mb-4">
@@ -126,10 +128,12 @@ Manage changes to scripts workflows, apps and resources using commits & push on
126128

127129
From the workspace settings, you can set a [git_repository](../../../integrations/git_repository.mdx) resource on which the workspace will automatically commit and push scripts, flows and apps to the repository on each [deploy](../../../core_concepts/0_draft_and_deploy/index.mdx).
128130

131+
The first 5 minutes of this video show how to set up a Git repository for a workspace, the rest of the video shows how to use it to deploy to a Prod workspace using GitHub Actions:
132+
129133
<iframe
130134
style={{ aspectRatio: '16/9' }}
131-
src="https://www.youtube.com/embed/JqG0KNYWLx0?vq=hd1080"
132-
title="Git Sync"
135+
src="https://www.youtube.com/embed/es8FUC2M73o?vq=hd1080"
136+
title="Deploy to a Prod Workspace using a Git Workflow"
133137
frameBorder="0"
134138
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
135139
allowFullScreen

0 commit comments

Comments
 (0)