-
Notifications
You must be signed in to change notification settings - Fork 346
Adds Azure DevOps guidance and updates GitHub Actions guidance. Closes #5879 #6663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
I will set this as draft as I guess now it makes more sense to update this to latest version of SPFx so for Node 22. |
Should we also change this so that it's based on federated identity? Seems like the best thing to do... |
Yes that would make sense. But I wonder would it first make sense to update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive Azure DevOps pipeline guidance for CLI for Microsoft 365 and updates the GitHub Actions documentation with newer versions. The changes enhance CI/CD documentation by expanding coverage to include Azure DevOps alongside existing GitHub Actions support.
- Adds complete Azure DevOps pipeline tutorial with authentication setup and deployment workflows
- Updates GitHub Actions documentation with newer action versions and improved titles
- Reorganizes sidebar positioning to accommodate the new Azure DevOps guidance
Reviewed Changes
Copilot reviewed 7 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
azuredevops-pipeline.mdx | New comprehensive guide for setting up CLI for Microsoft 365 in Azure DevOps pipelines |
github-actions.mdx | Updates action versions and improves titles/headings for clarity |
using-proxy-url.mdx | Sidebar position updated to accommodate new content |
using-cli-vs-code-extension.mdx | Sidebar position updated to accommodate new content |
using-cli-context.mdx | Sidebar position updated to accommodate new content |
use-cli-api.mdx | Sidebar position updated to accommodate new content |
manage-microsoft-365-apps.mdx | Sidebar position updated to accommodate new content |
command: install | ||
``` | ||
|
||
The above part is just a standard setup of Node version we will be using. Currently v18 as this is the latest version we may use for the currently latest version of SPFx which as of now is 1.20.0. Next we are running `npm install` to install all the dependencies of the project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation mentions Node v18 but the YAML example shows Node 22.x. This inconsistency could confuse users about which Node version to use.
Copilot uses AI. Check for mistakes.
|
||
 | ||
|
||
Next in the top right corner of the page hit on the `New pipline` button. After that follow the for by selecting the location of your repo, next the branch on which the YAML file is present, and then select the option to create a new pipeline based on `Existing Azure Pipelines YAML file` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'pipline' should be 'pipeline' and 'follow the for by' appears to have a grammatical error and should be 'follow the form by'.
Next in the top right corner of the page hit on the `New pipline` button. After that follow the for by selecting the location of your repo, next the branch on which the YAML file is present, and then select the option to create a new pipeline based on `Existing Azure Pipelines YAML file` | |
Next in the top right corner of the page hit on the `New pipeline` button. After that follow the form by selecting the location of your repo, next the branch on which the YAML file is present, and then select the option to create a new pipeline based on `Existing Azure Pipelines YAML file` |
Copilot uses AI. Check for mistakes.
|
||
The next thing we need is to set up the authentication for the CLI for Microsoft 365. In order to for CLI for Microsoft 365 to be able to deploy an SPFx package from Azure DevOps build artifacts to your SharePoint Online tenant it will need to authenticate as an app, yes as an app, otherwise we would need to use user credentials, and most probably confirm the MFA popup for authentication every time the pipeline runs which is for sure a no go. First, we will need to create an app registration in Entra ID portal and then create a certificate and upload it to the app registration. After that we will need to grant the app registration the necessary permissions in order to be able to deploy the SPFx package to the tenant app catalog. We could do that all manually but luckily for us we may do all that with just a few lines of code using CLI for Microsoft 365. | ||
|
||
First, let's create a new certificate which we will need to add to our app req and later on use in the pipeline for authentication. There are many ways to go about it but if you are using PowerShell you may use the following script to create a new certificate: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'app req' should be 'app registration' for clarity and consistency.
First, let's create a new certificate which we will need to add to our app req and later on use in the pipeline for authentication. There are many ways to go about it but if you are using PowerShell you may use the following script to create a new certificate: | |
First, let's create a new certificate which we will need to add to our app registration and later on use in the pipeline for authentication. There are many ways to go about it but if you are using PowerShell you may use the following script to create a new certificate: |
Copilot uses AI. Check for mistakes.
|
||
After we created our app registration we could just update the yaml file of the pipeline with the values of the variables that we need to use in the pipeline. But that is not the best approach as the certificate password and the certificate base 64 encoded string will be just visible in the yaml file as plain text and also be part of your git history. In order to avoid that we may use Azure DevOps Library to store the values of the variables in a secure way and use the library in our pipeline. Lets go over the steps of how to do that. | ||
|
||
First, we will need to go to Azure DevOps Pipelines Library page and click on `+ Variable group` button. After that, we will only need to specify the name of our group and we may start by adding variables to it. There are many things you may leverage to make your variables secure like integrating with Azure key vault or specifying a security Azure DevOps group that will only have edit access to the variable group. For the sake of simplicity we will just add the variables to the group and the once that are considered confidential, like password, we will mark them as secret. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'the once that are' should be 'the ones that are'.
First, we will need to go to Azure DevOps Pipelines Library page and click on `+ Variable group` button. After that, we will only need to specify the name of our group and we may start by adding variables to it. There are many things you may leverage to make your variables secure like integrating with Azure key vault or specifying a security Azure DevOps group that will only have edit access to the variable group. For the sake of simplicity we will just add the variables to the group and the once that are considered confidential, like password, we will mark them as secret. | |
First, we will need to go to Azure DevOps Pipelines Library page and click on `+ Variable group` button. After that, we will only need to specify the name of our group and we may start by adding variables to it. There are many things you may leverage to make your variables secure like integrating with Azure key vault or specifying a security Azure DevOps group that will only have edit access to the variable group. For the sake of simplicity we will just add the variables to the group and the ones that are considered confidential, like password, we will mark them as secret. |
Copilot uses AI. Check for mistakes.
Closes #5879