Skip to content

Updatepipeline #17

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

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 19 additions & 26 deletions azure-pipeline/azure-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
# This pipeline will be extended to the MicroBuild template
# The Task 'PublishBuildArtifacts@1' has been converted to an output named 'Publish Artifact: Nuget packages' in the templateContext section.
trigger: none
schedules:
- cron: "0 0 14 * *"
branches:
include:
- main
always: true
resources:
repositories:
- repository: self
Expand All @@ -16,8 +22,6 @@ resources:
ref: refs/tags/release
name: $(Date:yyyyMMdd).$(Rev:r)
variables:
#- name: AzureServicesAuthConnectionStringSecret
# value: ''
- name: EnableNuGetPackageRestore
value: true
- name: Packaging.EnableSBOMSigning
Expand All @@ -28,6 +32,8 @@ extends:
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
parameters:
sdl:
policheck:
enable: true
sourceAnalysisPool:
name: AzurePipelines-EO
image: 1ESPT-Windows2022
Expand Down Expand Up @@ -79,8 +85,6 @@ extends:
clean: true
createLogFile: true
logFileVerbosity: detailed
# to delete
continueOnError: true
- task: CopyFiles@2
displayName: Stage dll's for verification
inputs:
Expand All @@ -97,33 +101,22 @@ extends:
Microsoft.AspNet.OutputCache..*.nupkg
!*.symbols.nupkg
TargetFolder: $(Build.SourcesDirectory)\verify\packages
# to delete
continueOnError: true
- task: ms-vseng.MicroBuildShipTasks.7c429315-71ba-4cb3-94bb-f829c95f7915.MicroBuildCodesignVerify@1
displayName: Verify Signed Binaries
inputs:
TargetFolder: $(Build.SourcesDirectory)\verify\dlls
# to delete
continueOnError: true
- task: ms-vseng.MicroBuildShipTasks.7c429315-71ba-4cb3-94bb-f829c95f7915.MicroBuildCodesignVerify@1
displayName: Verify Signed Packages
# to delete
continueOnError: true
- task: CmdLine@2
displayName: Map ConnectionString for ApiScan
# Following article on https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/25351/APIScan-step-by-step-guide-to-setting-up-a-Pipeline
# No longer need the old format, and following guideline to use (ApiScanClientId)
- task: APIScan@2
displayName: Run APIScan
inputs:
script: |
@echo off
REM Per the documentation here - https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=classic%2Cbatch#set-variables-in-scripts
REM
REM We can set/update pipeline variables using the syntax used below. That way we can use a script task to
REM pull secrets into the environment for APIScan to use, since the ApiScan task does not have an 'Environment'
REM section for mapping secrets in classic pipelines.
REM
REM Make sure the pipeline secret variable 'AzureServicesAuthConnectionString' is set. It's format is like
REM "runAs=App;AppId={AppId};TenantId={TenantId};AppKey={ClientSecret}"
REM The values for that connStr can be found in the Tellurium Key Vault.
@echo ##vso[task.setvariable variable=AzureServicesAuthConnectionString]%MappedConnectionString%
continueOnError: true
softwareFolder: '$(Build.SourcesDirectory)\verify\dlls'
softwareName: 'Microsoft.AspNet.OutputCache.*'
softwareVersionNum: '*'
softwareBuildNum: '$(Build.BuildId)'
symbolsFolder: '$(Build.SourcesDirectory)\bin\Release;SRV*http://symweb'
verbosityLevel: 'none'
env:
MappedConnectionString: $(AzureServicesAuthConnectionStringSecret)
AzureServicesAuthConnectionString: RunAs=App;AppId=$(ApiScanClientId)