FluidHelloWorld/azure-pipelines.yml

78 строки
2.4 KiB
YAML

# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# FluidHelloWorld build for CI
pr:
- main
- main-azure
resources:
repositories:
- repository: m365Pipelines
type: git
name: 1ESPipelineTemplates/M365GPT
ref: refs/tags/release
extends:
template: v1/M365.Official.PipelineTemplate.yml@m365Pipelines
parameters:
pool:
name: Small-1ES
os: linux
sdl:
arrow:
# This is the service connection for the Arrow Service Connection in FluidFramework Azure DevOps organization
# Currently we want to use different names for internal and public builds for Arrow Service Connection
${{ if eq(variables['System.TeamProject'], 'internal') }}:
serviceConnection: ff-internal-arrow-sc
${{ else }}:
serviceConnection: ff-public-arrow-sc
sourceAnalysisPool:
name: Azure-Pipelines-1ESPT-ExDShared
image: windows-2022
os: windows
# Skip tagging if Github PR coming from a fork
settings:
skipBuildTagsForGitHubPullRequests: true
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: stage
jobs:
- job: job
steps:
- task: ComponentGovernanceComponentDetection@0
inputs:
scanType: "Register"
verbosity: "Verbose"
alertWarningLevel: "High"
- task: UseNode@1
displayName: Use Node 20.x
inputs:
version: 20.x
- task: Npm@1
displayName: Install
inputs:
command: "custom"
customCommand: "ci"
- task: CmdLine@2
displayName: Build
inputs:
script: "npm run build"
- task: CmdLine@2
displayName: Lint
inputs:
script: "npm run lint"
- task: CmdLine@2
displayName: Test
inputs:
script: "npm run ci:test"
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFormat: "JUnit"
testResultsFiles: "**/*junit-report.xml"
searchFolder: "$(System.DefaultWorkingDirectory)"
condition: succeededOrFailed()