|
| 1 | +trigger: none |
| 2 | +pr: none |
| 3 | +resources: |
| 4 | + repositories: |
| 5 | + - repository: 1ESPipelineTemplates |
| 6 | + type: git |
| 7 | + name: 1ESPipelineTemplates/1ESPipelineTemplates |
| 8 | + ref: refs/tags/release |
| 9 | +extends: |
| 10 | + template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates |
| 11 | + parameters: |
| 12 | + sdl: |
| 13 | + policheck: |
| 14 | + enabled: true |
| 15 | + codeSignValidation: |
| 16 | + enabled: true |
| 17 | + codeql: |
| 18 | + ${{ if eq(variables['Build.SourceBranch'], variables['AllowedBranch']) }}: |
| 19 | + enabledOnNonDefaultBranches: true |
| 20 | + pool: |
| 21 | + name: Azure-Pipelines-1ESPT-ExDShared |
| 22 | + image: windows-2022 |
| 23 | + os: windows |
| 24 | + stages: |
| 25 | + - stage: stage |
| 26 | + jobs: |
| 27 | + - job: Build_PowerAppsTestEngine |
| 28 | + displayName: 'Build PowerAppsTestEngine Solution' |
| 29 | + strategy: |
| 30 | + matrix: |
| 31 | + Debug: |
| 32 | + BuildConfiguration: 'Debug' |
| 33 | + Release: |
| 34 | + BuildConfiguration: 'Release' |
| 35 | + templateContext: |
| 36 | + outputs: |
| 37 | + - output: pipelineArtifact |
| 38 | + condition: succeeded() |
| 39 | + artifactName: 'PowerApps.TestEngine ($(BuildConfiguration))' |
| 40 | + targetPath: '$(Build.ArtifactStagingDirectory)' |
| 41 | + - output: nuget |
| 42 | + condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'), eq(variables['UpdateVer'], 'true')) |
| 43 | + useDotNetTask: false # The default is false to use the NuGetCommand task. Set to true to use the DotNetCoreCLI task to publish packages. |
| 44 | + packagesToPush: '$(Build.ArtifactStagingDirectory)/Microsoft.PowerApps.TestEngine.*.nupkg' |
| 45 | + packageParentPath: '$(Build.ArtifactStagingDirectory)' |
| 46 | + publishVstsFeed: $(InternalFeed) |
| 47 | + nuGetFeedType: internal |
| 48 | + allowPackageConflicts: true # Optional. NuGetCommand task only. |
| 49 | + steps: |
| 50 | + - script: | |
| 51 | + echo "Hello $(myVariable)" |
| 52 | + - task: UseDotNet@2 |
| 53 | + displayName: 'Use dotnet sdk 8.0' |
| 54 | + inputs: |
| 55 | + version: 8.0.x |
| 56 | + installationPath: '$(Agent.ToolsDirectory)/dotnet' |
| 57 | + - task: DotNetCoreCLI@2 |
| 58 | + displayName: 'Build and test' |
| 59 | + inputs: |
| 60 | + command: 'run' |
| 61 | + projects: '$(Build.SourcesDirectory)/targets/targets.csproj' |
| 62 | + arguments: '-- ci -c $(BuildConfiguration)' |
| 63 | + - task: PublishTestResults@2 |
| 64 | + inputs: |
| 65 | + testResultsFormat: 'VSTest' |
| 66 | + testResultsFiles: '**/*-*.trx' |
| 67 | + searchFolder: '$(Build.SourcesDirectory)/obj/' |
| 68 | + mergeTestResults: true |
| 69 | + failTaskOnFailedTests: true |
| 70 | + - task: EsrpCodeSigning@5 |
| 71 | + displayName: 'ESRP sign' |
| 72 | + condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release')) |
| 73 | + inputs: |
| 74 | + ConnectedServiceName: $(EsrpConServName) |
| 75 | + AppRegistrationClientId: $(EsrpAppRegCliId) |
| 76 | + AppRegistrationTenantId: $(EsrpAppRegTenId) |
| 77 | + AuthAKVName: $(EsrpKVName) |
| 78 | + AuthCertName: $(EsrpAuthCertName) |
| 79 | + AuthSignCertName: $(EsrpAuthSignCertName) |
| 80 | + FolderPath: '$(Build.SourcesDirectory)/bin/$(BuildConfiguration)/PowerAppsTestEngineWrapper/' |
| 81 | + Pattern: '*.dll' |
| 82 | + signConfigType: inlineSignParams |
| 83 | + inlineOperation: | |
| 84 | + [ |
| 85 | + { |
| 86 | + "KeyCode": "CP-233863-SN", |
| 87 | + "OperationCode": "StrongNameSign", |
| 88 | + "Parameters": {}, |
| 89 | + "ToolName": "sign", |
| 90 | + "ToolVersion": "1.0" |
| 91 | + }, |
| 92 | + { |
| 93 | + "KeyCode": "CP-233863-SN", |
| 94 | + "OperationCode": "StrongNameVerify", |
| 95 | + "ToolName": "sign", |
| 96 | + "ToolVersion": "1.0", |
| 97 | + "Parameters": {} |
| 98 | + }, |
| 99 | + { |
| 100 | + "KeyCode": "CP-230012", |
| 101 | + "OperationCode": "SigntoolSign", |
| 102 | + "Parameters": { |
| 103 | + "OpusName": "Microsoft", |
| 104 | + "OpusInfo": "http://www.microsoft.com", |
| 105 | + "Append": "/as", |
| 106 | + "FileDigest": "/fd \"SHA256\"", |
| 107 | + "PageHash": "/NPH", |
| 108 | + "TimeStamp": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256" |
| 109 | + }, |
| 110 | + "ToolName": "sign", |
| 111 | + "ToolVersion": "1.0" |
| 112 | + }, |
| 113 | + { |
| 114 | + "KeyCode": "CP-230012", |
| 115 | + "OperationCode": "SigntoolVerify", |
| 116 | + "ToolName": "sign", |
| 117 | + "ToolVersion": "1.0", |
| 118 | + "Parameters": {} |
| 119 | + } |
| 120 | + ] |
| 121 | + - task: CopyFiles@2 |
| 122 | + displayName: 'Copy Built Files to Artifact Staging Directory' |
| 123 | + inputs: |
| 124 | + SourceFolder: '$(Build.SourcesDirectory)/bin' |
| 125 | + TargetFolder: '$(Build.ArtifactStagingDirectory)/buildoutput/bin' |
| 126 | + # Include all files except abc.txt |
| 127 | + Contents: | |
| 128 | + **/* |
| 129 | + !**/ThirdPartyNotices.txt |
| 130 | + - task: CopyFiles@2 |
| 131 | + displayName: 'Copy Built Files to Artifact Staging Directory' |
| 132 | + inputs: |
| 133 | + SourceFolder: '$(Build.SourcesDirectory)/obj' |
| 134 | + TargetFolder: '$(Build.ArtifactStagingDirectory)/buildoutput/obj' |
| 135 | + # Include all files except abc.txt |
| 136 | + Contents: | |
| 137 | + **/* |
| 138 | + !**/ThirdPartyNotices.txt |
| 139 | + - task: CopyFiles@2 |
| 140 | + displayName: 'Copy Built Files to Artifact Staging Directory' |
| 141 | + inputs: |
| 142 | + SourceFolder: '$(Build.SourcesDirectory)/pkg' |
| 143 | + TargetFolder: '$(Build.ArtifactStagingDirectory)/buildoutput/pkg' |
| 144 | + # Include all files except abc.txt |
| 145 | + Contents: | |
| 146 | + **/* |
| 147 | + !**/ThirdPartyNotices.txt |
| 148 | + - task: DotNetCoreCLI@2 |
| 149 | + displayName: 'Pack' |
| 150 | + inputs: |
| 151 | + command: 'run' |
| 152 | + projects: '$(Build.SourcesDirectory)/targets/targets.csproj' |
| 153 | + arguments: '-- pack-AlphaV2 -c $(BuildConfiguration) -o $(Build.ArtifactStagingDirectory)' |
| 154 | + condition: succeeded() |
| 155 | + - task: EsrpCodeSigning@5 |
| 156 | + displayName: 'ESRP sign nuget packages' |
| 157 | + inputs: |
| 158 | + ConnectedServiceName: $(EsrpConServName) |
| 159 | + AppRegistrationClientId: $(EsrpAppRegCliId) |
| 160 | + AppRegistrationTenantId: $(EsrpAppRegTenId) |
| 161 | + AuthAKVName: $(EsrpKVName) |
| 162 | + AuthCertName: $(EsrpAuthCertName) |
| 163 | + AuthSignCertName: $(EsrpAuthSignCertName) |
| 164 | + FolderPath: '$(Build.ArtifactStagingDirectory)' |
| 165 | + Pattern: '*.nupkg' |
| 166 | + signConfigType: inlineSignParams |
| 167 | + inlineOperation: | |
| 168 | + [ |
| 169 | + { |
| 170 | + "KeyCode": "CP-401405", |
| 171 | + "OperationCode": "NuGetSign", |
| 172 | + "Parameters": {}, |
| 173 | + "ToolName": "sign", |
| 174 | + "ToolVersion": "1.0" |
| 175 | + }, |
| 176 | + { |
| 177 | + "KeyCode": "CP-401405", |
| 178 | + "OperationCode": "NuGetVerify", |
| 179 | + "Parameters": {}, |
| 180 | + "ToolName": "sign", |
| 181 | + "ToolVersion": "1.0" |
| 182 | + } |
| 183 | + ] |
| 184 | + condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release')) |
| 185 | + - task: PublishSymbols@2 |
| 186 | + displayName: 'Publish symbols' |
| 187 | + condition: and(succeeded(), eq(variables['BuildConfiguration'], 'Release'), eq(variables['UpdateVer'], 'true')) |
| 188 | + continueOnError: true |
| 189 | + enabled: True |
| 190 | + inputs: |
| 191 | + SearchPattern: '$(Build.SourcesDirectory)/bin/$(BuildConfiguration)/**/*.pdb' |
| 192 | + SymbolServerType: TeamServices |
| 193 | + SymbolsPath: http://symweb/ |
| 194 | + CompressSymbols: true |
| 195 | + IndexSources: True |
| 196 | + SymbolsArtifactName: TestEngine_Symbols_$(Build.BuildNumber) |
0 commit comments