Migrate pipeline to 1ES pipeline template (#963)
* Migrate pipeline to 1ES pipeline template * Update format
This commit is contained in:
Родитель
dd49fce8e4
Коммит
61d7cea8c8
|
@ -3,32 +3,25 @@ steps:
|
|||
displayName: "Use Node 16.x"
|
||||
inputs:
|
||||
versionSpec: 16.x
|
||||
|
||||
- bash: npm install gulp cordova @vscode/vsce -g --force
|
||||
displayName: "npm install gulp cordova @vscode/vsce -g"
|
||||
|
||||
- bash: npm ci
|
||||
displayName: "npm ci"
|
||||
|
||||
- bash: npm run build
|
||||
displayName: "npm run build"
|
||||
|
||||
- bash: |
|
||||
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
|
||||
echo ">>> Started xvfb"
|
||||
displayName: Start xvfb
|
||||
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
|
||||
|
||||
- bash: "npm test --verbose"
|
||||
displayName: "Run host tests"
|
||||
env:
|
||||
DISPLAY: ":99.0"
|
||||
|
||||
- bash: npm run test-localization --verbose
|
||||
displayName: "Run localization tests"
|
||||
env:
|
||||
DISPLAY: ":99.0"
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: "Publish Extension Test Results"
|
||||
inputs:
|
||||
|
@ -36,7 +29,6 @@ steps:
|
|||
failTaskOnFailedTests: true
|
||||
testRunTitle: "[Extension Context] $(Agent.OS) Cordova tools unit tests - Attempt №$(System.JobAttempt)"
|
||||
condition: always()
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: "Publish Localization Test Results"
|
||||
inputs:
|
||||
|
@ -44,14 +36,12 @@ steps:
|
|||
failTaskOnFailedTests: true
|
||||
testRunTitle: "[Localization Context] $(Agent.OS) Cordova unit tests - Attempt №$(System.JobAttempt)"
|
||||
condition: always()
|
||||
|
||||
- task: BatchScript@1
|
||||
displayName: "Run script prepareBuild.bat"
|
||||
inputs:
|
||||
filename: prepareBuild.bat
|
||||
modifyEnvironment: true
|
||||
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
|
||||
|
||||
- bash: gulp
|
||||
displayName: "Build and run hostless tests"
|
||||
env:
|
||||
|
|
|
@ -1,67 +1,81 @@
|
|||
trigger:
|
||||
- master
|
||||
|
||||
variables:
|
||||
Codeql.Enabled: true
|
||||
|
||||
pr:
|
||||
- none
|
||||
|
||||
jobs:
|
||||
- job: Linux
|
||||
resources:
|
||||
repositories:
|
||||
- repository: 1ESPipelineTemplates
|
||||
type: git
|
||||
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
||||
ref: refs/tags/release
|
||||
extends:
|
||||
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
|
||||
parameters:
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
timeoutInMinutes: 20
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
- template: common-validation.yml
|
||||
|
||||
- job: Windows
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
timeoutInMinutes: 20
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
- template: common-validation.yml
|
||||
|
||||
- task: ComponentGovernanceComponentDetection@0
|
||||
displayName: "Component Detection"
|
||||
inputs:
|
||||
ignoreDirectories: ".vscode-test"
|
||||
|
||||
- task: notice@0
|
||||
displayName: "NOTICE File Generator"
|
||||
inputs:
|
||||
outputfile: "ThirdPartyNotices_Generated.txt"
|
||||
additionaldata: release/AdditionalAttributions.txt
|
||||
|
||||
- bash: gulp release
|
||||
displayName: "gulp release"
|
||||
|
||||
- bash: 'node -e "console.log(require(''./package.json'').version)" -> version.txt'
|
||||
displayName: "Strip version from package.json and save to version.txt"
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)"
|
||||
inputs:
|
||||
Contents: |
|
||||
*.vsix
|
||||
CHANGELOG.md
|
||||
version.txt
|
||||
TargetFolder: "$(Build.ArtifactStagingDirectory)"
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: "Publish artifacts: drop-win"
|
||||
inputs:
|
||||
ArtifactName: "drop-win"
|
||||
|
||||
- job: macOS
|
||||
pool:
|
||||
vmImage: macOS-latest
|
||||
timeoutInMinutes: 20
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
- template: common-validation.yml
|
||||
name: VSWebDiag1ESPipelinePool
|
||||
image: VSWebDiag_1ESImage_Windows
|
||||
os: windows
|
||||
customBuildTags:
|
||||
- ES365AIMigrationTooling
|
||||
stages:
|
||||
- stage: stage
|
||||
jobs:
|
||||
- job: Linux
|
||||
pool:
|
||||
name: VSWebDiag1ESPipelinePool
|
||||
image: VSWebDiag_1ESImage_Ubuntu
|
||||
os: linux
|
||||
timeoutInMinutes: 20
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
- template: /.ci/common-validation.yml@self
|
||||
- job: Windows
|
||||
pool:
|
||||
name: VSWebDiag1ESPipelinePool
|
||||
image: VSWebDiag_1ESImage_Windows
|
||||
os: windows
|
||||
timeoutInMinutes: 20
|
||||
templateContext:
|
||||
outputs:
|
||||
- output: pipelineArtifact
|
||||
displayName: "Publish artifacts: drop-win"
|
||||
targetPath: "$(Build.ArtifactStagingDirectory)"
|
||||
artifactName: "drop-win"
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
- template: /.ci/common-validation.yml@self
|
||||
- task: ComponentGovernanceComponentDetection@0
|
||||
displayName: "Component Detection"
|
||||
inputs:
|
||||
ignoreDirectories: ".vscode-test"
|
||||
- task: notice@0
|
||||
displayName: "NOTICE File Generator"
|
||||
inputs:
|
||||
outputfile: "ThirdPartyNotices_Generated.txt"
|
||||
additionaldata: release/AdditionalAttributions.txt
|
||||
- bash: gulp release
|
||||
displayName: "gulp release"
|
||||
- bash: 'node -e "console.log(require(''./package.json'').version)" -> version.txt'
|
||||
displayName: "Strip version from package.json and save to version.txt"
|
||||
- task: CopyFiles@2
|
||||
displayName: "Copy Files to: $(Build.ArtifactStagingDirectory)"
|
||||
inputs:
|
||||
Contents: |
|
||||
*.vsix
|
||||
CHANGELOG.md
|
||||
version.txt
|
||||
TargetFolder: "$(Build.ArtifactStagingDirectory)"
|
||||
- job: macOS
|
||||
pool:
|
||||
name: Azure Pipelines
|
||||
image: macos-latest
|
||||
os: macOS
|
||||
timeoutInMinutes: 20
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
- template: /.ci/common-validation.yml@self
|
||||
|
|
Загрузка…
Ссылка в новой задаче