From 143d040fe941bbcb6185c2af8da5aa16adf26ee0 Mon Sep 17 00:00:00 2001 From: LocalizationBuildProcess Date: Tue, 4 Feb 2020 17:54:59 -0800 Subject: [PATCH 1/2] Set up Win & Mac builds for CLI --- .../botframework-cli-mac.yml | 30 ++----- build/botframework-cli.yml | 84 +++++++++++++++++++ 2 files changed, 93 insertions(+), 21 deletions(-) rename azure-pipelines.yml => build/botframework-cli-mac.yml (74%) create mode 100644 build/botframework-cli.yml diff --git a/azure-pipelines.yml b/build/botframework-cli-mac.yml similarity index 74% rename from azure-pipelines.yml rename to build/botframework-cli-mac.yml index 2d2686602..88c5cfd46 100644 --- a/azure-pipelines.yml +++ b/build/botframework-cli-mac.yml @@ -1,8 +1,12 @@ -trigger: - batch: true - branches: - include: - - master +# +# Build Botframework-CLI on Mac (Linux) agent +# + +# "name" here defines the build number format. Build number is accessed via $(Build.BuildNumber) +name: $(Build.BuildId) + +pool: + vmImage: 'macOS-10.14' pr: branches: @@ -21,28 +25,12 @@ pr: - LICENSE - PRIVACY.md -schedules: -- cron: "0 8 * * *" - displayName: Daily midnight build - branches: - include: - - master - jobs: - job: CLI - strategy: - matrix: - windows: - imageName: "windows-2019" - nodeVersion: "12.x" - maxParallel: 3 - pool: - vmImage: $(imageName) variables: buildVersion: '4.8.0-preview.$(Build.BuildId)' _version: ${{coalesce(variables.version, variables.buildVersion)}} steps: - #Your build pipeline references the ‘version’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971 - task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0 displayName: 'Tag Build with version number' inputs: diff --git a/build/botframework-cli.yml b/build/botframework-cli.yml new file mode 100644 index 000000000..5be18c745 --- /dev/null +++ b/build/botframework-cli.yml @@ -0,0 +1,84 @@ +# +# Build Botframework-CLI on Windows agent +# + +# "name" here defines the build number format. Build number is accessed via $(Build.BuildNumber) +name: $(Build.BuildId) + +pool: + name: Hosted Windows 2019 with VS2019 + +pr: + branches: + include: + - master + paths: + include: + - '*' + exclude: + - README.md + - specs/* + - PortingMap.md + - ToolLifetimeSchedule.md + - AzureCli.md + - CONTRIBUTING.md + - LICENSE + - PRIVACY.md + +jobs: + - job: CLI + variables: + buildVersion: '4.8.0-preview.$(Build.BuildId)' + _version: ${{coalesce(variables.version, variables.buildVersion)}} + steps: + - task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0 + displayName: 'Tag Build with version number' + inputs: + tags: 'Version=$(_version)' + + - task: NodeTool@0 + displayName: 'Use Node $(nodeVersion)' + inputs: + versionSpec: $(nodeVersion) + + - task: Npm@1 + displayName: 'Install rush' + inputs: + command: custom + verbose: false + customCommand: 'install --global @microsoft/rush' + + - script: 'rush update' + displayName: 'rush update' + + - script: 'rush build' + displayName: 'rush build' + + - script: 'rush test' + displayName: 'rush test' + + - script: 'rush posttest' + displayName: 'rush posttest' + + - script: 'node ./common/scripts/version-and-pack.js --version $(_version)' + displayName: 'Version and Pack' + + - task: CopyFiles@2 + displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' + inputs: + SourceFolder: ./.output + Contents: '**/*.tgz' + TargetFolder: '$(Build.ArtifactStagingDirectory)' + flattenFolders: true + + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifact: drop' + inputs: + artifactName: 'drop' + + - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 + displayName: 'Component Detection' + + - script: 'rush report:coverage' + displayName: 'rush report:coverage' + enabled: false From 1719b952cdd163cc38c88736469121c00b0112bd Mon Sep 17 00:00:00 2001 From: LocalizationBuildProcess Date: Tue, 4 Feb 2020 18:06:22 -0800 Subject: [PATCH 2/2] Update Node. --- build/botframework-cli-mac.yml | 5 +++-- build/botframework-cli.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build/botframework-cli-mac.yml b/build/botframework-cli-mac.yml index 88c5cfd46..82d02a49d 100644 --- a/build/botframework-cli-mac.yml +++ b/build/botframework-cli-mac.yml @@ -30,6 +30,7 @@ jobs: variables: buildVersion: '4.8.0-preview.$(Build.BuildId)' _version: ${{coalesce(variables.version, variables.buildVersion)}} + steps: - task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0 displayName: 'Tag Build with version number' @@ -37,9 +38,9 @@ jobs: tags: 'Version=$(_version)' - task: NodeTool@0 - displayName: 'Use Node $(nodeVersion)' + displayName: 'Use Node 12.x' inputs: - versionSpec: $(nodeVersion) + versionSpec: 12.x - task: Npm@1 displayName: 'Install rush' diff --git a/build/botframework-cli.yml b/build/botframework-cli.yml index 5be18c745..f324c9f79 100644 --- a/build/botframework-cli.yml +++ b/build/botframework-cli.yml @@ -30,6 +30,7 @@ jobs: variables: buildVersion: '4.8.0-preview.$(Build.BuildId)' _version: ${{coalesce(variables.version, variables.buildVersion)}} + steps: - task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0 displayName: 'Tag Build with version number' @@ -37,9 +38,9 @@ jobs: tags: 'Version=$(_version)' - task: NodeTool@0 - displayName: 'Use Node $(nodeVersion)' + displayName: 'Use Node 12.x' inputs: - versionSpec: $(nodeVersion) + versionSpec: 12.x - task: Npm@1 displayName: 'Install rush'