Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions cmd/plugin/github-repo-scaffolding-golang/main.go

This file was deleted.

40 changes: 0 additions & 40 deletions cmd/plugin/gitlab-repo-scaffolding-golang/main.go

This file was deleted.

8 changes: 4 additions & 4 deletions docs/best-practices/gitops.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ For Chinese readers, watch this one instead:

## Plugins needed

1. [github-repo-scaffolding-golang](../plugins/github-repo-scaffolding-golang.md)
1. [repo-scaffolding](../plugins/repo-scaffolding.md)
2. [jira-github](../plugins/jira-github-integ.md)
3. [githubactions-golang](../plugins/githubactions-golang.md)
4. [argocd](../plugins/argocd.md)
5. [argocdapp](../plugins/argocdapp.md)

The dependencies of these plugins are(`a -> b` means for `a depends on b`):

- `jira-github` -> `github-repo-scaffolding-golang`
- `githubactions-golang` -> `github-repo-scaffolding-golang`
- `argocdapp` -> `argocd` and `github-repo-scaffolding-golang`
- `jira-github` -> `repo-scaffolding`
- `githubactions-golang` -> `repo-scaffolding`
- `argocdapp` -> `argocd`, `githubactions-golang` and `repo-scaffolding`

Note: These dependencies are optional; you can use dependency to make sure a certain tool is installed before another. We should use dependency according to the actual usage situation.

Expand Down
8 changes: 4 additions & 4 deletions docs/best-practices/gitops.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@

## 所需插件

1. [github-repo-scaffolding-golang](../plugins/github-repo-scaffolding-golang.md)
1. [repo-scaffolding](../plugins/repo-scaffolding.md)
2. [jira-github](../plugins/jira-github-integ.md)
3. [githubactions-golang](../plugins/githubactions-golang.md)
4. [argocd](../plugins/argocd.md)
5. [argocdapp](../plugins/argocdapp.md)

这些插件的依赖关系如下(`a -> b`意味着`a依赖b`):

- `jira-github` -> `github-repo-scaffolding-golang`
- `githubactions-golang` -> `github-repo-scaffolding-golang`
- `argocdapp` -> `argocd` 和 `github-repo-scaffolding-golang`
- `jira-github` -> `repo-scaffolding`
- `githubactions-golang` -> `repo-scaffolding`
- `argocdapp` -> `argocd`, `githubactions-golang` 和 `repo-scaffolding`

**注意**:依赖并不是必须指定的,我们可以用依赖确保某个工具可以先于另外一个工具安装。我们应该根据实际的使用场景来使用`dependsOn`。

Expand Down
23 changes: 15 additions & 8 deletions docs/core-concepts/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,17 +62,24 @@ See the `tools.yaml` example down below:

```yaml
tools:
- name: github-repo-scaffolding-golang
instanceID: default
- name: repo-scaffolding
instanceID: golang-github
options:
owner: [[ githubUsername ]]
org: ""
repo: [[ repoName ]]
branch: [[ defaultBranch ]]
image_repo: [[ dockerhubUsername ]]/[[ repoName ]]
destination_repo:
owner: [[ githubUsername ]]
org: ""
repo: [[ repoName ]]
branch: [[ defaultBranch ]]
repo_type: github
vars:
ImageRepo: "[[ dockerhubUsername ]]/[[ repoName ]]"
source_repo:
org: devstream-io
repo: dtm-scaffolding-golang
repo_type: github
- name: jira-github-integ
instanceID: default
dependsOn: [ "github-repo-scaffolding-golang.default" ]
dependsOn: [ "repo-scaffolding.golang-github" ]
options:
owner: [[ githubUsername ]]
repo: [[ repoName ]]
Expand Down
23 changes: 15 additions & 8 deletions docs/core-concepts/config.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,24 @@ dockerhubUsername: exploitht

```yaml
tools:
- name: github-repo-scaffolding-golang
instanceID: default
- name: repo-scaffolding
instanceID: golang-github
options:
owner: [[ githubUsername ]]
org: ""
repo: [[ repoName ]]
branch: [[ defaultBranch ]]
image_repo: [[ dockerhubUsername ]]/[[ repoName ]]
destination_repo:
owner: [[ githubUsername ]]
org: ""
repo: [[ repoName ]]
branch: [[ defaultBranch ]]
repo_type: github
vars:
ImageRepo: "[[ dockerhubUsername ]]/[[ repoName ]]"
source_repo:
org: devstream-io
repo: dtm-scaffolding-golang
repo_type: github
- name: jira-github-integ
instanceID: default
dependsOn: [ "github-repo-scaffolding-golang.default" ]
dependsOn: [ "repo-scaffolding.golang-github" ]
options:
owner: [[ githubUsername ]]
repo: [[ repoName ]]
Expand Down
28 changes: 18 additions & 10 deletions docs/core-concepts/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,31 @@ Since `dependsOn` is a list, a tool can have multiple dependencies:
dependsOn: [ "ToolName1.ToolInstanceID1", "ToolName2.ToolInstanceID2", "..." ]
```

In the following tool file example, tool "github-repo-scaffolding-golang" (with instance id "default") will be installed before tool "githubactions-golang" (with instance id "default"):
In the following tool file example, tool "repo-scaffolding" (with instance id "golang-github") will be installed before tool "githubactions-golang" (with instance id "default"):

```yaml
tools:
- name: github-repo-scaffolding-golang
instanceID: default
- name: repo-scaffolding
instanceID: golang-github
options:
org: devstream-io
repo: dtm-e2e-go
branch: main
image_repo: dtme2etest/dtm-e2e-go
destination_repo:
owner: [[ githubUsername ]]
org: ""
repo: [[ repoName ]]
branch: [[ defaultBranch ]]
repo_type: github
vars:
ImageRepo: "[[ dockerhubUsername ]]/[[ repoName ]]"
source_repo:
org: devstream-io
repo: dtm-scaffolding-golang
repo_type: github
- name: githubactions-golang
instanceID: default
dependsOn: ["github-repo-scaffolding-golang.default"]
dependsOn: ["repo-scaffolding.golang-github"]
options:
org: ${{github-repo-scaffolding-golang.default.outputs.org}}
repo: ${{github-repo-scaffolding-golang.default.outputs.repo}}
org: ${{repo-scaffolding.golang-github.outputs.org}}
repo: ${{repo-scaffolding.golang-github.outputs.repo}}
language:
name: go
version: "1.18"
Expand Down
26 changes: 17 additions & 9 deletions docs/core-concepts/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,21 @@ Config:
```yaml
---
tools:
- name: github-repo-scaffolding-golang
- name: repo-scaffolding
instanceID: default
options:
owner: IronCore864
repo: golang-demo
branch: main
image_repo: ironcore864/golang-demo
destination_repo:
owner: IronCore864
org: ""
repo: golang-demo
branch: main
repo_type: github
vars:
ImageRepo: "ironcore864/golang-demo"
source_repo:
org: devstream-io
repo: dtm-scaffolding-golang
repo_type: github
- name: argocd
instanceID: default
options:
Expand All @@ -70,7 +78,7 @@ tools:
upgradeCRDs: true
- name: argocdapp
instanceID: default
dependsOn: [ "argocd.default", "github-repo-scaffolding-golang.default" ]
dependsOn: [ "argocd.default", "repo-scaffolding.golang-github" ]
options:
app:
name: golang-demo
Expand All @@ -81,9 +89,9 @@ tools:
source:
valuefile: values.yaml
path: helm/golang-demo
repoURL: ${{ github-repo-scaffolding-golang.default.outputs.repoURL }} # pay attention here
repoURL: ${{ repo-scaffolding.golang-github.outputs.repoURL }} # pay attention here
```

In this example:
- The "default" instance of tool `argocdapp` depends on the "default" instance of tool `github-repo-scaffolding-golang`
- The "default" instance of tool `argocdapp` has an user option "options.source.repoURL", which uses the "default" instance of tool `github-repo-scaffolding-golang`'s output "repoURL" (`${{ github-repo-scaffolding-golang.default.outputs.repoURL }}`)
- The "default" instance of tool `argocdapp` depends on the "default" instance of tool `repo-scaffolding`
- The "default" instance of tool `argocdapp` has an user option "options.source.repoURL", which uses the "default" instance of tool `repo-scaffolding`'s output "repoURL" (`${{ repo-scaffolding.golang-github.outputs.repoURL }}`)
12 changes: 6 additions & 6 deletions docs/core-concepts/stateconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ argocdDeployTimeout: 5m

```yaml
tools:
- name: github-repo-scaffolding-golang
- name: repo-scaffolding
instanceID: default
options:
owner: [[ githubUsername ]]
Expand Down Expand Up @@ -112,16 +112,16 @@ tiexin@mbp ~/work/devstream-io/devstream $ ./dtm apply
2022-05-30 17:07:59 ℹ [INFO] Apply started.
2022-05-30 17:07:59 ℹ [INFO] Using dir <.devstream> to store plugins.
2022-05-30 17:07:59 ℹ [INFO] Using s3 backend. Bucket: devstream-test-remote-state, region: ap-southeast-1, key: devstream.state.
2022-05-30 17:08:00 ℹ [INFO] Tool (github-repo-scaffolding-golang/default) found in config but doesn't exist in the state, will be created.
2022-05-30 17:08:00 ℹ [INFO] Tool (repo-scaffolding/default) found in config but doesn't exist in the state, will be created.
Continue? [y/n]
Enter a value (Default is n): y

2022-05-30 17:08:08 ℹ [INFO] Start executing the plan.
2022-05-30 17:08:08 ℹ [INFO] Changes count: 1.
2022-05-30 17:08:08 ℹ [INFO] -------------------- [ Processing progress: 1/1. ] --------------------
2022-05-30 17:08:08 ℹ [INFO] Processing: (github-repo-scaffolding-golang/default) -> Create ...
2022-05-30 17:08:08 ℹ [INFO] Processing: (repo-scaffolding/default) -> Create ...
2022-05-30 17:08:12 ℹ [INFO] The repo dtm-test-go has been created.
2022-05-30 17:08:29 ✔ [SUCCESS] Tool (github-repo-scaffolding-golang/default) Create done.
2022-05-30 17:08:29 ✔ [SUCCESS] Tool (repo-scaffolding/default) Create done.
2022-05-30 17:08:29 ℹ [INFO] -------------------- [ Processing done. ] --------------------
2022-05-30 17:08:29 ✔ [SUCCESS] All plugins applied successfully.
2022-05-30 17:08:29 ✔ [SUCCESS] Apply finished.
Expand All @@ -138,8 +138,8 @@ tiexin@mbp ~/work/devstream-io/devstream $ aws s3 cp s3://devstream-test-remote-
And if we open the downloaded file, we will see something similar to the following:

```yaml
github-repo-scaffolding-golang_default:
name: github-repo-scaffolding-golang
repo-scaffolding_default:
name: repo-scaffolding
instanceid: default
dependson: []
options:
Expand Down
2 changes: 1 addition & 1 deletion docs/development/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The definition of the GitHub Action is [here](https://github.com/devstream-io/de

We have a simple e2e test that tests the following plugins:

- `github-repo-scaffolding-golang`
- `repo-scaffolding`
- `githubactions-golang`
- `argocd`
- `argocdapp`
Expand Down
2 changes: 1 addition & 1 deletion docs/development/test.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ GitHub Action 工作流程的定义在[这里](https://github.com/devstream-io/d

目前,我们编写了针对以下插件的简单端到端测试:

- `github-repo-scaffolding-golang`
- `repo-scaffolding`
- `githubactions-golang`
- `argocd`
- `argocdapp`
Expand Down
Loading