diff --git a/ProjectTemplates/AspNetCoreMicrosoftIdentityWebProjectTemplates.csproj b/ProjectTemplates/AspNetCoreMicrosoftIdentityWebProjectTemplates.csproj index 032bb111f..bb2e49fdc 100644 --- a/ProjectTemplates/AspNetCoreMicrosoftIdentityWebProjectTemplates.csproj +++ b/ProjectTemplates/AspNetCoreMicrosoftIdentityWebProjectTemplates.csproj @@ -2,9 +2,9 @@ - 2.12.4 + 2.12.4 - $(ClientSemVer) + $(MicrosoftIdentityWebVersion) Template Microsoft.Identity.Web.ProjectTemplates diff --git a/ProjectTemplates/test-aspnet-templates-from-nuget.bat b/ProjectTemplates/test-aspnet-templates-from-nuget.bat index aeb6184e3..38d42f7de 100644 --- a/ProjectTemplates/test-aspnet-templates-from-nuget.bat +++ b/ProjectTemplates/test-aspnet-templates-from-nuget.bat @@ -1,6 +1,6 @@ -echo "Ensure ClientSemVer" -if "%ClientSemVer%" == "" ( -set ClientSemVer=2.12.4 +echo "Ensure MicrosoftIdentityWebVersion" +if "%MicrosoftIdentityWebVersion%" == "" ( +set MicrosoftIdentityWebVersion=2.12.4 ) REM: This is to test Microsoft.Identity.Web templates diff --git a/ProjectTemplates/test-templates-from-nuget.bat b/ProjectTemplates/test-templates-from-nuget.bat index dd665d90b..8e5f02acb 100644 --- a/ProjectTemplates/test-templates-from-nuget.bat +++ b/ProjectTemplates/test-templates-from-nuget.bat @@ -1,6 +1,6 @@ -echo "Ensure ClientSemVer" -if "%ClientSemVer%" == "" ( -set ClientSemVer=2.12.4 +echo "Ensure MicrosoftIdentityWebVersion" +if "%MicrosoftIdentityWebVersion%" == "" ( +set MicrosoftIdentityWebVersion=2.12.4 ) REM: This is to test Microsoft.Identity.Web templates @@ -8,7 +8,7 @@ Set TemplateNugetPackageName="Microsoft.Identity.Web.ProjectTemplates" Set templatePostFix=2 REM: Uncomment the 3 following lines to test ASP.NET Core SDK templates -REM ClientSemVer="5.0.5.0.0-ci" +REM MicrosoftIdentityWebVersion="5.0.5.0.0-ci" REM TemplateNugetPackageName="Microsoft.DotNet.Web.ProjectTemplates" REM Set templatePostFix= @@ -19,7 +19,7 @@ echo "Build and Install templates" cd bin cd Debug dotnet new -u %TemplateNugetPackageName% -dotnet new -i %TemplateNugetPackageName%::%ClientSemVer% +dotnet new -i %TemplateNugetPackageName%::%MicrosoftIdentityWebVersion% echo "Test templates" mkdir tests diff --git a/ProjectTemplates/test-templates.bat b/ProjectTemplates/test-templates.bat index 6261bb9c9..f8a3c9cea 100644 --- a/ProjectTemplates/test-templates.bat +++ b/ProjectTemplates/test-templates.bat @@ -1,6 +1,6 @@ -echo "Ensure ClientSemVer" -if "%ClientSemVer%" == "" ( -set ClientSemVer=2.12.4 +echo "Ensure MicrosoftIdentityWebVersion" +if "%MicrosoftIdentityWebVersion%" == "" ( +set MicrosoftIdentityWebVersion=2.12.4 ) Set TemplateNugetPackageName="Microsoft.Identity.Web.ProjectTemplates" @@ -14,7 +14,7 @@ dotnet pack AspNetCoreMicrosoftIdentityWebProjectTemplates.csproj cd bin cd Debug dotnet new -u %TemplateNugetPackageName% -dotnet new -i %TemplateNugetPackageName%.%ClientSemVer%.nupkg +dotnet new -i %TemplateNugetPackageName%.%MicrosoftIdentityWebVersion%.nupkg echo "Test templates" mkdir tests diff --git a/TESTING.md b/TESTING.md index c90e69746..572d56c0c 100644 --- a/TESTING.md +++ b/TESTING.md @@ -9,7 +9,7 @@ In this article you will: -- Configure the version of the templates to test by setting the ClientSemVer environment variable. +- Configure the version of the templates to test by setting the MicrosoftIdentityWebVersion environment variable. - Run a script that will: - Generate C# projects corresponding to all the templates in various configurations (no auth, single-org, single-org calling graph, single-org calling web API, Individual B2C, Individual B2C calling web API (for the web API and the Blazorwasm hosted templates, as B2C does not support OBO)). - Configure the projects with existing Azure AD and B2C apps and client secrets. This is done by a configuration file named `configuration.json`. You will need to add the client secrets (see below). @@ -34,7 +34,7 @@ In a Developer Command Prompt: 3. Set the version of the templates to test. - `Set ClientSemVer=2.4.0` + `Set MicrosoftIdentityWebVersion=2.4.0` 4. In ProjectTemplates open the Configuration.json file and add the client secrets (or your own config file) . @@ -50,8 +50,8 @@ In a Developer Command Prompt: 6. Copy the NuGet package containing the templates (Microsoft.Identity.Web.ProjectTemplates.version.nupkg) downloaded from the release build and paste it under the `ProjectTemplates\bin\Debug` folder of the repo. - The version should be the same as the value of `ClientSemVer` you set earlier. Also, if you downloaded the `Packages.zip` file from the AzureDevOps build and saved it in your Downloads folder before unzipping it, you could run the following command: - `copy "%UserProfile%\Downloads\Packages\Packages\Microsoft.Identity.Web.ProjectTemplates.%ClientSemVer%.nupkg" ProjectTemplates\bin\Debug` + The version should be the same as the value of `MicrosoftIdentityWebVersion` you set earlier. Also, if you downloaded the `Packages.zip` file from the AzureDevOps build and saved it in your Downloads folder before unzipping it, you could run the following command: + `copy "%UserProfile%\Downloads\Packages\Packages\Microsoft.Identity.Web.ProjectTemplates.%MicrosoftIdentityWebVersion%.nupkg" ProjectTemplates\bin\Debug` 7. Go to the ProjectTemplates folder `cd ProjectTemplates` @@ -59,7 +59,7 @@ In a Developer Command Prompt: `copy nuget.config.release-build nuget.config` -9. From ProjectTemplates folder, run the `Test-templates.bat` script with an argument to tell the script to pick-up the existing `Microsoft.Identity.Web.ProjectTemplates.%ClientSemVer%.nupkg` file instead of regenerating it. +9. From ProjectTemplates folder, run the `Test-templates.bat` script with an argument to tell the script to pick-up the existing `Microsoft.Identity.Web.ProjectTemplates.%MicrosoftIdentityWebVersion%.nupkg` file instead of regenerating it. `Test-templates.bat DontGenerate` @@ -73,7 +73,7 @@ In a Developer Command Prompt: 2. Set the version of the templates to test. - `Set ClientSemVer=2.4.0` + `Set MicrosoftIdentityWebVersion=2.4.0` 3. Add client secrets to the `ProjectTemplates\Configuration.json` file diff --git a/build/build.md b/build/build.md index 5d7fe5fa1..7e1779a2f 100644 --- a/build/build.md +++ b/build/build.md @@ -14,7 +14,7 @@ - 'Azure Key Vault: buildautomation' - 'Install Keyvault Secrets' -- [template-restore-build-MSIdentityWeb.yaml](template-restore-build-MSIdentityWeb.yaml) `(BuildPlatform:'$(BuildPlatform)', BuildConfiguration: '$(BuildConfiguration)', MsIdentityWebSemVer: $(MsIdentityWebSemVer))` +- [template-restore-build-MSIdentityWeb.yaml](template-restore-build-MSIdentityWeb.yaml) `(BuildPlatform:'$(BuildPlatform)', BuildConfiguration: '$(BuildConfiguration)', MicrosoftIdentityWebVersion: $(MicrosoftIdentityWebVersion))` - Build solution Microsoft.Identity.Web.sln and run tests' (.NET Core) - [Build](template-restore-build-MSIdentityWeb.yaml) solution Microsoft.Identity.Web.sln netcoreapp3.1 for Roslyn analyzers' (VSBuild@1) - 'Component Detection' diff --git a/build/pipeline-releasebuild.yaml b/build/pipeline-releasebuild.yaml index eb9eba55e..ffa71d9c8 100644 --- a/build/pipeline-releasebuild.yaml +++ b/build/pipeline-releasebuild.yaml @@ -30,14 +30,14 @@ steps: parameters: BuildPlatform: '$(BuildPlatform)' BuildConfiguration: '$(BuildConfiguration)' - MsIdentityWebSemVer: $(MsIdentityWebSemVer) + MicrosoftIdentityWebVersion: $(MicrosoftIdentityWebVersion) # Run all tests - template: template-run-unit-tests.yaml parameters: BuildPlatform: '$(BuildPlatform)' BuildConfiguration: '$(BuildConfiguration)' - MsIdentityWebSemVer: $(MsIdentityWebSemVer) + MicrosoftIdentityWebVersion: $(MicrosoftIdentityWebVersion) # Run Post-build code analysis (e.g. Roslyn) - template: template-postbuild-code-analysis.yaml diff --git a/build/release-provisioning-tool.yml b/build/release-provisioning-tool.yml index 9b2c380ec..1114e37b3 100644 --- a/build/release-provisioning-tool.yml +++ b/build/release-provisioning-tool.yml @@ -32,7 +32,7 @@ steps: inputs: command: test projects: '$(Build.SourcesDirectory)\tools\app-provisioning-tool\app-provisioning.sln' - arguments: '--configuration $(BuildConfiguration) -p:RunCodeAnalysis=true -p:ClientSemVer=$(ClientSemVer) -p:SourceLinkCreate=true' + arguments: '--configuration $(BuildConfiguration) -p:RunCodeAnalysis=true -p:MicrosoftIdentityWebVersion=$(MicrosoftIdentityWebVersion) -p:SourceLinkCreate=true' # This task is needed so that the 1CS Rolsyn analyzers task works. # The previous task does the restore @@ -41,7 +41,7 @@ steps: inputs: solution: '$(Build.SourcesDirectory)\tools\app-provisioning-tool\app-provisioning.sln' vsVersion: '16.0' - msbuildArgs: '/p:RunCodeAnalysis=false /p:ClientSemVer=$(ClientSemVer) /p:SourceLinkCreate=true' + msbuildArgs: '/p:RunCodeAnalysis=false /p:MicrosoftIdentityWebVersion=$(MicrosoftIdentityWebVersion) /p:SourceLinkCreate=true' platform: $(BuildPlatform) configuration: $(BuildConfiguration) diff --git a/build/template-onebranch-release-build.yaml b/build/template-onebranch-release-build.yaml index 282a76bd1..302a76ad2 100644 --- a/build/template-onebranch-release-build.yaml +++ b/build/template-onebranch-release-build.yaml @@ -3,7 +3,7 @@ parameters: BuildPlatform: 'any cpu' BuildConfiguration: 'release' - MsIdentityWebSemVer: '1.0.0-internal$(Build.BuildNumber)' + MicrosoftIdentityWebVersion: '1.0.0-internal$(Build.BuildNumber)' steps: @@ -15,7 +15,7 @@ steps: parameters: BuildPlatform: '$(BuildPlatform)' BuildConfiguration: '$(BuildConfiguration)' - MsIdentityWebSemVer: $(MsIdentityWebSemVer) + MicrosoftIdentityWebVersion: $(MicrosoftIdentityWebVersion) # Pack and sign all of the nuget packages - template: template-pack-and-sign-all-nugets.yaml diff --git a/build/template-restore-build-MSIdentityWeb.yaml b/build/template-restore-build-MSIdentityWeb.yaml index 6bb6c86a2..dbd0394fc 100644 --- a/build/template-restore-build-MSIdentityWeb.yaml +++ b/build/template-restore-build-MSIdentityWeb.yaml @@ -4,7 +4,7 @@ parameters: BuildPlatform: 'any cpu' BuildConfiguration: 'debug' - MsIdentityWebSemVer: '1.0.0-devopsbuild' + MicrosoftIdentityWebVersion: '1.0.0-devopsbuild' steps: - script: | @@ -17,7 +17,7 @@ steps: command: 'custom' custom: 'build' projects: '$(IdWebSourceDir)Microsoft.Identity.Web.sln' - arguments: '-p:configuration=${{ parameters.BuildConfiguration }} -p:RunCodeAnalysis=true -p:MicrosoftIdentityWebVersion=${{ parameters.MsIdentityWebSemVer }} -p:SourceLinkCreate=true' + arguments: '-p:configuration=${{ parameters.BuildConfiguration }} -p:RunCodeAnalysis=true -p:MicrosoftIdentityWebVersion=${{ parameters.MicrosoftIdentityWebVersion }} -p:SourceLinkCreate=true' # This task is needed so that the 1CS Rolsyn analyzers task works. # The previous task does the restore @@ -28,7 +28,7 @@ steps: command: custom custom: msbuild project: '$(IdWebSourceDir)Microsoft.Identity.Web.sln' - arguments: '-p:configuration=${{ parameters.BuildConfiguration }} -p:RunCodeAnalysis=false -p:MicrosoftIdentityWebVersion=${{ parameters.MsIdentityWebSemVer }} -p:SourceLinkCreate=true' + arguments: '-p:configuration=${{ parameters.BuildConfiguration }} -p:RunCodeAnalysis=false -p:MicrosoftIdentityWebVersion=${{ parameters.MicrosoftIdentityWebVersion }} -p:SourceLinkCreate=true' # Run the dotnet daemon app # This requires that the build machine has a user assigned managed identity that can access the KeyVault.