The dependencies of these plugins are(a -> b means for a depends on b):
jira-github->github-repo-scaffolding-golanggithubactions-golang->github-repo-scaffolding-golangargocdapp->argocd
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.
We should use the dependency according to the actual usage situation.
Download the appropriate dtm version for your platform from DevStream Releases.
Remember to rename the binary file to
dtmso that it's easier to use. For example:mv dtm-darwin-arm64 dtm.
Once downloaded, you can run the binary from anywhere. Ideally, you want to put it in a place that is in your PATH (e.g.,
/usr/local/bin).
Copy the examples/gitops.yaml to your working directory:
cp examples/gitops.yaml config-gitops.yamlThen modify the file accordingly. The variables you need to care about are the following:
- YOUR_GITHUB_USERNAME
- YOUR_REPO_NAME
- YOUR_DOCKERHUB_USERNAME
- YOUR_DOCKERHUB_IMAGE_REPO_NAME
- JIRA_ID
- JIRA_USER_EMAIL
- JIRA_PROJECT_KEY
For me I can set these variables like:
| Variable | Example | Note |
|---|---|---|
| YOUR_GITHUB_USERNAME | daniel-hutao | It should be case-sensitive here; strictly use your GitHub username |
| YOUR_REPO_NAME | go-webapp | As long as it doesn't exist in your GitHub account and the name is legal |
| YOUR_DOCKERHUB_USERNAME | exploitht | It should be case-sensitive here; strictly use your DockerHub username |
| YOUR_DOCKERHUB_IMAGE_REPO_NAME | go-webapp | It is recommended that you use the same name as the project, please make sure that there is no project with the same name in your DockerHub account |
| JIRA_ID | merico | This is a domain name prefix like merico in https://merico.atlassian.net |
| JIRA_PROJECT_KEY | DT | A descriptive prefix for your project’s issue keys to recognize work from this project |
| JIRA_USER_EMAIL | tao.hu@merico.dev | The email you use to log in to Jira |
These plugins require some environment variables to work, so let's set them:
export GITHUB_TOKEN="YOUR_GITHUB_TOKEN_HERE"
export JIRA_API_TOKEN="YOUR_JIRA_API_TOKEN_HERE"If you don't know how to create these two tokens, check out:
Run:
dtm init -f config.yamlRun:
dtm apply -f config.yamland confirm to continue, then you should see similar output to:
...
2022-03-11 13:36:11 ✔ [SUCCESS] All plugins applied successfully.
2022-03-11 13:36:11 ✔ [SUCCESS] Apply finished.
// TODO(daniel-hutao): I'll add the docs here later.
Run:
dtm destroyand you should see similar output:
2022-03-11 13:39:11 ✔ [SUCCESS] All plugins destroyed successfully.
2022-03-11 13:39:11 ✔ [SUCCESS] Destroy finished.
---
maxdepth: 1
---