Skip to content

Commit

Permalink
Merge pull request #467 from devstream-io/release-0.5
Browse files Browse the repository at this point in the history
Merge release-0.5 branch to main branch
  • Loading branch information
lfbdev authored May 11, 2022
2 parents 7e1c9a6 + 9d21f7e commit 5fdaeb9
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 108 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ If you want to get a quick start, follow our [quick start](./docs/quickstart_en.

## Configuration

This is an example of DevStream config: [examples/quickstart.yaml](./examples/quickstart.yaml).
This is an example of DevStream config: [examples/tools-quickstart.yaml](./examples/tools-quickstart.yaml).

Remember to open this configuration file, modify all FULL_UPPER_CASE_STRINGS (like YOUR_GITHUB_USERNAME, for example) in it to your own.

Expand Down
2 changes: 1 addition & 1 deletion build/package/auto-release-darwin-arm64.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/bash -e
set -o nounset

tag=v0.4.0
tag=v0.5.0

user=devstream-io
repo=devstream
Expand Down
7 changes: 4 additions & 3 deletions docs/quickstart_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ Download the appropriate `dtm` version for your platform from [DevStream Release
## 2 Prepare a Config File

Copy the [examples/quickstart.yaml](../examples/quickstart.yaml) to your working directory and rename it to `config.yaml`:
Copy the [examples/quickstart.yaml](../examples/quickstart.yaml) and [examples/tools-quickstart.yaml](../examples/tools-quickstart.yaml) to your working directory and rename `quickstart.yaml` to `config.yaml`:

```shell
cp examples/quickstart.yaml config.yaml
cp examples/tools-quickstart.yaml tools-quickstart.yaml
```

Then modify the file accordingly.

For example, my GitHub username is "IronCore864", and my Dockerhub username is "ironcore864", then I can run:

```shell
sed -i.bak "s/YOUR_GITHUB_USERNAME_CASE_SENSITIVE/IronCore864/g" config.yaml
sed -i.bak "s/YOUR_GITHUB_USERNAME_CASE_SENSITIVE/IronCore864/g" tools-quickstart.yaml

sed -i.bak "s/YOUR_DOCKER_USERNAME/ironcore864/g" config.yaml
sed -i.bak "s/YOUR_DOCKER_USERNAME/ironcore864/g" tools-quickstart.yaml
```

> This config file uses two plugins, one will create a GitHub repository and bootstrap it into a Golang web app, and the other will create GitHub Actions workflow for it.
Expand Down
7 changes: 4 additions & 3 deletions docs/quickstart_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@
## 2 准备一个配置文件

[examples/quickstart.yaml](../examples/quickstart.yaml) 文件拷贝到你到工作目录下,然后重命名成 `config.yaml`
[examples/quickstart.yaml](../examples/quickstart.yaml) [examples/tools-quickstart.yaml](../examples/tools-quickstart.yaml) 文件拷贝到你到工作目录下,然后重命名`quickstart.yaml` `config.yaml`

```shell
cp examples/quickstart.yaml config.yaml
cp examples/tools-quickstart.yaml tools-quickstart.yaml
```

然后相应的修改配置文件中的内容。

比如我的 GitHub 用户名是 "IronCore864", 然后我的 Dockerhub 用户名是 "ironcore864",这样我就可以运行:

```shell
sed -i.bak "s/YOUR_GITHUB_USERNAME_CASE_SENSITIVE/IronCore864/g" config.yaml
sed -i.bak "s/YOUR_GITHUB_USERNAME_CASE_SENSITIVE/IronCore864/g" tools-quickstart.yaml

sed -i.bak "s/YOUR_DOCKER_USERNAME/ironcore864/g" config.yaml
sed -i.bak "s/YOUR_DOCKER_USERNAME/ironcore864/g" tools-quickstart.yaml
```

> 这个配置文件会使用两个插件,一个用来创建 GitHub 项目,而且初始化成一个 Golang 的 web 应用结构。接着另外一个插件会给这个项目创建对应的 GitHub Actions 工作流。
Expand Down
84 changes: 10 additions & 74 deletions examples/gitops.yaml
Original file line number Diff line number Diff line change
@@ -1,74 +1,10 @@
tools:
- name: github-repo-scaffolding-golang
instanceID: default
options:
owner: [[ githubUsername ]]
org: ""
repo: [[ repoName ]]
branch: [[ defaultBranch ]]
image_repo: [[ dockerhubUsername ]]/[[ repoName ]]
- name: jira-github-integ
instanceID: default
dependsOn: [ "github-repo-scaffolding-golang.default" ]
options:
owner: [[ githubUsername ]]
repo: [[ repoName ]]
jiraBaseUrl: https://[[ jiraID ]].atlassian.net
jiraUserEmail: [[ jiraUserEmail ]]
jiraProjectKey: [[ jiraProjectKey ]]
branch: main
- name: githubactions-golang
instanceID: default
dependsOn: [ "github-repo-scaffolding-golang.default" ]
options:
owner: ${{github-repo-scaffolding-golang.default.outputs.owner}}
org: ""
repo: ${{github-repo-scaffolding-golang.default.outputs.repo}}
language:
name: go
version: "1.17"
branch: [[ defaultBranch ]]
build:
enable: True
command: "go build ./..."
test:
enable: True
command: "go test ./..."
coverage:
enable: True
profile: "-race -covermode=atomic"
output: "coverage.out"
docker:
enable: True
registry:
type: dockerhub
username: [[ dockerhubUsername ]]
repository: ${{github-repo-scaffolding-golang.default.outputs.repo}}
- name: argocd
instanceID: default
options:
create_namespace: true
repo:
name: argo
url: https://argoproj.github.io/argo-helm
chart:
chart_name: argo/argo-cd
release_name: argocd
namespace: [[ argocdNameSpace ]]
wait: true
timeout: [[ argocdDeployTimeout ]]
upgradeCRDs: true
- name: argocdapp
instanceID: default
dependsOn: ["argocd.default", "github-repo-scaffolding-golang.default"]
options:
app:
name: ${{github-repo-scaffolding-golang.default.outputs.repo}}
namespace: [[ argocdNameSpace ]]
destination:
server: https://kubernetes.default.svc
namespace: default
source:
valuefile: values.yaml
path: helm/${{github-repo-scaffolding-golang.default.outputs.repo}}
repoURL: ${{github-repo-scaffolding-golang.default.outputs.repoURL}}
# var file is the ...
varFile: variables-gitops.yaml # defaults to ./variables.yaml
# tool file is the ...
toolFile: tools-gitops.yaml

# state ...
state:
backend: local
options:
stateFile: devstream.state
32 changes: 6 additions & 26 deletions examples/quickstart.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,7 @@
---
tools:
- name: github-repo-scaffolding-golang
instanceID: default
# tool file is the ...
toolFile: tools-quickstart.yaml
# state ...
state:
backend: local
options:
owner: YOUR_GITHUB_USERNAME_CASE_SENSITIVE
repo: go-webapp-devstream-demo
branch: main
image_repo: YOUR_DOCKER_USERNAME/go-webapp-devstream-demo
- name: githubactions-golang
instanceID: default
dependsOn: ["github-repo-scaffolding-golang.default"]
options:
owner: YOUR_GITHUB_USERNAME_CASE_SENSITIVE
repo: go-webapp-devstream-demo
language:
name: go
version: "1.17"
branch: main
build:
enable: True
test:
enable: True
coverage:
enable: True
docker:
enable: False
stateFile: devstream.state
74 changes: 74 additions & 0 deletions examples/tools-gitops.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
tools:
- name: github-repo-scaffolding-golang
instanceID: default
options:
owner: [[ githubUsername ]]
org: ""
repo: [[ repoName ]]
branch: [[ defaultBranch ]]
image_repo: [[ dockerhubUsername ]]/[[ repoName ]]
- name: jira-github-integ
instanceID: default
dependsOn: [ "github-repo-scaffolding-golang.default" ]
options:
owner: [[ githubUsername ]]
repo: [[ repoName ]]
jiraBaseUrl: https://[[ jiraID ]].atlassian.net
jiraUserEmail: [[ jiraUserEmail ]]
jiraProjectKey: [[ jiraProjectKey ]]
branch: main
- name: githubactions-golang
instanceID: default
dependsOn: [ "github-repo-scaffolding-golang.default" ]
options:
owner: ${{github-repo-scaffolding-golang.default.outputs.owner}}
org: ""
repo: ${{github-repo-scaffolding-golang.default.outputs.repo}}
language:
name: go
version: "1.17"
branch: [[ defaultBranch ]]
build:
enable: True
command: "go build ./..."
test:
enable: True
command: "go test ./..."
coverage:
enable: True
profile: "-race -covermode=atomic"
output: "coverage.out"
docker:
enable: True
registry:
type: dockerhub
username: [[ dockerhubUsername ]]
repository: ${{github-repo-scaffolding-golang.default.outputs.repo}}
- name: argocd
instanceID: default
options:
create_namespace: true
repo:
name: argo
url: https://argoproj.github.io/argo-helm
chart:
chart_name: argo/argo-cd
release_name: argocd
namespace: [[ argocdNameSpace ]]
wait: true
timeout: [[ argocdDeployTimeout ]]
upgradeCRDs: true
- name: argocdapp
instanceID: default
dependsOn: ["argocd.default", "github-repo-scaffolding-golang.default"]
options:
app:
name: ${{github-repo-scaffolding-golang.default.outputs.repo}}
namespace: [[ argocdNameSpace ]]
destination:
server: https://kubernetes.default.svc
namespace: default
source:
valuefile: values.yaml
path: helm/${{github-repo-scaffolding-golang.default.outputs.repo}}
repoURL: ${{github-repo-scaffolding-golang.default.outputs.repoURL}}
27 changes: 27 additions & 0 deletions examples/tools-quickstart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
tools:
- name: github-repo-scaffolding-golang
instanceID: default
options:
owner: YOUR_GITHUB_USERNAME_CASE_SENSITIVE
repo: go-webapp-devstream-demo
branch: main
image_repo: YOUR_DOCKER_USERNAME/go-webapp-devstream-demo
- name: githubactions-golang
instanceID: default
dependsOn: ["github-repo-scaffolding-golang.default"]
options:
owner: YOUR_GITHUB_USERNAME_CASE_SENSITIVE
repo: go-webapp-devstream-demo
language:
name: go
version: "1.17"
branch: main
build:
enable: True
test:
enable: True
coverage:
enable: True
docker:
enable: False
File renamed without changes.

0 comments on commit 5fdaeb9

Please sign in to comment.