You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Watch the demo](./index.md) first if you prefer to see DevStream in action.
4
-
5
-
> Note: currently, we only have Linux and macOS versions of DevStream. Windows support will come later.
6
-
7
3
In this quickstart, we will do the following automatically with DevStream:
8
4
9
-
- create a GitHub repository with Golang web app scaffolding;
10
-
- set up GitHub Actions workflow for the Golang app we created, which contains test and build stages for our Go web app.
5
+
- create a GitHub repository with automatically generated code for a web application written in Golang with the [gin](https://github.com/gin-gonic/gin) framework;
6
+
- set up GitHub Actions workflow for the app created in the previous step.
7
+
8
+
---
11
9
12
10
## 1 Download
13
11
@@ -16,12 +14,18 @@ In your working directory, run:
16
14
```shell
17
15
sh -c "$(curl -fsSL https://raw.githubusercontent.com/devstream-io/devstream/main/hack/install/download.sh)"
18
16
```
19
-
20
-
This will download the corresponding `dtm` binary to your working directory according to your OS and chip architecture, and grant the binary execution permission.
21
-
17
+
> Note: the command above does the following:
18
+
>
19
+
> - find out your OS and chip architecture
20
+
> - find the latest version of the `dtm` binary
21
+
> - download the correct `dtm` according to OS/architecture
22
+
> - grant the binary execution permission.
23
+
>
22
24
> Optional: you can then move `dtm` to a place which is in your PATH. For example: `mv dtm /usr/local/bin/`.
25
+
>
26
+
> For more ways to install `dtm`, see [install dtm](./install.md).
23
27
24
-
_For more details on how to install, see [install dtm](./install.md)._
28
+
---
25
29
26
30
## 2 Configuration
27
31
@@ -31,129 +35,105 @@ Run the following command to generate the template configuration file `config.ya
31
35
./dtm show config -t quickstart > config.yaml
32
36
```
33
37
34
-
As aforementioned, we will handle GitHub repo scaffolding and CI workflows in GitHub Actions, so, we will need the following environment variables (env vars) to be set:
35
-
36
-
- GITHUB_USER
37
-
- GITHUB_TOKEN
38
-
- DOCKERHUB_USERNAME
39
-
40
-
Run the following commands to set values for these env vars (replace values within the double quotes):
38
+
Then set the following environment variables by running (replace values within the double quotes):
> Tip: Go to [Personal Access Token](https://github.com/settings/tokens/new) to generate a new `GITHUB_TOKEN` for `dtm`.
46
+
> Tip: go to [Personal Access Token](https://github.com/settings/tokens/new) to generate a new `GITHUB_TOKEN` for `dtm`.
49
47
>
50
-
> For "Quick Start", we only need `repo`,`workflow`,`delete_repo`scopes. However, we recommend that you check all and future plugins may require more scopes.
48
+
> For "Quick Start", we only need `repo`,`workflow`,`delete_repo`permissions.
51
49
52
50
Then we run the following commands to update our config file with those env vars:
53
51
54
-
For **macOS** or **FreeBSD** based systems:
52
+
Then, if you are using **macOS** or **FreeBSD** based systems\, run:
55
53
56
54
```shell
57
-
sed -i.bak "s@YOUR_GITHUB_USERNAME_CASE_SENSITIVE@${GITHUB_USER}@g"quickstart.yaml
58
-
sed -i.bak "s@YOUR_DOCKER_USERNAME@${DOCKERHUB_USERNAME}@g"quickstart.yaml
55
+
sed -i.bak "s@YOUR_GITHUB_USERNAME_CASE_SENSITIVE@${GITHUB_USER}@g"config.yaml
56
+
sed -i.bak "s@YOUR_DOCKER_USERNAME@${DOCKERHUB_USERNAME}@g"config.yaml
59
57
```
60
58
61
-
For **GNU** Linux users:
59
+
> For **GNU** Linux users, run:
60
+
>
61
+
> ```shell
62
+
> sed -i "s@YOUR_GITHUB_USERNAME_CASE_SENSITIVE@${GITHUB_USER}@g" config.yaml
63
+
> sed -i "s@YOUR_DOCKER_USERNAME@${DOCKERHUB_USERNAME}@g" config.yaml
64
+
>```
62
65
63
-
```shell
64
-
sed -i "s@YOUR_GITHUB_USERNAME_CASE_SENSITIVE@${GITHUB_USER}@g" quickstart.yaml
65
-
sed -i "s@YOUR_DOCKER_USERNAME@${DOCKERHUB_USERNAME}@g" quickstart.yaml
66
-
```
66
+
---
67
67
68
68
## 3 Init
69
69
70
70
Run:
71
71
72
72
```shell
73
-
./dtm init -f quickstart.yaml
73
+
./dtm init
74
74
```
75
75
76
-
and you should see similar output to the following:
77
-
76
+
> You should see some output similar to the following:
78
77
```
79
-
2022-06-30 11:21:48 ℹ [INFO] Got Backend from config: local
80
-
2022-06-30 11:21:48 ℹ [INFO] Using dir <.devstream> to store plugins.
0 commit comments