Skip to content

Trigger on PRs to main. #11

Trigger on PRs to main.

Trigger on PRs to main. #11

parameters:
- name: buildConfigs
type: object
default:
- pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-latest
os: windows
- pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: ubuntu-latest
os: linux
- pool:
name: Azure Pipelines
image: macOS-latest
os: macOS
pr:
- main
resources:
repositories:
- repository: OfficePipelineTemplates
type: git
name: 1ESPipelineTemplates/OfficePipelineTemplates
ref: refs/tags/release
extends:
template: v1/Office.Unofficial.PipelineTemplate.yml@OfficePipelineTemplates
parameters:
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: ubuntu-latest
os: linux
sdl:
sourceAnalysisPool:
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-latest
os: windows
# This prevents auto-injected Roslyn task from running the build again.
roslyn:
copyLogsOnly: true
codeql:
compiled:
enabled: true
break: true
analyzeInPipeline: true
stages:
- stage: build
displayName: Build
jobs:
- ${{ each config in parameters.buildConfigs }}:
- job: build_${{ config.pool.os }}
displayName: Building for ${{ config.pool.os }}
pool:
name: ${{ config.pool.name }}
image: ${{ config.pool.image }}
os: ${{ config.pool.os }}
templateContext:
outputs:
- output: pipelineArtifact
targetPath: dist/${{ config.runtime }}
artifactName: azureauth-${{ parameters.version }}-${{ config.runtime }}
steps:
- checkout: self
- task: UseDotNet@2
displayName: Use .NET Core sdk 8.x
inputs:
version: 8.x
- task: NuGetToolInstaller@0
displayName: Use NuGet 6.x
inputs:
versionSpec: 6.x
- task: DotNetCoreCLI@2
displayName: Install dependencies
inputs:
command: restore
feedsToUse: select
vstsFeed: Office
includeNuGetOrg: false
# 1ES PT requires explicit build task for Roslyn analysis. Auto-injected Roslyn task will use build logs from this build.
- task: DotNetCoreCLI@2
displayName: Build projects
env:
ADO_TOKEN: $(System.AccessToken)
inputs:
command: 'build'
arguments: --no-restore
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
arguments: --no-restore --no-build --verbosity normal