-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating OneBranch to add a CI build (#4252)
* Updating OneBranch Builds. Adding CIbuild * Update templates * Updating default values * Update template-OneBranch-Release-libsandsamples.yaml --------- Co-authored-by: trwalke <trwalke@microsoft.com>
- Loading branch information
Showing
4 changed files
with
118 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# template-OneBranch-Release-libsandsamples.yaml | ||
# Performs Nuget Restore and Build of LibsAndSamples.sln based on BuildPlatform and BuildConfiguration | ||
# This also includes a pack and sign of the MSAL.NET packages | ||
|
||
parameters: | ||
BuildPlatform: 'any cpu' | ||
BuildConfiguration: 'release' | ||
MsalClientSemVer: '4.55.0-devopsbuild' | ||
MsalSourceDir: 'microsoft-authentication-library-for-dotnet\' #Default MSAL Location | ||
|
||
steps: | ||
|
||
- template: template-OneBranch-CI-libsandsamples.yaml | ||
parameters: | ||
Solution: 'microsoft-authentication-library-for-dotnet/LibsAndSamples.sln' | ||
MsalClientSemVer: $(MsalClientSemVer) #Default MSAL package version | ||
MsalSourceDir: $(MsalSourceDir) #Default MSAL root directory | ||
PipelineType: $(PipelineType) #Build type | ||
|
||
- template: template-pack-and-sign-all-nugets.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
|
||
# Release build for -netonly package should be triggered after the normal release build | ||
variables: | ||
BuildPlatform: 'AnyCPU' | ||
BuildConfiguration: 'Release' | ||
ProjectFilePath: '$(Build.SourcesDirectory)\src\client\Microsoft.Identity.Client\Microsoft.Identity.Client.csproj' | ||
ProjectFolderPath: '$(Build.SourcesDirectory)\src\client\Microsoft.Identity.Client' | ||
|
||
steps: | ||
- template: template-prebuild-code-analysis.yaml | ||
|
||
- task: VSBuild@1 | ||
displayName: 'Restore $(ProjectFilePath)' | ||
inputs: | ||
solution: $(ProjectFilePath) | ||
msbuildArgs: '/t:restore /p:NET_ONLY_INTERNAL_PACKAGE=true' | ||
platform: ${{ variables.BuildPlatform }} | ||
configuration: ${{ variables.BuildConfiguration }} | ||
|
||
- task: VSBuild@1 | ||
displayName: 'Build $(ProjectFilePath)' | ||
inputs: | ||
solution: $(ProjectFilePath) | ||
msbuildArgs: '/p:RunCodeAnalysis=false /p:MsalClientSemVer=$(MsalClientSemVer) /p:SourceLinkCreate=true /p:ContinousIntegrationBuild=true /p:NET_ONLY_INTERNAL_PACKAGE=true' | ||
platform: ${{ variables.BuildPlatform }} | ||
configuration: ${{ variables.BuildConfiguration }} | ||
maximumCpuCount: true | ||
|
||
- template: template-sign-binary.yaml | ||
parameters: | ||
FolderPath: '${{ variables.ProjectFolderPath }}' | ||
Pattern: '**\bin\**\Microsoft.Identity.Client.dll' | ||
|
||
- task: VSBuild@1 | ||
displayName: 'Pack ${{ variables.ProjectFilePath }}' | ||
inputs: | ||
solution: ${{ variables.ProjectFilePath }} | ||
msbuildArgs: '/t:pack /p:nobuild=true /p:IncludeSymbols=true /p:NET_ONLY_INTERNAL_PACKAGE=true' | ||
configuration: ${{ variables.BuildConfiguration }} | ||
|
||
- task: CopyFiles@2 | ||
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)\packages' | ||
inputs: | ||
SourceFolder: '$(Build.SourcesDirectory)\' | ||
Contents: '**\*nupkg' | ||
TargetFolder: '$(Build.ArtifactStagingDirectory)\packages' | ||
flattenFolders: true | ||
|
||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 | ||
displayName: 'Sign Packages' | ||
inputs: | ||
ConnectedServiceName: 'IDDP Code Signing' | ||
FolderPath: '$(Build.ArtifactStagingDirectory)\packages' | ||
Pattern: '*nupkg' | ||
signConfigType: inlineSignParams | ||
inlineOperation: | | ||
[ | ||
{ | ||
"keyCode": "CP-401405", | ||
"operationSetCode": "NuGetSign", | ||
"parameters": [ ], | ||
"toolName": "sign", | ||
"toolVersion": "1.0" | ||
}, | ||
{ | ||
"keyCode": "CP-401405", | ||
"operationSetCode": "NuGetVerify", | ||
"parameters": [ ], | ||
"toolName": "sign", | ||
"toolVersion": "1.0" | ||
} | ||
] | ||
SessionTimeout: 20 | ||
VerboseLogin: true | ||
timeoutInMinutes: 5 | ||
|
||
- task: CmdLine@2 | ||
displayName: 'Verify packages are signed' | ||
inputs: | ||
script: 'dotnet nuget verify $(Build.ArtifactStagingDirectory)\packages\*.nupkg' | ||
|
||
- task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 | ||
displayName: 'Get Software Bill Of Materials (SBOM)' | ||
inputs: | ||
BuildDropPath: '$(Build.ArtifactStagingDirectory)\packages' | ||
|
||
- task: PublishPipelineArtifact@1 | ||
displayName: 'Publish Artifact: packages' | ||
inputs: | ||
targetPath: '$(Build.ArtifactStagingDirectory)\packages' | ||
artifactName: packages | ||
|
||
- template: template-publish-analysis-and-cleanup.yaml |