PTVS/azure-pipelines.yml

145 строки
4.3 KiB
YAML

# This pipeline is used to build the PTVS product and installer.
# A seperate release pipeline is used to create insertion PR's into Visual Studio.
parameters:
- name: pylanceVersion
displayName: Pylance Version
type: string
default: latest
- name: debugpyVersion
displayName: Debugpy Version
type: string
default: latest
# build number format
name: $(date:yy)$(DayOfYear)$(rev:.r)
# Weekly schedule. This always runs even if there are no changes, because a pylance release
# does not generate commits in this repo.
# Pylance releases on Wednesdays, so we build on Thursdays at 6pm so we can pull in the latest
# pylance and get the VS insertion going so we can hopefully merge it in on Fridays.
# All times are in UTC, 1AM UTC on Friday = 6pm PDT on THURSDAY NIGHT (PDT is 7 hours behind)
schedules:
- cron: "0 1 * * Fri"
displayName: Weekly build
branches:
include:
- main
always: true
# Trigger ci builds for commits into master and any release branches
# Ignore changes to other yml files, since they are for different pipelines
trigger:
branches:
include:
- main
- release/*
paths:
exclude:
- 'azure-pipelines-*.yml'
# Trigger pr builds for commits into master and any release branches
# Ignore changes to other yml files, since they are for different pipelines
# Also ignore draft PR's
pr:
branches:
include:
- main
- release/*
paths:
exclude:
- 'azure-pipelines-*.yml'
drafts: false
# The agent pool the build will run on
pool:
name: VSEngSS-MicroBuild2022-1ES
demands:
- msbuild
- VisualStudio_17.0
# Build variables
# None of these are settable at build queue time. To do that, remove the variable from this list,
# browse to the pipeline editor in AzDO, add the variable there, and make it settable at queue time.
variables:
- name: DropRoot
value: \\cpvsbuild\Drops\DSTools\PTVS\$(Build.SourceBranchName)\$(Build.BuildNumber)\
- name: FileVersionPrefix
value: 17.0
- name: IncludeDjangoHtmlExtensions
value: true
- name: IncludeMiniconda
value: true
- name: IncludeMSI
value: false
- name: IncludeUWP
value: false
- name: TrackFileAccess
value: false
- name: Packaging.EnableSBOMSigning
value: false # disabled for now because of known issue
# Import variables from PTVS-Dev17 variable group
- group: PTVS-Dev17
steps:
# check out code clean from source control
- checkout: self
clean: true
# Non-PR steps
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
# add VSTarget build tag
- powershell: 'Write-Host "##vso[build.addbuildtag]$env:VSTarget"'
displayName: 'Add vstarget build tag'
# install microbuild plugins used for swixproj/vsmanproj, signing, and localization
- template: Build/templates/install_microbuild_plugins.yml
# Restore packages and install dependencies (pylance, debugpy)
- template: Build/templates/restore_packages.yml
parameters:
pylanceVersion: ${{ parameters.pylanceVersion }}
debugpyVersion: ${{ parameters.debugpyVersion }}
# Build and publish logs
- template: Build/templates/build.yml
# Non-PR steps
- ${{ if notin(variables['Build.Reason'], 'PullRequest') }}:
# Create VS bootstrapper for tests.
# This must happen BEFORE the MicroBuildUploadVstsDropFolder@1 task, since the bootstrapper
# needs to be uploaded to the drop as well.
# This step is disabled for now because it's blocking the build and we don't currently use it.
# - template: Build/templates/create_vs_bootstrapper.yml
# Upload vsts drop used by Visual Studio insertions
- task: MicroBuildUploadVstsDropFolder@1
displayName: 'Upload vsts drop'
inputs:
DropFolder: '$(Build.StagingDirectory)\release'
DropServiceUri: 'https://devdiv.artifacts.visualstudio.com/DefaultCollection'
VSDropServiceUri: 'https://vsdrop.corp.microsoft.com/file/v1'
AccessToken: '$(System.AccessToken)'
# publish symbols
- template: Build/templates/publish_symbols.yml
# MicroBuild cleanup
- task: MicroBuildCleanup@1
displayName: 'Execute cleanup tasks'
condition: succeededOrFailed()
# Publish binaries (used for localization)
- task: PublishBuildArtifacts@1
displayName: 'Publish build artifact: binaries'
inputs:
PathtoPublish: '$(Build.BinariesDirectory)/raw/binaries'
ArtifactName: Binaries
# Publish test data
- template: Build/templates/publish_test_data.yml