Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1ES Template Conversion #28848

Merged
merged 3 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ parameters:
- name: Matrix
type: string
- name: DependsOn
type: string
default: ''
type: object
default: []
- name: UsePlatformContainer
type: boolean
default: false
- name: CloudConfig
type: object
default: {}
- name: OSName
type: string
default: ''

jobs:
- job:
Expand All @@ -39,10 +42,16 @@ jobs:

pool:
name: $(Pool)
vmImage: $(OSVmImage)
${{ if eq(parameters.UsePlatformContainer, 'true') }}:
# Add a default so the job doesn't fail when the matrix is empty
container: $[ variables['Container'] ]
# 1es pipeline templates converts `image` to demands: ImageOverride under the hood
# which is incompatible with image selection in the default non-1es hosted pools
${{ if eq(parameters.OSName, 'macOS') }}:
vmImage: $(OSVmImage)
${{ else }}:
image: $(OSVmImage)
os: ${{ parameters.OSName }}
${{ if eq(parameters.UsePlatformContainer, 'true') }}:
# Add a default so the job doesn't fail when the matrix is empty
container: $[ variables['Container'] ]

variables:
- template: ../variables/globals.yml
Expand All @@ -55,3 +64,4 @@ jobs:
Artifacts: ${{ parameters.Artifacts }}
ServiceDirectory: ${{ parameters.ServiceDirectory }}
TestProxy: ${{ parameters.TestProxy }}
OSName: ${{ parameters.OSName }}
27 changes: 9 additions & 18 deletions eng/pipelines/templates/jobs/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@ parameters:

jobs:
- job: "Build"
variables:
Codeql.Enabled: true
Codeql.BuildIdentifier: ${{ parameters.ServiceDirectory }}
Codeql.SkipTaskAutoInjection: false

pool:
name: azsdk-pool-mms-ubuntu-2004-general
vmImage: MMSUbuntu20.04
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux

steps:
- script: |
Expand All @@ -55,8 +52,9 @@ jobs:
- job: "Analyze"

pool:
name: azsdk-pool-mms-ubuntu-2004-general
vmImage: MMSUbuntu20.04
name: $(LINUXPOOL)
image: $(LINUXVMIMAGE)
os: linux

steps:
- template: ../steps/common.yml
Expand All @@ -67,19 +65,12 @@ jobs:
ServiceDirectory: ${{ parameters.ServiceDirectory }}
TestPipeline: ${{ parameters.TestPipeline }}

- job: Compliance
pool:
name: azsdk-pool-mms-win-2022-general
vmImage: MMS2022
steps:
- template: /eng/common/pipelines/templates/steps/credscan.yml
parameters:
ServiceDirectory: ${{ parameters.ServiceDirectory }}

- ${{ if ne(parameters.RunUnitTests, false) }}:
- template: /eng/common/pipelines/templates/jobs/archetype-sdk-tests-generate.yml
- template: /eng/common/pipelines/templates/jobs/generate-job-matrix.yml
parameters:
JobTemplatePath: /eng/pipelines/templates/jobs/ci.tests.yml
OsVmImage: $(LINUXVMIMAGE)
Pool: $(LINUXPOOL)
MatrixConfigs: ${{ parameters.MatrixConfigs }}
MatrixFilters: ${{ parameters.MatrixFilters }}
MatrixReplace: ${{ parameters.MatrixReplace }}
Expand Down
24 changes: 15 additions & 9 deletions eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ parameters:
- name: UsePlatformContainer
type: boolean
default: false

- name: OSName
type: string

jobs:
- job:
Expand All @@ -57,7 +58,13 @@ jobs:

pool:
name: $(Pool)
vmImage: $(OSVmImage)
# 1es pipeline templates converts `image` to demands: ImageOverride under the hood
# which is incompatible with image selection in the default non-1es hosted pools
${{ if eq(parameters.OSName, 'macOS') }}:
vmImage: $(OSVmImage)
${{ else }}:
image: $(OSVmImage)
os: ${{ parameters.OSName }}

timeoutInMinutes: ${{ parameters.TimeoutInMinutes }}

Expand Down Expand Up @@ -190,13 +197,12 @@ jobs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(PackagePath)/coverage/cobertura-coverage.xml"

- task: PublishPipelineArtifact@1
displayName: "Publish Browser Code Coverage Report Artifact"
continueOnError: true
condition: and(succeededOrFailed(),eq(variables['TestType'], 'browser'),eq(variables['PublishCodeCoverage'], true))
inputs:
path: "$(PackagePath)/coverage-browser"
artifact: BrowserCodeCoverageReport
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: "$(PackagePath)/coverage-browser"
ArtifactName: BrowserCodeCoverageReport
CustomCondition: and(succeededOrFailed(),eq(variables['TestType'], 'browser'),eq(variables['PublishCodeCoverage'], true))
SbomEnabled: false

# Unlink node_modules folders to significantly improve performance of subsequent tasks
# which need to walk the directory tree (and are hardcoded to follow symlinks).
Expand Down
Loading
Loading