Skip to content

Commit ef42d54

Browse files
authored
fix: Add new release pipeline with production template (#1262)
#### Details Added new yml file for production release using production template and EnableSemanticRelease variable. Also moved the common code between CI and release pipeline to common template. The new release pipeline will be added mseng ADO as it requires access to key vault for getting github and npm publish tokens. To create pipeline in mseng ADO, yaml file should be available in main branch so I will create and test the new release pipeline after merging this PR. ##### Motivation <!-- This can be as simple as "addresses issue #123" --> ##### Context <!-- Are there any parts that you've intentionally left out-of-scope for a later PR to handle? --> <!-- Were there any alternative approaches you considered? What tradeoffs did you consider? --> #### Pull request checklist <!-- If a checklist item is not applicable to this change, write "n/a" in the checkbox --> - [x] PR title respects [Conventional Commits](https://www.conventionalcommits.org) (starts with `fix:`, `feat:`, etc, and is suitable for user-facing release notes) - [x] PR contains no breaking changes, **OR** description of both PR **and final merge commit** starts with `BREAKING CHANGE:` - [n/a] (if applicable) Addresses issue: #0000 - [n/a] Added relevant unit tests for your changes - [x] Ran `yarn precheckin` - [n/a] Verified code coverage for the changes made
1 parent 9803c55 commit ef42d54

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

pipelines/azure-pipelines.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
4+
extends:
5+
template: shared-template.yml@self
6+
parameters:
7+
templateType: UnOfficial

pipelines/release-pipeline.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) Microsoft Corporation. All rights reserved.
2+
# Licensed under the MIT License.
3+
parameters:
4+
- name: enableSemanticRelease
5+
type: boolean
6+
default: false
7+
8+
variables:
9+
- name: EnableSemanticRelease
10+
value: ${{ parameters.enableSemanticRelease }}
11+
- group: a11y-insights-axe-sarif-converter-release
12+
13+
extends:
14+
template: shared-template.yml@self
15+
parameters:
16+
templateType: Official

azure-pipelines.yml renamed to pipelines/shared-template.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Copyright (c) Microsoft Corporation. All rights reserved.
22
# Licensed under the MIT License.
3+
parameters:
4+
- name: templateType
5+
type: string
6+
default: UnOfficial
7+
values:
8+
- UnOfficial
9+
- Official
10+
311
# The `resources` specify the location and version of the 1ES PT.
412
resources:
513
repositories:
@@ -11,18 +19,20 @@ extends:
1119
# The pipeline extends the 1ES PT which will inject different SDL and compliance tasks.
1220
# For non-production pipelines, use "Unofficial" as defined below.
1321
# For productions pipelines, use "Official".
14-
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
22+
${{ if eq(parameters.templateType, 'Official') }}:
23+
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
24+
${{ else }}:
25+
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
1526
parameters:
1627
settings:
1728
skipBuildTagsForGitHubPullRequests: true
18-
# Update the pool with your team's 1ES hosted pool.
1929
pool:
20-
name: a11y-insights-pool-dev
30+
name: $(a11yInsightsPool)
2131
image: ubuntu-22.04-secure
2232
os: linux
2333
sdl:
2434
sourceAnalysisPool:
25-
name: a11y-insights-pool-dev # Name of your hosted pool
35+
name: $(a11yInsightsPool) # Name of your hosted pool
2636
image: windows-2022-secure # Name of the image in your pool. If not specified, first image of the pool is used
2737
os: windows # OS of the image. Allowed values: windows, linux, macOS
2838
codeql:

0 commit comments

Comments
 (0)