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: docs/spfx/toolchain/implement-ci-cd-with-azure-devops.md
+12-13Lines changed: 12 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ localization_priority: Priority
10
10
11
11
Azure DevOps (Visual Studio Team Services / Team Foundation Server) consists of a set of tools and services that help developers implement DevOps, Continuous Integration, and Continuous Deployment processes for their development projects.
12
12
13
-
This article explains the steps involved in setting up your Azure DevOps environment with with Continuous Integration and Continuous Deployment to automate your SharePoint Framework builds, unit tests, and deployment.
13
+
This article explains the steps involved in setting up your Azure DevOps environment with Continuous Integration and Continuous Deployment to automate your SharePoint Framework builds, unit tests, and deployment.
14
14
15
15
## Continuous Integration
16
16
@@ -36,7 +36,7 @@ The Build Definition, as its name suggests, includes all the definitions and the
36
36
37
37
### Installing NodeJS version 8
38
38
39
-
Once the Build Definition has been created, the first thing you need to do is instal NodeJS. Make sure to install version 8, as SharePoint Framework depends on it.
39
+
Once the Build Definition has been created, the first thing you need to do is install NodeJS. Make sure to install version 8, as SharePoint Framework depends on it.
@@ -49,7 +49,7 @@ Because third party dependencies are not stored in the source control, you need
49
49
50
50
### Executing Unit Tests
51
51
52
-
The SharePoint Framework supports writing units tests using KarmaJS, Mocha, Chai and Sinon. These modules are already referenced for you and it is highly recommended at a minimum to test the business logic of your code to get feedback on any potential issues or regressions as soon as possible. To have Azure DevOps execute your unit tests, add a `gulp` task. Set the path to the `gulpfile` file and set the `Gulp Tasks` option to `test`.
52
+
The SharePoint Framework supports writing unit tests using KarmaJS, Mocha, Chai and Sinon. These modules are already referenced for you and it is highly recommended at a minimum to test the business logic of your code to get feedback on any potential issues or regressions as soon as possible. To have Azure DevOps execute your unit tests, add a `gulp` task. Set the path to the `gulpfile` file and set the `Gulp Tasks` option to `test`.
53
53
54
54

55
55
@@ -64,7 +64,7 @@ By default SharePoint Framework projects do not include a reporter for JUnit. Re
You also need to configure KarmaJS to load an use the reporter, to do so create a file `config/karma.config.js` and add the following content.
67
+
You also need to configure KarmaJS to load and use the reporter, to do so create a file `config/karma.config.js` and add the following content.
68
68
69
69
```JS
70
70
"use strict";
@@ -135,14 +135,13 @@ Add a `Copy Files` task and set the `Contents` to `**\*.sppkg` (the SharePoint P
135
135
136
136
### Publishing the artifacts
137
137
138
-
Now that you have collected all the files needed for deployment in a special artifacts folder, you still need to instruct Azure DevOps to keep these files after the execution of the build. To do so add a `Publis
139
-
h artifacts` task and set the `Path to publish` to `$(build.artifactstagingdirectory)/drop` and the `Artifact name` to `drop`.
138
+
Now that you have collected all the files needed for deployment in a special artifacts folder, you still need to instruct Azure DevOps to keep these files after the execution of the build. To do so add a `Publish artifacts` task and set the `Path to publish` to `$(build.artifactstagingdirectory)/drop` and the `Artifact name` to `drop`.
140
139

141
140
142
141
143
142
## Continuous Deployment
144
143
145
-
Continuous Deployment (CD) takes validated code packages from build process and deploys them into a staging or production environment. Developers are able to track which deployments were successful or not and narrow down the issues to the particular package versions.
144
+
Continuous Deployment (CD) takes validated code packages from build process and deploys them into a staging or production environment. Developers can track which deployments were successful or not and narrow down issues to specific package versions.
146
145
147
146
Setting up Azure DevOps for Continuous Deployments with a SharePoint Framework solution requires the following steps:
148
147
@@ -158,7 +157,7 @@ Setting up Azure DevOps for Continuous Deployments with a SharePoint Framework s
158
157
159
158
### Creating the Release Definition
160
159
161
-
Start by creating a new Release Definition with an empty template. A Release Defition is a process that is used to identify the following elements for the deployment:
160
+
Start by creating a new Release Definition with an empty template. A Release Definition is a process that is used to identify the following elements for the deployment:
162
161
163
162
- Environment
164
163
- Deployment tasks
@@ -174,7 +173,7 @@ Click on `Add an artifact` and select the build definition you previously create
174
173
175
174
### Creating the Environment
176
175
177
-
When you create your continuous deployment environment, you can give a name and configure pre-deployment approvals, artificats filters (i.e. deploy only if the build comes from this or that branch), and much more by clicking on the buttons around the environment box or directly on the title.
176
+
When you create your continuous deployment environment, you can give a name and configure pre-deployment approvals, artifact filters (i.e. deploy only if the build comes from this or that branch), and much more by clicking on the buttons around the environment box or directly on the title.
178
177
179
178

180
179
@@ -195,7 +194,7 @@ The Office 365 Common Language Interface (CLI) is an open source project built b
195
194
> Learn more about the [Office 365 CLI](https://pnp.github.io/office365-cli/)
196
195
197
196
### Connecting to the App Catalog
198
-
Before using the App Catalog in you deployment environment, you first need to authenticate against the App Catalog of your tenant. To do so, add a `Command Line` task and paste in the following command into the `script` field `o365 spo login https://$(tenant).sharepoint.com/$(catalogsite) --authType password --userName $(username) --password $(password)
197
+
Before using the App Catalog in your deployment environment, you first need to authenticate against the App Catalog of your tenant. To do so, add a `Command Line` task and paste in the following command into the `script` field `o365 spo login https://$(tenant).sharepoint.com/$(catalogsite) --authType password --userName $(username) --password $(password)
199
198
`
200
199

201
200
@@ -213,7 +212,7 @@ Upload the solution package to your App Catalog by adding another `Command Line`
213
212
214
213
### Deploying the Application
215
214
216
-
The final step in the setup is to deploy the application to the App Catalog to make it available to all site collections within the tenant as it's latest version. Add another `Command Line`taks and paste the follwing command line in the `Script` field `o365 spo app deploy --name sp-fx-devops.sppkg --appCatalogUrl https://$(tenant).sharepoint.com/$(catalogsite)`
215
+
The final step in the setup is to deploy the application to the App Catalog to make it available to all site collections within the tenant as its latest version. Add another `Command Line`task and paste the following command line in the `Script` field `o365 spo app deploy --name sp-fx-devops.sppkg --appCatalogUrl https://$(tenant).sharepoint.com/$(catalogsite)`
217
216
218
217
> [!NOTE]
219
218
> Make sure you update the package name.
@@ -238,15 +237,15 @@ Add the following variables
238
237
239
238
## Testing
240
239
241
-
To test your newly created Continuous Deployment process, return to the `Builds` section in Azure DevOps, select your build definition and click on `Queue`. Select your branch, and click on `Queue`. A new build will be created and will start building.
240
+
To test your newly created Continuous Deployment process, return to the `Builds` section in Azure DevOps, select your build definition and click on `Queue`. Select your branch and click on `Queue`. A new build will be created and will start building.
242
241
243
242

244
243
245
244
After a couple of minutes, your build should complete and show a result page like this one.
246
245
247
246

248
247
249
-
If you navigate to the `Release` section of Azure DevOps, a new release should have started automatically. After a few minutes your release should complete and your SharePoint Framework solution is deployed to your tenant.
248
+
If you navigate to the `Release` section of Azure DevOps, a new release should have started automatically. After a few minutes your release should complete, and your SharePoint Framework solution is deployed to your tenant.
250
249
251
250

0 commit comments