Skip to content

Commit 8d1fbc6

Browse files
baywetVesaJuvonen
authored andcommitted
spfx cicd: Fixed a bug where an update to office 365 cli would break the deployment script (SharePoint#4715)
1 parent 0b2802d commit 8d1fbc6

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

docs/images/azure-devops-spfx-15.png

-2 KB
Loading

docs/images/azure-devops-spfx-17.png

-4.21 KB
Loading

docs/spfx/toolchain/implement-ci-cd-with-azure-devops.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ The Office 365 Common Language Interface (CLI) is an open source project built b
205205
> [!NOTE]
206206
> Learn more about the [Office 365 CLI](https://pnp.github.io/office365-cli/)
207207
208-
### Connecting to the App Catalog
209-
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)
208+
### Connecting to SharePoint Online
209+
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 login -t password -u $(username) -p $(password)
210210
`
211211
![connecting to the app catalog](../../images/azure-devops-spfx-15.png)
212212

@@ -220,15 +220,21 @@ Upload the solution package to your App Catalog by adding another `Command Line`
220220
> [!NOTE]
221221
> The path of the package depends on your solution name (see your project configuration) as well as the `Source Alias` you defined earlier, make sure they match.
222222
223+
> [!NOTE]
224+
> You can upload a solution to a site collection app catalog by adding `--appCatalogUrl https://$(tenant).sharepoint.com/$(catalogsite) --scope site`
225+
223226
![uploading the package to the catalog](../../images/azure-devops-spfx-16.png)
224227

225228
### Deploying the Application
226229

227-
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)`
230+
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`
228231

229232
> [!NOTE]
230233
> Make sure you update the package name.
231234
235+
> [!NOTE]
236+
> You can deploy a solution from a site collection app catalog by adding `--appCatalogUrl https://$(tenant).sharepoint.com/$(catalogsite) --scope site`
237+
232238
![Deploying the package to the catalog](../../images/azure-devops-spfx-17.png)
233239

234240
### Setting the Variables for the Environment
@@ -237,10 +243,10 @@ The tasks you configured in the last step rely on Azure DevOps process variables
237243
Add the following variables
238244
| Name | Value |
239245
| ------ | ------ |
240-
| catalogsite | Server relative Path of the App Catalog Site eg `sites/appcatalog` |
246+
| catalogsite | Optional. Server relative Path of the App Catalog Site eg `sites/appcatalog` when uploading to a [site collection App Catalog](../../general-development/site-collection-app-catalog) |
241247
| password | Password of the user with administrative permissions on the tenant, do not forget to check the lockpad to mask it to other users |
242248
| username | Username of the user with administrative permissions on the tenant |
243-
| tenant | Tenant name in https://tenant.sharepoint.com eg `tenant` |
249+
| tenant | Optional. Tenant name in https://tenant.sharepoint.com eg `tenant` when uploading to a site collection App Catalog |
244250

245251
![Variables setup](../../images/azure-devops-spfx-18.png)
246252

0 commit comments

Comments
 (0)