azure-devops-node-api/azure-pipelines.yml

68 строки
2.0 KiB
YAML

# This Yaml Document has been converted by ESAI Yaml Pipeline Conversion Tool.
# This pipeline will be extended to the OneESPT template
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
sdl:
sbom:
enabled: false
sourceAnalysisPool:
name: 1ES-ABTT-Shared-Pool
image: abtt-windows-2022
os: windows
pool:
name: 1ES-ABTT-Shared-Pool
image: abtt-ubuntu-2204
os: linux
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: stage
jobs:
- job: job
strategy:
matrix:
'Node 16':
versionSpec: '16.x'
npmVersion: '8'
'Node 18':
versionSpec: '18.x'
npmVersion: '10'
'Node 20':
versionSpec: '20.x'
npmVersion: '10'
'Node 22':
versionSpec: '22.x'
npmVersion: '10'
steps:
- task: NodeTool@0
inputs:
versionSpec: $(versionSpec)
displayName: Install node
- script: npm install -g npm@$(npmVersion)
displayName: Upgrade npm
- task: NpmAuthenticate@0
inputs:
workingFile: .npmrc
- script: npm install
displayName: npm install
- script: npm run build
displayName: npm run build
- script: npm run units
displayName: Run unit tests
- task: Npm@1
displayName: Publish azure-devops-node-api to npm
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), eq(variables['build.sourcebranchname'], 'master'))
inputs:
command: publish
workingDir: '_build'
publishRegistry: useExternalRegistry
publishEndpoint: btt-npm-publish-token
continueOnError: true