65 строки
1.8 KiB
YAML
65 строки
1.8 KiB
YAML
|
trigger:
|
||
|
branches:
|
||
|
include:
|
||
|
- release-*
|
||
|
|
||
|
resources:
|
||
|
repositories:
|
||
|
- repository: 1esPipelines
|
||
|
type: git
|
||
|
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
||
|
ref: refs/tags/release
|
||
|
|
||
|
extends:
|
||
|
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
|
||
|
parameters:
|
||
|
pool:
|
||
|
name: AzurePipelines-EO
|
||
|
image: 1ESPT-Mariner2.0
|
||
|
os: linux
|
||
|
|
||
|
stages:
|
||
|
- stage: buildStage
|
||
|
displayName: Build Stage
|
||
|
jobs:
|
||
|
- job: build
|
||
|
displayName: Build
|
||
|
steps:
|
||
|
- checkout: self
|
||
|
clean: true
|
||
|
|
||
|
- task: NodeTool@0
|
||
|
inputs:
|
||
|
versionSpec: 20.x
|
||
|
displayName: 'Install Node'
|
||
|
|
||
|
- script: |
|
||
|
npm install -g `node -e 'console.log(JSON.parse(fs.readFileSync("package.json", "utf8")).packageManager)'`
|
||
|
npm --version
|
||
|
displayName: 'Install packageManager from package.json'
|
||
|
|
||
|
- script: npm ci
|
||
|
displayName: 'npm ci'
|
||
|
|
||
|
- script: 'npm test'
|
||
|
displayName: 'npm test'
|
||
|
|
||
|
- script: |
|
||
|
npx hereby LKG
|
||
|
npx hereby clean
|
||
|
npm pack
|
||
|
displayName: 'LKG, clean, pack'
|
||
|
|
||
|
- task: CopyFiles@2
|
||
|
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
|
||
|
inputs:
|
||
|
SourceFolder: ./
|
||
|
Contents: 'typescript-*.tgz'
|
||
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||
|
|
||
|
- task: PublishPipelineArtifact@0
|
||
|
displayName: 'Publish Pipeline Artifact'
|
||
|
inputs:
|
||
|
artifactName: tgz
|
||
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|