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
{{ message }}
This repository was archived by the owner on Apr 19, 2021. It is now read-only.
Depending on the context, your dev environment will be initialized differently.
42
45
@@ -60,7 +63,8 @@ There is much more you can do to make sure every team member gets a ready-to-cod
60
63
Gitpod’s [prebuilt workspaces](/docs/prebuilds/) are key to providing ephemeral, ready-to-code dev environments for your branches and projects. You can configure Gitpod to run your project's build asynchronously every time someone pushes new commits or branches to your repository. So when a developer wants to start coding, she can start immediately, because everything is already prepared.
61
64
62
65
Enabling prebuilds on your Bitbucket project is done by configuring a Webhook. This can be done automatically: Just trigger the first prebuild on your project manually, and Gitpod will take it from there. To do that, use the prefix `https://gitpod.io/#prebuild/`, as in
This post is all about how to build your webhook for your Google Assistant action and host it temporarily on Gitpod and test your code.
11
11
12
12
## Prerequisites
13
-
* Node JS
14
-
* Express JS
15
-
* Basics on how to use Github
13
+
14
+
- Node JS
15
+
- Express JS
16
+
- Basics on how to use Github
16
17
17
18
If you have these in place, Let's get started.
18
19
19
20
## What is Gitpod?
21
+
20
22
First of all I would like to start this section by saying, I ❤ Gitpod. Gitpod is an online IDE for Github. Gitpod provides you with a fully working development environment, including a VS Code-powered IDE and a cloud-based Linux container configured specifically for the project at hand. Just prefix your Github repo URL with "https://gitpod.io/#", So that the final link looks something like this "https://gitpod.io/#https://github.com/<username>/<repo-name>" or you can also use the Gitpod [browser extension](https://chrome.google.com/webstore/detail/gitpod-online-ide/dodmmooeoklaejobgleioelladacbeki?hl=en) to add the Gitpod button to Github page.
I have created a Github repo which will help you get started without any hassle. The repo is basically a boilerplate to get started with building your webhook. The code is written in Node JS, So it would be easier for you to build on top of it if you are already familiar with Node JS. We will be using the [action-on-google](https://www.npmjs.com/package/actions-on-google) Node JS library (This client library makes it easy to create Actions for the Google Assistant and supports Dialogflow, Actions SDK, and Smart Home fulfillment.).
26
29
27
30
### Create your Action
28
-
* Head over to https://console.actions.google.com/ and click on New Project.
31
+
32
+
- Head over to https://console.actions.google.com/ and click on New Project.
* Enter your project name and click on create project.
36
+
- Enter your project name and click on create project.
33
37
34
38

35
39
36
-
* Now select a category for your Action.
37
-
* Now under the Develop menu, give your action a name.
38
-
* Now head over to actions menu in Develop tab and click on **Add your first action**.
40
+
- Now select a category for your Action.
41
+
- Now under the Develop menu, give your action a name.
42
+
- Now head over to actions menu in Develop tab and click on **Add your first action**.
39
43
40
44

41
45
42
-
* In the next section choose **custom intent** and click on **build**. Doing this will redirect you to the **Dialogflow console** and it should look something like this.
46
+
- In the next section choose **custom intent** and click on **build**. Doing this will redirect you to the **Dialogflow console** and it should look something like this.
* Click on create to **create** your agent on Dialogflow.
47
-
* Once your agent is ready, you will already have two default Intents (Default Fallback Intent and Default Welcome Intent) in place and these two do pretty good at their job.
48
-
* Now it's time to create a new intent and enable fulfillments for that intent so that we can serve responses from the webhook that we will be building in the next section.
49
-
* Click on create a new intent, give it a name and training phrase (training phrase will be used to invoke the intent). Now that your intent is almost ready scroll down and under fulfillments **enable webhook call** for the new Default welcome intent and the new intent you just created.
50
+
- Click on create to **create** your agent on Dialogflow.
51
+
- Once your agent is ready, you will already have two default Intents (Default Fallback Intent and Default Welcome Intent) in place and these two do pretty good at their job.
52
+
- Now it's time to create a new intent and enable fulfillments for that intent so that we can serve responses from the webhook that we will be building in the next section.
53
+
- Click on create a new intent, give it a name and training phrase (training phrase will be used to invoke the intent). Now that your intent is almost ready scroll down and under fulfillments **enable webhook call** for the new Default welcome intent and the new intent you just created.
50
54
51
55
### Understanding .gitpod.yml
52
56
@@ -69,13 +73,15 @@ When starting or restarting a workspace you typically want to run certain tasks.
69
73
Gitpod allows you to configure start tasks in the .gitpod.yml file.
70
74
71
75
For instance, the start script for this repository is defined as:
76
+
72
77
```
73
78
tasks:
74
79
- init: npm install
75
80
command: npm start
76
81
```
77
82
78
83
You can have multiple tasks, which are opened on separated terminals.
84
+
79
85
```
80
86
tasks:
81
87
- init: npm install
@@ -84,32 +90,33 @@ tasks:
84
90
```
85
91
86
92
#### `init` command
93
+
87
94
The init property can be used to specify shell commands that should only be executed after a workspace was freshly cloned and needs to be initialized somehow. Such tasks are usually builds or downloading dependencies. Anything you only want to do once but not when you restart a workspace or start a snapshot.
88
95
89
96
In our case the `init` command is
97
+
90
98
```
91
99
tasks:
92
100
- init: npm install
93
101
```
94
102
95
-
96
103
### Get the Gitpod setup running
97
-
* Fork my [repo (dialogflow-webhook-boilerplate-nodejs)](https://github.com/anudeepreddy/dialogflow-webhook-boilerplate-nodejs)**or** just click on the run in gitpod button in my repo. (If you do this you have to fork it from the workspace so that you can commit your own changes to your repo).
98
-
* Now you can just prefix your repo url with "https://gitpod.io/#". This should take you to Gitpod and start your workspace. The workspace take a little while to start.
99
-
* Once the workspace is running you should see something like this.
104
+
105
+
- Fork my [repo (dialogflow-webhook-boilerplate-nodejs)](https://github.com/anudeepreddy/dialogflow-webhook-boilerplate-nodejs)**or** just click on the run in gitpod button in my repo. (If you do this you have to fork it from the workspace so that you can commit your own changes to your repo).
106
+
- Now you can just prefix your repo url with "https://gitpod.io/#". This should take you to Gitpod and start your workspace. The workspace take a little while to start.
107
+
- Once the workspace is running you should see something like this.
* If you notice the Node app is already running in the first terminal. This is automated by a Gitpod configuration file. And the webhook URL is printed on to the second terminal. All the dependencies that are required are also installed while creating the workspace.
111
+
- If you notice the Node app is already running in the first terminal. This is automated by a Gitpod configuration file. And the webhook URL is printed on to the second terminal. All the dependencies that are required are also installed while creating the workspace.
104
112
105
113

106
114
107
-
* Now that the webhook is running and i presume that you already have your agent on Dialogflow (If not create an agent), Next thing you need to do is to copy the webhook URL from the terminal and paste it in the Fulfillments section in the Dialogflow Console.
115
+
- Now that the webhook is running and i presume that you already have your agent on Dialogflow (If not create an agent), Next thing you need to do is to copy the webhook URL from the terminal and paste it in the Fulfillments section in the Dialogflow Console.
* Open the index.js file which contains the code for the webhook.
119
+
- Open the index.js file which contains the code for the webhook.
113
120
114
121

115
122
@@ -122,25 +129,26 @@ We will be adding the following code to display a card when the new intent is in
122
129
123
130
Replace the URL's and other contents in the code and stop the previous instance of the app from running and start it again after you have made changes to the code by running `npm start` in the terminal.
124
131
125
-
* To test your action you can click on **See how it works in Google Assistant** in the Dialogflow console.
132
+
- To test your action you can click on **See how it works in Google Assistant** in the Dialogflow console.
126
133
127
134

128
135
129
-
* Invoking the intent would give you response similar to this.
136
+
- Invoking the intent would give you response similar to this.
130
137
131
138

132
139
133
140
Refer to the links below to add your own functionalities.
134
141
135
142
## Links to Refer
136
-
* If you would like to learn more about the actions-on-google library, you can find it here - https://www.npmjs.com/package/actions-on-google
137
-
* Go through these examples - https://developers.google.com/actions/samples/github
138
-
* Rich responses example - https://github.com/actions-on-google/dialogflow-conversation-components-nodejs
143
+
144
+
- If you would like to learn more about the actions-on-google library, you can find it here - https://www.npmjs.com/package/actions-on-google
145
+
- Go through these examples - https://developers.google.com/actions/samples/github
146
+
- Rich responses example - https://github.com/actions-on-google/dialogflow-conversation-components-nodejs
139
147
140
148
## Conclusion
141
149
142
-
Gitpod can make your life much simpler by automating your development setup just by adding a simple configuration file to your repo. You can refer to the Gitpod [Docs](https://www.gitpod.io/docs/) to learn more about the platform. Gitpod lets you work with unlimited workspace but with 100hrs/month runtime. It also provides Personal and unlimited plans as well. If you are a student then you can claim Gitpod Unlimited plan for just $9.
150
+
Gitpod can make your life much simpler by automating your development setup just by adding a simple configuration file to your repo. You can refer to the Gitpod [Docs](https://www.gitpod.io/docs/) to learn more about the platform. Gitpod lets you work with unlimited workspace but with 100hrs/month runtime. It also provides Personal and unlimited plans as well. If you are a student then you can claim Gitpod Unlimited plan for just \$9.
143
151
144
152

Copy file name to clipboardExpand all lines: src/blog/continuous-dev-environment-in-devops.md
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ Getting our dev environments into a ready-to-code state is usually still done ma
18
18
**Continuous dev environments** are a crucial part in a fully optimized DevOps toolchain, that allow to instantaneously spin up a ready-to-code development environment from any git state. Continuous dev environments reduce friction in onboarding and task switching and improves reproducibility across the project.
19
19
20
20
## Automated Dev Environments
21
+
21
22
Automating dev environments is not new and usually focusses on the initial setup, but that doesn't quite cut it. Of course, we all have felt the pain of being on-boarded in a new project, spending the first week figuring out what tools to install and how to configure them correctly. Manually setting up a dev environment is a waste of energy. Surprising that we still do such things, given that we developers are usually busy automating everything else in the world.
22
23
23
24

@@ -67,15 +68,17 @@ The Theia IDE open-source project is fully configured with continuously prebuilt
67
68

68
69
69
70
## But my environment is different than those from my teammates!
71
+
70
72
Yes, of course, there are personal preferences like themes, keybindings, or even one or the other tool. Some developers heavily use command-line tools and have very advanced configurations. Others use particular VS Code extensions that improve their workflow significantly.
> Why don't we share all that goodness within the team?
75
77
76
-
While [Gitpod](/) lets you have user-specific settings, we see an opportunity in sharing the wisdom within the team to ***build a perfect, friction-free setup for everyone***. This way, you can share your impressive terminal skills and configuration with your team, and you might learn a new thing or two as well.
78
+
While [Gitpod](/) lets you have user-specific settings, we see an opportunity in sharing the wisdom within the team to **_build a perfect, friction-free setup for everyone_**. This way, you can share your impressive terminal skills and configuration with your team, and you might learn a new thing or two as well.
77
79
78
80
## The missing piece in DevOps
81
+
79
82
I'm pretty sure, automated ready-to-code dev environments will become mainstream. The advantages and implications are just too good to be ignored. Everyone who has understood and experienced the benefits of a proper DevOps toolchain should understand how providing dev environments on-demand completes that experience. Ironing out that last area of non-reproducible and very annoying yak-shaving should be high on our todo list as it will improve developer productivity drastically.
80
83
81
84
Gitpod is available [to open-source projects for free and affordable for commercial projects](/pricing), through the Saas offering (Gitpod.io). [Gitpod Enterprise](/pricing#enterprise) will soon be released, allows self-hosting Gitpod on any Kubernetes cluster, and integrates with GitHub Enterprise, GitLab, Jenkins, JIRA and other tools in your DevOps toolchain.
0 commit comments