96 строки
3.1 KiB
YAML
96 строки
3.1 KiB
YAML
# Copyright (c) Microsoft Corporation.
|
|
# Licensed under the MIT License.
|
|
|
|
parameters:
|
|
- name: SignTypeOverride
|
|
displayName: Signing Type Override
|
|
type: string
|
|
default: default
|
|
values:
|
|
- default
|
|
- test
|
|
- real
|
|
- name: VerifyChangelog
|
|
displayName: Attest that CHANGELOG.md is up-to-date.
|
|
type: string
|
|
default: no
|
|
values:
|
|
- yes
|
|
- no
|
|
- name: VerifyNotice
|
|
displayName: Attest that all NOTICE files are up-to-date.
|
|
type: string
|
|
default: no
|
|
values:
|
|
- yes
|
|
- no
|
|
- name: ReleaseVersion
|
|
displayName: Release Version to set in the vsix package
|
|
type: string
|
|
default: unset
|
|
|
|
trigger: none
|
|
|
|
resources:
|
|
repositories:
|
|
- repository: self
|
|
type: git
|
|
ref: refs/heads/main
|
|
- repository: MicroBuildTemplate
|
|
type: git
|
|
name: 1ESPipelineTemplates/MicroBuildTemplate
|
|
ref: refs/tags/release
|
|
|
|
name: $(Date:yyyyMMdd).$(Rev:r)
|
|
|
|
variables:
|
|
IsPreRelease: 0
|
|
# ReleaseVersion is set in the versions tab so it can be edited.
|
|
# VerifyNotice is set in the versions tab so it can be edited.
|
|
# VerifyChangelog is set in the versions tab so it can be edited.
|
|
TeamName: C++ Cross Platform and Cloud
|
|
# If the user didn't override the signing type, then only real-sign on main.
|
|
${{ if ne(parameters.SignTypeOverride, 'default') }}:
|
|
SignType: ${{ parameters.SignTypeOverride }}
|
|
${{ if and(eq(parameters.SignTypeOverride, 'default'), eq(variables['Build.SourceBranchName'], 'main')) }}:
|
|
SignType: real
|
|
${{ if and(eq(parameters.SignTypeOverride, 'default'), not(eq(variables['Build.SourceBranchName'], 'main'))) }}:
|
|
SignType: test
|
|
|
|
extends:
|
|
template: azure-pipelines/MicroBuild.1ES.Official.yml@MicroBuildTemplate
|
|
parameters:
|
|
pool:
|
|
name: VSEngSS-MicroBuild2022-1ES
|
|
sdl:
|
|
sourceAnalysisPool:
|
|
name: VSEngSS-MicroBuild2022-1ES
|
|
customBuildTags:
|
|
- ES365AIMigrationTooling
|
|
stages:
|
|
- stage: stage
|
|
jobs:
|
|
- job: Job_1
|
|
displayName: Build release
|
|
templateContext:
|
|
outputs:
|
|
- output: pipelineArtifact
|
|
displayName: "Publish VSIX"
|
|
targetPath: $(Build.ArtifactStagingDirectory)/vsix
|
|
artifactName: vsix
|
|
sbomBuildDropPath: $(Build.ArtifactStagingDirectory)
|
|
# No need for the SBOM, it's now located in the vsix artifact
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
fetchTags: false
|
|
- ${{ if not(eq(parameters.VerifyChangelog, 'yes')) }}:
|
|
- "CHANGELOG.md should be updated before scheduling the pipeline."
|
|
- ${{ if not(eq(parameters.VerifyNotice, 'yes')) }}:
|
|
- "Third party notices should be updated before scheduling the pipeline."
|
|
- ${{ if eq(parameters.ReleaseVersion, 'unset') }}:
|
|
- "ReleaseVersion needs to be set before scheduling the pipeline."
|
|
- template: /jobs/shared/build.yml@self
|
|
parameters:
|
|
ReleaseVersion: ${{ parameters.ReleaseVersion }}
|