Skip to content

Commit e13e2fa

Browse files
authored
Merge pull request #335 from daniel-hutao/feat-2
docs(gitops): adding dependency logic in gitops.md
2 parents b6f61f2 + caca58e commit e13e2fa

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

docs/best_practices/gitops.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,21 @@
22

33
## Plugins needed
44

5-
1. github-repo-scaffolding-golang
6-
2. jira-github
7-
3. githubactions-golang
8-
4. argocd
9-
5. argocdapp
5+
1. [github-repo-scaffolding-golang](../plugins/github-repo-scaffolding-golang_plugin.md)
6+
2. [jira-github](../plugins/jira-github-integ_plugin.md)
7+
3. [githubactions-golang](../plugins/githubactions-golang_plugin.md)
8+
4. [argocd](../plugins/argocd_plugin.md)
9+
5. [argocdapp](../plugins/argocdapp_plugin.md)
10+
11+
The dependencies of these plugins are(`a -> b` means for `a depends on b`):
12+
13+
- `jira-github` -> `github-repo-scaffolding-golang`
14+
- `githubactions-golang` -> `github-repo-scaffolding-golang`
15+
- `argocdapp` -> `argocd`
16+
17+
Note: These dependencies are not consistent, such as when the repo operated by `jira-github` and `github-repo-scaffolding-golang` are not the same, the dependencies disappear.
18+
19+
We should use the `dependency` according to the actual usage situation.
1020

1121
## Download DevStream (`dtm`)
1222

docs/plugins/argocdapp_plugin.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
This plugin creates an [ArgoCD Application](https://argo-cd.readthedocs.io/en/stable/core_concepts/) custom resource.
44

55
**Notes:**
6-
- ArgoCD itself must have been already installed before the usage of this plugin. To install ArgoCD, use the [argocd plugin](https://github.com/merico-dev/stream/blob/main/docs/argocd_plugin.md).
6+
- ArgoCD itself must have been already installed before the usage of this plugin.
7+
To install ArgoCD, use the [argocd plugin](../plugins/argocd_plugin.md).
8+
Or you can use both plugins(argocd+argocdapp) at the same time.
9+
See [GitOps Toolchain](../best_practices/gitops.md) for more info.
710
- Currently, only the Helm chart is supported when creating the ArgoCD application.
8-
- At the moment, DevStream doesn't support dependency or concurrency yet. So, in the config file, the ArgoCD app plugin must be placed _after_ the ArgoCD plugin if you want to install ArgoCD first then create the ArgoCD application.
9-
11+
- Modify the file accordingly. Especially remember to modify `ARGOCD_TOOL_NAME`.
1012
## 2 Usage:
1113

1214
```yaml
@@ -18,8 +20,8 @@ tools:
1820
# version of the plugin
1921
# checkout the version from the GitHub releases
2022
version: 0.2.0
21-
# optional; if specified, dtm will make sure the dependency is applied first before handling this tool.
22-
dependsOn: [ "TOOL1_NAME.TOOL1_KIND", "TOOL2_NAME.TOOL2_KIND" ]
23+
# if specified, dtm will make sure the dependency is applied first before handling this tool.
24+
dependsOn: [ "ARGOCD_TOOL_NAME.argocd" ]
2325
# options for the plugin
2426
options:
2527
# information on the ArgoCD Application

examples/gitops.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ tools:
2424
# version of the plugin
2525
# checkout the version from the GitHub releases
2626
version: 0.2.0
27+
# optional; if specified, dtm will make sure the dependency is applied first before handling this tool.
28+
dependsOn: [ "go-webapp-repo.github-repo-scaffolding-golang" ]
2729
# options for the plugin
2830
options:
2931
# the repo's owner
@@ -45,6 +47,8 @@ tools:
4547
# version of the plugin
4648
# checkout the version from the GitHub releases
4749
version: 0.2.0
50+
# optional; if specified, dtm will make sure the dependency is applied first before handling this tool.
51+
dependsOn: [ "go-webapp-repo.github-repo-scaffolding-golang" ]
4852
# options for the plugin
4953
options:
5054
# the repo's owner. It should be case-sensitive here; strictly use your GitHub user name; please change the value below.
@@ -79,7 +83,7 @@ tools:
7983
enable: False
8084
# dockerhub image repo; please change the value below.
8185
repo: YOUR_DOCKERHUB_IMAGE_REPO_NAME
82-
- name: argocd
86+
- name: argocd-dev
8387
plugin:
8488
# name of the plugin
8589
kind: argocd
@@ -115,6 +119,8 @@ tools:
115119
# version of the plugin
116120
# checkout the version from the GitHub releases
117121
version: 0.2.0
122+
# if specified, dtm will make sure the dependency is applied first before handling this tool.
123+
dependsOn: [ "argocd-dev.argocd" ]
118124
# options for the plugin
119125
options:
120126
# information on the ArgoCD application

0 commit comments

Comments
 (0)