2024-02-23 02:37:13 +03:00
|
|
|
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:
|
2024-02-23 20:19:28 +03:00
|
|
|
name: TypeScript-AzurePipelines-EO
|
2024-02-23 23:03:47 +03:00
|
|
|
image: 1ESPT-Mariner2.0
|
2024-02-23 02:37:13 +03:00
|
|
|
os: linux
|
|
|
|
|
2024-02-23 03:21:03 +03:00
|
|
|
sdl:
|
|
|
|
sourceAnalysisPool:
|
2024-02-23 20:19:28 +03:00
|
|
|
name: TypeScript-AzurePipelines-EO
|
2024-02-23 03:21:03 +03:00
|
|
|
image: 1ESPT-Windows2022
|
|
|
|
os: windows
|
|
|
|
|
2024-02-23 02:37:13 +03:00
|
|
|
stages:
|
|
|
|
- stage: buildStage
|
|
|
|
displayName: Build Stage
|
|
|
|
jobs:
|
2024-03-30 01:24:49 +03:00
|
|
|
- job: test
|
|
|
|
displayName: Test
|
2024-02-23 02:37:13 +03:00
|
|
|
steps:
|
2024-02-23 23:03:47 +03:00
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
fetchDepth: 1
|
|
|
|
fetchTags: false
|
|
|
|
|
2024-02-23 02:37:13 +03:00
|
|
|
- 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'
|
|
|
|
|
2024-03-30 01:24:49 +03:00
|
|
|
- job: build
|
|
|
|
displayName: Build
|
|
|
|
dependsOn: test
|
|
|
|
steps:
|
|
|
|
- checkout: self
|
|
|
|
clean: true
|
|
|
|
fetchDepth: 1
|
|
|
|
fetchTags: false
|
|
|
|
|
|
|
|
- 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'
|
|
|
|
|
2024-02-23 02:37:13 +03:00
|
|
|
- script: |
|
|
|
|
npx hereby LKG
|
|
|
|
npx hereby clean
|
2024-04-20 01:54:56 +03:00
|
|
|
node ./scripts/addPackageJsonGitHead.mjs package.json
|
2024-02-23 02:37:13 +03:00
|
|
|
npm pack
|
|
|
|
displayName: 'LKG, clean, pack'
|
|
|
|
|
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
|
|
|
|
inputs:
|
|
|
|
SourceFolder: ./
|
|
|
|
Contents: 'typescript-*.tgz'
|
|
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
|
2024-02-23 03:12:43 +03:00
|
|
|
templateContext:
|
|
|
|
outputs:
|
|
|
|
- output: pipelineArtifact
|
2024-02-23 02:37:13 +03:00
|
|
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
2024-02-23 03:12:43 +03:00
|
|
|
artifactName: tgz
|