-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
XS✔ ◾ Updating Azure DevOps Pipelines (#406)
## Summary ### Motivation The Azure DevOps pipelines are being split into PR and Production pipelines, to allow for the setting of custom variables for different environments. ### Technical Splitting up the pipeline into two, with the reusable logic moved to a new template. The Production pipeline includes a check to not run if is invoked as part of a PR. ## Testing ### Test Types - [ ] Unit tests - [X] Manual tests ### Unit Test Coverage 100%
- Loading branch information
1 parent
1f6f326
commit b706eed
Showing
3 changed files
with
173 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
|
||
--- | ||
|
||
trigger: | ||
batch: true | ||
branches: | ||
include: | ||
- main | ||
|
||
pr: none | ||
|
||
variables: | ||
- name: tags | ||
value: production, multi-phased | ||
|
||
stages: | ||
- stage: Checks | ||
displayName: Checks | ||
jobs: | ||
- job: Checks | ||
pool: server | ||
variables: | ||
- name: skipComponentGovernanceDetection | ||
value: true | ||
steps: | ||
- checkout: none | ||
displayName: Checkout | ||
|
||
- script: exit 1 | ||
displayName: Terminate on PR | ||
condition: ne(variables['Build.SourceBranchName'], 'main') | ||
|
||
- template: template.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
|
||
--- | ||
|
||
stages: | ||
- stage: Build | ||
displayName: Build | ||
jobs: | ||
- job: Delay | ||
displayName: Delay | ||
pool: server | ||
steps: | ||
- task: Delay@1 | ||
displayName: Wait for Deployment | ||
inputs: | ||
delayForMinutes: '5' | ||
|
||
- job: PRMetrics_macOS | ||
displayName: PR Metrics – macOS | ||
dependsOn: Delay | ||
pool: | ||
vmImage: macOS-latest | ||
variables: | ||
- name: skipComponentGovernanceDetection | ||
value: true | ||
- name: System.Debug | ||
value: true | ||
steps: | ||
- checkout: self | ||
displayName: Checkout | ||
fetchDepth: 0 | ||
|
||
- task: PRMetrics@1 | ||
displayName: PR Metrics | ||
env: | ||
# Azure DevOps Personal Access Token (PAT) with the Agent Pools (Read & Manage) permission. | ||
PR_METRICS_ACCESS_TOKEN: $(GITHUB_PAT) | ||
|
||
- job: PRMetrics_Ubuntu | ||
displayName: PR Metrics – Ubuntu | ||
dependsOn: PRMetrics_macOS | ||
pool: | ||
vmImage: ubuntu-latest | ||
variables: | ||
- name: skipComponentGovernanceDetection | ||
value: true | ||
- name: System.Debug | ||
value: true | ||
steps: | ||
- checkout: self | ||
displayName: Checkout | ||
fetchDepth: 0 | ||
|
||
- task: PRMetrics@1 | ||
displayName: PR Metrics | ||
env: | ||
# Azure DevOps Personal Access Token (PAT) with the Agent Pools (Read & Manage) permission. | ||
PR_METRICS_ACCESS_TOKEN: $(GITHUB_PAT) | ||
|
||
- job: PRMetrics_Windows | ||
displayName: PR Metrics – Windows | ||
dependsOn: PRMetrics_Ubuntu | ||
pool: | ||
vmImage: windows-latest | ||
variables: | ||
- name: skipComponentGovernanceDetection | ||
value: true | ||
- name: System.Debug | ||
value: true | ||
steps: | ||
- checkout: self | ||
displayName: Checkout | ||
fetchDepth: 0 | ||
|
||
- task: PRMetrics@1 | ||
displayName: PR Metrics | ||
env: | ||
# Azure DevOps Personal Access Token (PAT) with the Agent Pools (Read & Manage) permission. | ||
PR_METRICS_ACCESS_TOKEN: $(GITHUB_PAT) | ||
|
||
- job: Compliance | ||
displayName: Compliance | ||
pool: | ||
vmImage: windows-latest | ||
steps: | ||
- task: ComponentGovernanceComponentDetection@0 | ||
displayName: Component Detection | ||
inputs: | ||
failOnAlert: true | ||
|
||
- task: AntiMalware@4 | ||
displayName: Anti-Malware Scanner | ||
inputs: | ||
ScanType: FullSystemScan | ||
EnableServices: true | ||
ForceSignatureUpdate: true | ||
SignatureUpdateUsesMMPC: true | ||
TreatSignatureUpdateFailureAs: Error | ||
|
||
- task: CredScan@3 | ||
displayName: Credential Scanner | ||
|
||
- task: ESLint@1 | ||
displayName: ESLint | ||
inputs: | ||
Configuration: recommended | ||
|
||
- task: PoliCheck@2 | ||
displayName: PoliCheck | ||
inputs: | ||
targetType: F | ||
optionsFC: 1 | ||
optionsUEPATH: $(Build.SourcesDirectory)/.github/azure-devops/PoliCheckExclusions.xml | ||
|
||
- task: Semmle@1 | ||
displayName: CodeQL | ||
inputs: | ||
sourceCodeDirectory: $(Build.SourcesDirectory)/src | ||
language: tsandjs | ||
|
||
- task: PublishSecurityAnalysisLogs@3 | ||
displayName: Guardian – Publish Artifacts | ||
|
||
- task: PostAnalysis@2 | ||
displayName: Guardian – Perform Analysis | ||
inputs: | ||
GdnBreakPolicyMinSev: Note | ||
GdnBreakGdnToolGosecSeverity: Default | ||
GdnBreakPolicy: M365 | ||
|
||
... |