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
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,21 +6,21 @@ ms.technology: devops-cicd
6
6
services: vsts
7
7
documentationcenter: vs-devops-build
8
8
author: arob98
9
-
manager: arob98
9
+
manager: angrobe
10
10
editor: ''
11
11
ms.assetid:
12
12
ms.workload: web
13
13
ms.tgt_pltfrm: na
14
14
ms.topic: quickstart
15
15
ms.date: 02/24/2020
16
-
ms.author: arob98
16
+
ms.author: angrobe
17
17
ms.custom: mvc
18
18
monikerRange: 'vsts'
19
19
---
20
20
21
21
22
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.
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 sets up what you need for developing, deploying, and monitoring.
24
24
25
25
## Prerequisites
26
26
@@ -122,7 +122,7 @@ mv Dockerfile Application
122
122
123
123
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.
124
124
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.
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.
126
126
```json
127
127
"scripts": {
128
128
"build": "gatsby build",
@@ -137,10 +137,10 @@ mv Dockerfile Application
137
137
138
138
## Edit Your CI/CD pipelines
139
139
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.
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 version** field to 1.x and the **Version** field to 12.x.
141
141

142
142
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.
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.
1. In your browser, go to the DevOps Projects dashboard.
162
-
You should now see a build in progress. The changes you just made are automatically built and deployed via a CI/CD pipeline.
162
+
You should now see a build in progress. The changes you made are automatically built and deployed through a CI/CD pipeline.
163
163
164
164
## Commit your changes and examine the Azure CI/CD pipeline
165
165
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.
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, and watch it progress through the build and release pipeline.
167
167
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:
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:
169
169
```powershell
170
170
git add .
171
171
git commit -m "My first Gatsby PWA"
@@ -174,7 +174,7 @@ git push
174
174
175
175
2. A build is started as soon as `git push` completes. You can follow the progress from the **Azure DevOps Dashboard**.
176
176
177
-

177
+

178
178
179
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.
0 commit comments