Skip to content
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
10 changes: 5 additions & 5 deletions eng/common/templates/jobs/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ parameters:
noCache: false
internalProjectName: null
publicProjectName: null
isInternalServicingValidation: false
storageAccountServiceConnection: null

jobs:
- job: ${{ parameters.name }}
Expand Down Expand Up @@ -73,11 +73,11 @@ jobs:
id: ${{ parameters.publishConfig.buildAcr.serviceConnection.id }}
tenantId: ${{ parameters.publishConfig.buildAcr.serviceConnection.tenantId }}
clientId: ${{ parameters.publishConfig.buildAcr.serviceConnection.clientId }}
- ${{ if eq(parameters.isInternalServicingValidation, true) }}:
- ${{ if parameters.storageAccountServiceConnection }}:
- name: storage
id: $(dotnetstaging.serviceConnection.id)
tenantId: $(dotnetstaging.serviceConnection.tenantId)
clientId: $(dotnetstaging.serviceConnection.clientId)
id: ${{ parameters.storageAccountServiceConnection.id }}
tenantId: ${{ parameters.storageAccountServiceConnection.tenantId }}
clientId: ${{ parameters.storageAccountServiceConnection.clientId }}
internalProjectName: ${{ parameters.internalProjectName }}
dockerClientOS: ${{ parameters.dockerClientOS }}
args: >-
Expand Down
16 changes: 8 additions & 8 deletions eng/common/templates/stages/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ parameters:

versionsRepoRef: ""

isInternalServicingValidation: false
storageAccountServiceConnection: null

linuxAmd64Pool:
vmImage: $(defaultLinuxAmd64PoolImage)
Expand Down Expand Up @@ -113,7 +113,7 @@ stages:
publishConfig: ${{ parameters.publishConfig }}
internalProjectName: ${{ parameters.internalProjectName }}
publicProjectName: ${{ parameters.publicProjectName }}
isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }}
storageAccountServiceConnection: ${{ parameters.storageAccountServiceConnection }}
- template: /eng/common/templates/jobs/build-images.yml@self
parameters:
name: Linux_arm64
Expand All @@ -131,7 +131,7 @@ stages:
publishConfig: ${{ parameters.publishConfig }}
internalProjectName: ${{ parameters.internalProjectName }}
publicProjectName: ${{ parameters.publicProjectName }}
isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }}
storageAccountServiceConnection: ${{ parameters.storageAccountServiceConnection }}
- template: /eng/common/templates/jobs/build-images.yml@self
parameters:
name: Linux_arm32
Expand All @@ -149,7 +149,7 @@ stages:
publishConfig: ${{ parameters.publishConfig }}
internalProjectName: ${{ parameters.internalProjectName }}
publicProjectName: ${{ parameters.publicProjectName }}
isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }}
storageAccountServiceConnection: ${{ parameters.storageAccountServiceConnection }}
- template: /eng/common/templates/jobs/build-images.yml@self
parameters:
name: Windows1809_amd64
Expand All @@ -167,7 +167,7 @@ stages:
publishConfig: ${{ parameters.publishConfig }}
internalProjectName: ${{ parameters.internalProjectName }}
publicProjectName: ${{ parameters.publicProjectName }}
isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }}
storageAccountServiceConnection: ${{ parameters.storageAccountServiceConnection }}
- template: /eng/common/templates/jobs/build-images.yml@self
parameters:
name: Windows2022_amd64
Expand All @@ -185,7 +185,7 @@ stages:
publishConfig: ${{ parameters.publishConfig }}
internalProjectName: ${{ parameters.internalProjectName }}
publicProjectName: ${{ parameters.publicProjectName }}
isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }}
storageAccountServiceConnection: ${{ parameters.storageAccountServiceConnection }}
- template: /eng/common/templates/jobs/build-images.yml@self
parameters:
name: Windows2025_amd64
Expand All @@ -204,7 +204,7 @@ stages:
internalProjectName: ${{ parameters.internalProjectName }}
publicProjectName: ${{ parameters.publicProjectName }}
versionsRepoRef: ${{ parameters.versionsRepoRef }}
isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }}
storageAccountServiceConnection: ${{ parameters.storageAccountServiceConnection }}
- template: /eng/common/templates/jobs/build-images.yml@self
parameters:
name: WindowsLtsc2016_amd64
Expand All @@ -222,7 +222,7 @@ stages:
publishConfig: ${{ parameters.publishConfig }}
internalProjectName: ${{ parameters.internalProjectName }}
publicProjectName: ${{ parameters.publicProjectName }}
isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }}
storageAccountServiceConnection: ${{ parameters.storageAccountServiceConnection }}

################################################################################
# Post-Build
Expand Down
10 changes: 8 additions & 2 deletions eng/common/templates/stages/dotnet/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@

parameters:
linuxAmd64Pool: ""
isInternalServicingValidation: false

# (Optional) This service connection should be an Azure Resource Manager
# service connection to a storage account that's needed during image builds.
# It can be used to build images with access to private/internal bits.
# If specified, this service connection will be used to pass a storage
# account access token as `--build-arg ACCESSTOKEN=***` to all image builds.
storageAccountServiceConnection: null

# Parameters for pre-build jobs
customGenerateMatrixInitSteps: []
Expand Down Expand Up @@ -40,7 +46,7 @@ stages:
publishConfig: ${{ parameters.publishConfig }}
internalProjectName: ${{ parameters.internalProjectName }}
publicProjectName: ${{ parameters.publicProjectName }}
isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }}
storageAccountServiceConnection: ${{ parameters.storageAccountServiceConnection }}
customGenerateMatrixInitSteps: ${{ parameters.customGenerateMatrixInitSteps }}
buildMatrixCustomBuildLegGroupArgs: ${{ parameters.buildMatrixCustomBuildLegGroupArgs }}
testMatrixCustomBuildLegGroupArgs: ${{ parameters.testMatrixCustomBuildLegGroupArgs }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

parameters:
linuxAmd64Pool: ""
isInternalServicingValidation: false

# Parameters for pre-build jobs
customGenerateMatrixInitSteps: []
Expand Down Expand Up @@ -39,7 +38,6 @@ stages:
- template: /eng/common/templates/stages/dotnet/build-and-test.yml@self
parameters:
linuxAmd64Pool: ${{ parameters.linuxAmd64Pool }}
isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }}
# Pre-build
customGenerateMatrixInitSteps: ${{ parameters.customGenerateMatrixInitSteps }}
customCopyBaseImagesInitSteps: ${{ parameters.customCopyBaseImagesInitSteps }}
Expand Down Expand Up @@ -68,7 +66,6 @@ stages:
- template: /eng/common/templates/stages/dotnet/publish.yml@self
parameters:
pool: ${{ parameters.linuxAmd64Pool }}
isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }}
customPublishInitSteps: ${{ parameters.customPublishInitSteps }}
internalProjectName: ${{ parameters.internalProjectName }}
publicProjectName: ${{ parameters.publicProjectName }}
Expand Down
2 changes: 0 additions & 2 deletions eng/common/templates/stages/dotnet/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ parameters:
publicProjectName: null
publishConfig: null
pool: ""
isInternalServicingValidation: false
isStandalonePublish: false
customPublishInitSteps: []
sourceBuildPipelineDefinitionId: ''
Expand All @@ -20,7 +19,6 @@ stages:
internalProjectName: ${{ parameters.internalProjectName }}
publicProjectName: ${{ parameters.publicProjectName }}
publishConfig: ${{ parameters.publishConfig }}
isInternalServicingValidation: ${{ parameters.isInternalServicingValidation }}
isStandalonePublish: ${{ parameters.isStandalonePublish }}
sourceBuildPipelineDefinitionId: ${{ parameters.sourceBuildPipelineDefinitionId }}
sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }}
Expand Down
84 changes: 41 additions & 43 deletions eng/common/templates/stages/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ parameters:

publishConfig: null

isInternalServicingValidation: false
isStandalonePublish: false

pool:
Expand All @@ -29,54 +28,53 @@ parameters:
# Publish Images
################################################################################
stages:
- ${{ if eq(parameters.isInternalServicingValidation, 'false') }}:
- stage: Publish
${{ if eq(parameters.isStandalonePublish, true) }}:
dependsOn: []
- stage: Publish
${{ if eq(parameters.isStandalonePublish, true) }}:
dependsOn: []
${{ else }}:
${{ if and(eq(variables['System.TeamProject'], parameters.internalProjectName), ne(variables['Build.Reason'], 'PullRequest')) }}:
dependsOn: Test
${{ else }}:
${{ if and(eq(variables['System.TeamProject'], parameters.internalProjectName), ne(variables['Build.Reason'], 'PullRequest')) }}:
dependsOn: Test
${{ else }}:
dependsOn: Post_Build
condition: "
dependsOn: Post_Build
condition: "
and(
not(canceled()),
and(
not(canceled()),
and(
contains(variables['stages'], 'publish'),
contains(variables['stages'], 'publish'),
or(
or(
and(
and(
contains(variables['stages'], 'build'),
succeeded('Post_Build')),
and(
contains(variables['stages'], 'test'),
in(dependencies.Test.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'))),
or(
and(
and(
contains(variables['stages'], 'build'),
succeeded('Post_Build')),
not(contains(variables['stages'], 'build')),
and(
contains(variables['stages'], 'test'),
in(dependencies.Test.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'))),
or(
and(
not(contains(variables['stages'], 'build')),
and(
contains(variables['stages'], 'test'),
in(dependencies.Test.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'))),
and(
not(contains(variables['stages'], 'test')),
and(
not(contains(variables['stages'], 'test')),
and(
contains(variables['stages'], 'build'),
succeeded('Post_Build'))))),
not(
or(
contains(variables['stages'], 'build'),
contains(variables['stages'], 'test'))))))"
jobs:
- template: /eng/common/templates/jobs/publish.yml@self
parameters:
pool: ${{ parameters.pool }}
internalProjectName: ${{ parameters.internalProjectName }}
publishConfig: ${{ parameters.publishConfig }}
customPublishVariables: ${{ parameters.customPublishVariables }}
customInitSteps: ${{ parameters.customPublishInitSteps }}
sourceBuildPipelineDefinitionId: ${{ parameters.sourceBuildPipelineDefinitionId }}
sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }}
versionsRepoRef: ${{ parameters.versionsRepoRef }}
versionsRepoPath: ${{ parameters.versionsRepoPath }}
overrideImageInfoCommit: ${{ parameters.overrideImageInfoCommit }}
contains(variables['stages'], 'build'),
succeeded('Post_Build'))))),
not(
or(
contains(variables['stages'], 'build'),
contains(variables['stages'], 'test'))))))"
jobs:
- template: /eng/common/templates/jobs/publish.yml@self
parameters:
pool: ${{ parameters.pool }}
internalProjectName: ${{ parameters.internalProjectName }}
publishConfig: ${{ parameters.publishConfig }}
customPublishVariables: ${{ parameters.customPublishVariables }}
customInitSteps: ${{ parameters.customPublishInitSteps }}
sourceBuildPipelineDefinitionId: ${{ parameters.sourceBuildPipelineDefinitionId }}
sourceBuildPipelineRunId: ${{ parameters.sourceBuildPipelineRunId }}
versionsRepoRef: ${{ parameters.versionsRepoRef }}
versionsRepoPath: ${{ parameters.versionsRepoPath }}
overrideImageInfoCommit: ${{ parameters.overrideImageInfoCommit }}
Loading