From eabac6656521f8b405d113c746b0304cc30af628 Mon Sep 17 00:00:00 2001 From: Yuri Skorokhodov Date: Tue, 31 Mar 2020 17:48:39 +0300 Subject: [PATCH] Add YAML based build definitions --- .ci/common-validation.yml | 14 +++++++++ .ci/master-pipeline.yml | 65 +++++++++++++++++++++++++++++++++++++++ .ci/pr-pipeline.yml | 34 ++++++++++++++++++++ 3 files changed, 113 insertions(+) create mode 100644 .ci/common-validation.yml create mode 100644 .ci/master-pipeline.yml create mode 100644 .ci/pr-pipeline.yml diff --git a/.ci/common-validation.yml b/.ci/common-validation.yml new file mode 100644 index 00000000..e1b8e776 --- /dev/null +++ b/.ci/common-validation.yml @@ -0,0 +1,14 @@ +steps: +- task: NodeTool@0 + displayName: 'Use Node 10.x' + inputs: + versionSpec: 10.x + +- bash: npm install gulp -g --force + displayName: 'npm install gulp -g' + +- bash: npm ci + displayName: 'npm ci' + +- bash: gulp + displayName: 'gulp default' diff --git a/.ci/master-pipeline.yml b/.ci/master-pipeline.yml new file mode 100644 index 00000000..33c844f4 --- /dev/null +++ b/.ci/master-pipeline.yml @@ -0,0 +1,65 @@ +trigger: + - master + +pr: + - none + +jobs: +- job: Linux + 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: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 + displayName: 'Component Detection' + + - task: Npm@1 + displayName: 'npm pack' + inputs: + command: custom + verbose: false + customCommand: pack + + - task: msospo.ospo-extension.8d7f9abb-6896-461d-9e25-4f74ed65ddb2.notice@0 + displayName: 'NOTICE File Generator' + inputs: + outputfile: 'ThirdPartyNotices_Generated.txt' + additionaldata: release/AdditionalAttributions.txt + + - script: 'move ThirdPartyNotices_Generated.txt $(Build.ArtifactStagingDirectory)\ThirdPartyNotices.txt' + displayName: 'Move generated TPN to: $(Build.ArtifactStagingDirectory)' + + - task: CopyFiles@2 + displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' + inputs: + Contents: | + cordova-simulate-*.tgz + TargetFolder: '$(Build.ArtifactStagingDirectory)' + + - task: PublishBuildArtifacts@1 + displayName: 'Publish artifacts: drop' + inputs: + ArtifactName: 'drop' + + +- job: macOS + pool: + vmImage: macOS-latest + timeoutInMinutes: 20 + steps: + - checkout: self + clean: true + - template: common-validation.yml diff --git a/.ci/pr-pipeline.yml b/.ci/pr-pipeline.yml new file mode 100644 index 00000000..fcdcdc86 --- /dev/null +++ b/.ci/pr-pipeline.yml @@ -0,0 +1,34 @@ +pr: + branches: + include: ['*'] + +trigger: + - none + +jobs: +- job: Linux + pool: + vmImage: ubuntu-latest + timeoutInMinutes: 10 + steps: + - checkout: self + clean: true + - template: common-validation.yml + +- job: Windows + pool: + vmImage: windows-latest + timeoutInMinutes: 10 + steps: + - checkout: self + clean: true + - template: common-validation.yml + +- job: macOS + pool: + vmImage: macOS-latest + timeoutInMinutes: 10 + steps: + - checkout: self + clean: true + - template: common-validation.yml