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
Copy file name to clipboardExpand all lines: articles/devops-project/azure-devops-project-nodejs.md
+12-13Lines changed: 12 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,17 +11,16 @@ editor: ''
11
11
ms.assetid:
12
12
ms.workload: web
13
13
ms.tgt_pltfrm: na
14
-
ms.topic: tutorial
14
+
ms.topic: quickstart
15
15
ms.date: 02/24/2020
16
16
ms.author: arob98
17
17
ms.custom: mvc
18
18
monikerRange: 'vsts'
19
19
---
20
20
21
21
22
-
# Tutorial: Create a CI/CD pipeline in Azure Pipelines for Node.js with Azure DevOps Projects
23
-
In this tutorial, you create a NodeJS progressive web app (PWA) using [GatsbyJS](https://www.gatsbyjs.org/) and the simplified Azure DevOps project creation experience. When finished you have a continuous integration (CI) and continuous delivery (CD) pipeline for your PWA in Azure Pipelines. Azure DevOps projects set up everything you need for developing, deploying, and monitoring and are a great way to kick-off a new project.
24
-
22
+
# Quickstart: Create a CI/CD pipeline in Azure Pipelines for Node.js with Azure DevOps Projects
23
+
In this quickstart, you create a NodeJS progressive web app (PWA) using [GatsbyJS](https://www.gatsbyjs.org/) and the simplified Azure DevOps project creation experience. When finished you have a continuous integration (CI) and continuous delivery (CD) pipeline for your PWA in Azure Pipelines. Azure DevOps projects set up everything you need for developing, deploying, and monitoring and are a great way to kick-off a new project.
25
24
26
25
## Prerequisites
27
26
@@ -68,7 +67,7 @@ DevOps Projects creates a CI/CD pipeline in Azure Pipelines. You can create a ne
68
67
69
68

70
69
71
-
2. You are directed to a dashboard that provides visibility into your project homepage, code repository, the CI/CD pipeline, and a link to your running app. Select the **Project Homepage** to view your application in **Azure DevOps** and, in another browser tab, select the **Application Endpoint** to view the live sample app. We change this sample later to use GatsbyJS generated PWA.
70
+
2. You are directed to a dashboard that provides visibility into your project homepage, code repository, the CI/CD pipeline, and a link to your running app. Select the **Project Homepage** to view your application in **Azure DevOps** and, in another browser tab, select the **Application Endpoint** to view the live sample app. We change this sample later to use GatsbyJS generated PWA.
7. In your favorite editor, open the Dockerfile and change the first line from `FROM node:8` to `FROM node:12`. This change ensures that your container is using Node.js version 12.x instead of version 8.x. GatsbyJS requires more modern versions of Node.js.
125
124
126
-
8. Next, open the package.json file in the Application folder and edit the [scripts field](https://docs.npmjs.com/files/package.json#scripts) to ensure that your development and production servers listen on all available network interfaces (for example, 0.0.0.0) and port 80. Without these settings the container app service is unable to route traffic to your Node.js app running inside your container. The `scripts` field should resemble what is below. Specifically, you want to change the `develop`, `serve`, and `start` targets from their defaults.
125
+
8. Next, open the package.json file in the Application folder and edit the [scripts field](https://docs.npmjs.com/files/package.json#scripts) to ensure that your development and production servers listen on all available network interfaces (for example, 0.0.0.0) and port 80. Without these settings the container app service is unable to route traffic to your Node.js app running inside your container. The `scripts` field should resemble what is below. Specifically, you want to change the `develop`, `serve`, and `start` targets from their defaults.
127
126
```json
128
127
"scripts": {
129
128
"build": "gatsby build",
@@ -141,14 +140,14 @@ mv Dockerfile Application
141
140
1. Before you commit the code in the previous section,make some changes to your build and release pipelines. Edit your 'Build Pipeline' and update the Node task to use Node.js version 12.x. Set the **Task vervion** field to 1.x and the **Version** field to 12.x.
142
141

143
142
144
-
2. In this tutorial, we are not creating unit tests and we are disabling those steps in our build pipeline. When you write tests you can re-enable these steps. Right-click to select the tasks labeled **Install test dependencies** and **Run unit tests** and disable them.
143
+
2. In this quickstart, we are not creating unit tests and we are disabling those steps in our build pipeline. When you write tests you can re-enable these steps. Right-click to select the tasks labeled **Install test dependencies** and **Run unit tests** and disable them.
@@ -164,7 +163,7 @@ You should now see a build in progress. The changes you just made are automatica
164
163
165
164
## Commit your changes and examine the Azure CI/CD pipeline
166
165
167
-
In the previous two steps, you added a Gatsby generated PWA to your git repo and edited your pipelines to build and deploy the code. We can commit the code an watch it progress through the build and release pipeline.
166
+
In the previous two steps, you added a Gatsby generated PWA to your git repo and edited your pipelines to build and deploy the code. We can commit the code an watch it progress through the build and release pipeline.
168
167
169
168
1. From the root of your project's git repo in a terminal, run the following commands to push your code to your Azure DevOps Project:
170
169
```powershell
@@ -173,22 +172,22 @@ git commit -m "My first Gatsby PWA"
173
172
git push
174
173
```
175
174
176
-
2. A build is started as soon as `git push` completes. You can easily follow the progress from the **Azure DevOps Dashboard**.
175
+
2. A build is started as soon as `git push` completes. You can follow the progress from the **Azure DevOps Dashboard**.
177
176
178
177

179
178
180
-
3. After a few minutes, your build and release pipelines should finish and your PWA should be deployed to a container. Click the **Application endpoint** link from the dashboard above and you should see a Gatsby starter project for blogs.
179
+
3. After a few minutes, your build and release pipelines should finish and your PWA should be deployed to a container. Click the **Application endpoint** link from the dashboard above and you should see a Gatsby starter project for blogs.
181
180
182
181
183
182
184
183
## Clean up resources
185
184
186
-
You can delete Azure App Service and other related resources that you created when you don't need them anymore. Use the **Delete** functionality on the DevOps Projects dashboard.
185
+
You can delete Azure App Service and other related resources that you created when you don't need the resources anymore. Use the **Delete** functionality on the DevOps Projects dashboard.
187
186
188
187
189
188
## Next steps
190
189
191
-
When you configured your CI/CD process, build and release pipelines were automatically created. You can change these build and release pipelines to meet the needs of your team. To learn more about the CI/CD pipeline, see:
190
+
When you configure your CI/CD process, build and release pipelines are automatically created. You can change these build and release pipelines to meet the needs of your team. To learn more about the CI/CD pipeline, see:
192
191
193
192
> [!div class="nextstepaction"]
194
193
> [Customize CD process](https://docs.microsoft.com/azure/devops/pipelines/release/define-multistage-release-process?view=vsts)
0 commit comments