This commit is contained in:
Michael Cummings (MSFT) 2023-12-06 07:47:17 -05:00 коммит произвёл GitHub
Родитель 9bef443d92 10691ca38d
Коммит f30043647f
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
10 изменённых файлов: 74 добавлений и 226 удалений

Просмотреть файл

@ -35,22 +35,6 @@ parameters:
type: string type: string
jobs: jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: false
- ${{ if eq(parameters.pool, 'automatic') }}: - ${{ if eq(parameters.pool, 'automatic') }}:
- job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml - job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml
@ -72,7 +56,6 @@ jobs:
dependsOn: dependsOn:
- ${{ if eq(parameters.pool, 'automatic') }}: - ${{ if eq(parameters.pool, 'automatic') }}:
- AgentPoolSelector - AgentPoolSelector
- configure
displayName: 'Detect API changes' displayName: 'Detect API changes'
timeoutInMinutes: 1000 timeoutInMinutes: 1000
variables: variables:
@ -82,10 +65,10 @@ jobs:
AgentPoolComputed: $(CIBuildPool) AgentPoolComputed: $(CIBuildPool)
${{ if eq(parameters.pool, 'pr') }}: ${{ if eq(parameters.pool, 'pr') }}:
AgentPoolComputed: $(PRBuildPool) AgentPoolComputed: $(PRBuildPool)
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ] PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
# set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it # set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
XHARNESS_LABELS: $[ dependencies.configure.outputs['labels.xharness_labels'] ] XHARNESS_LABELS: $[ stageDependencies.configure_build.configure.outputs['labels.xharness_labels'] ]
pool: pool:
name: $(AgentPoolComputed) name: $(AgentPoolComputed)
demands: demands:
@ -113,7 +96,6 @@ jobs:
displayName: 'Upload / Publish change detection results to VSDrops / GitHub' displayName: 'Upload / Publish change detection results to VSDrops / GitHub'
timeoutInMinutes: 1000 timeoutInMinutes: 1000
dependsOn: # can start as soon as the api diff is done dependsOn: # can start as soon as the api diff is done
- configure
- api_diff - api_diff
condition: succeededOrFailed() condition: succeededOrFailed()
pool: pool:

Просмотреть файл

@ -35,22 +35,6 @@ parameters:
type: string type: string
jobs: jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: true
- ${{ if eq(parameters.pool, 'automatic') }}: - ${{ if eq(parameters.pool, 'automatic') }}:
- job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml - job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml
@ -69,20 +53,18 @@ jobs:
# This job builds the macOS tests. # This job builds the macOS tests.
# #
# - configure: Get the labels from gihub and populate the output.
# - AgentPoolSelector: If the build was not manually triggered to use a specific pool, this job is used to decide if the build is using a # - AgentPoolSelector: If the build was not manually triggered to use a specific pool, this job is used to decide if the build is using a
# private pool or a public one. # private pool or a public one.
- job: build_macos_tests_job - job: build_macos_tests_job
dependsOn: dependsOn:
- ${{ if eq(parameters.pool, 'automatic') }}: - ${{ if eq(parameters.pool, 'automatic') }}:
- AgentPoolSelector - AgentPoolSelector
- configure
displayName: 'Build macOS tests' displayName: 'Build macOS tests'
timeoutInMinutes: 120 timeoutInMinutes: 120
variables: variables:
DOTNET_PLATFORMS: $[ dependencies.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ] DOTNET_PLATFORMS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ]
ENABLE_DOTNET: $[ dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'] ] ENABLE_DOTNET: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'] ]
INCLUDE_XAMARIN_LEGACY: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_XAMARIN_LEGACY'] ] INCLUDE_XAMARIN_LEGACY: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_XAMARIN_LEGACY'] ]
${{ if eq(parameters.pool, 'automatic') }}: ${{ if eq(parameters.pool, 'automatic') }}:
AgentPoolComputed: $[ dependencies.AgentPoolSelector.outputs['setAgentPool.AgentPoolComputed'] ] AgentPoolComputed: $[ dependencies.AgentPoolSelector.outputs['setAgentPool.AgentPoolComputed'] ]
${{ if eq(parameters.pool, 'ci') }}: ${{ if eq(parameters.pool, 'ci') }}:
@ -91,11 +73,11 @@ jobs:
AgentPoolComputed: $(PRBuildPool) AgentPoolComputed: $(PRBuildPool)
# add all the variables that have been parsed by the configuration step. Could we have a less verbose way?? # add all the variables that have been parsed by the configuration step. Could we have a less verbose way??
# old and ugly env var use by jenkins, we do have parts of the code that use it, contains the PR number # old and ugly env var use by jenkins, we do have parts of the code that use it, contains the PR number
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ] PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
# set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it # set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
RUN_MAC_TESTS: $[ dependencies.configure.outputs['decisions.RUN_MAC_TESTS'] ] RUN_MAC_TESTS: $[ stageDependencies.configure_build.configure.outputs['decisions.RUN_MAC_TESTS'] ]
condition: ne(dependencies.configure.outputs['decisions.RUN_MAC_TESTS'],'') condition: ne(stageDependencies.configure_build.configure.outputs['decisions.RUN_MAC_TESTS'],'')
pool: pool:
name: $(AgentPoolComputed) name: $(AgentPoolComputed)
demands: demands:

Просмотреть файл

@ -47,23 +47,6 @@ parameters:
type: string type: string
jobs: jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: true
- ${{ if eq(parameters.pool, 'automatic') }}: - ${{ if eq(parameters.pool, 'automatic') }}:
- job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml - job: AgentPoolSelector # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases?view=azure-devops&tabs=yaml
pool: # Consider using an agentless (server) job here, but would need to host selection logic as an Azure function: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#server pool: # Consider using an agentless (server) job here, but would need to host selection logic as an Azure function: https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#server
@ -81,28 +64,26 @@ jobs:
# This job performs the build of the nuget pkgs and the framework pkgs. There are two interesting dependencies in this job: # This job performs the build of the nuget pkgs and the framework pkgs. There are two interesting dependencies in this job:
# #
# - configure: Get the labels from gihub and populate the output.
# - AgentPoolSelector: If the build was not manually triggered to use a specific pool, this job is used to decide if the build is using a # - AgentPoolSelector: If the build was not manually triggered to use a specific pool, this job is used to decide if the build is using a
# private pool or a public one. # private pool or a public one.
- job: build - job: build
dependsOn: dependsOn:
- ${{ if eq(parameters.pool, 'automatic') }}: - ${{ if eq(parameters.pool, 'automatic') }}:
- AgentPoolSelector - AgentPoolSelector
- configure
displayName: 'Build packages' displayName: 'Build packages'
timeoutInMinutes: 1000 timeoutInMinutes: 1000
variables: variables:
DOTNET_PLATFORMS: $[ dependencies.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ] DOTNET_PLATFORMS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.DOTNET_PLATFORMS'] ]
ENABLE_DOTNET: $[ dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'] ] ENABLE_DOTNET: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'] ]
INCLUDE_DOTNET_IOS: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_DOTNET_IOS'] ] INCLUDE_DOTNET_IOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_IOS'] ]
INCLUDE_DOTNET_MACCATALYST: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACCATALYST'] ] INCLUDE_DOTNET_MACCATALYST: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACCATALYST'] ]
INCLUDE_DOTNET_MACOS: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACOS'] ] INCLUDE_DOTNET_MACOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_MACOS'] ]
INCLUDE_DOTNET_TVOS: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_DOTNET_TVOS'] ] INCLUDE_DOTNET_TVOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_DOTNET_TVOS'] ]
INCLUDE_LEGACY_IOS: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_LEGACY_IOS'] ] INCLUDE_LEGACY_IOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_IOS'] ]
INCLUDE_LEGACY_MAC: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_LEGACY_MAC'] ] INCLUDE_LEGACY_MAC: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_MAC'] ]
INCLUDE_LEGACY_TVOS: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_LEGACY_TVOS'] ] INCLUDE_LEGACY_TVOS: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_TVOS'] ]
INCLUDE_LEGACY_WATCH: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_LEGACY_WATCH'] ] INCLUDE_LEGACY_WATCH: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_LEGACY_WATCH'] ]
INCLUDE_XAMARIN_LEGACY: $[ dependencies.configure.outputs['configure_platforms.INCLUDE_XAMARIN_LEGACY'] ] INCLUDE_XAMARIN_LEGACY: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.INCLUDE_XAMARIN_LEGACY'] ]
${{ if eq(parameters.pool, 'automatic') }}: ${{ if eq(parameters.pool, 'automatic') }}:
AgentPoolComputed: $[ dependencies.AgentPoolSelector.outputs['setAgentPool.AgentPoolComputed'] ] AgentPoolComputed: $[ dependencies.AgentPoolSelector.outputs['setAgentPool.AgentPoolComputed'] ]
${{ if eq(parameters.pool, 'ci') }}: ${{ if eq(parameters.pool, 'ci') }}:
@ -116,18 +97,18 @@ jobs:
# skip-nugets # skip-nugets
# skip-signing # skip-signing
# run-sample-tests # run-sample-tests
BuildPackage: $[ dependencies.configure.outputs['labels.build_package'] ] BuildPackage: $[ stageDependencies.configure_build.configure.outputs['labels.build_package'] ]
SkipPackages: $[ dependencies.configure.outputs['labels.skip_packages'] ] SkipPackages: $[ stageDependencies.configure_build.configure.outputs['labels.skip_packages'] ]
SkipNugets: $[ dependencies.configure.outputs['labels.skip_nugets'] ] SkipNugets: $[ stageDependencies.configure_build.configure.outputs['labels.skip_nugets'] ]
SkipSigning: $[ dependencies.configure.outputs['labels.skip_signing'] ] SkipSigning: $[ stageDependencies.configure_build.configure.outputs['labels.skip_signing'] ]
RunSampleTests: $[ dependencies.configure.outputs['labels.run_sample_tests'] ] RunSampleTests: $[ stageDependencies.configure_build.configure.outputs['labels.run_sample_tests'] ]
SkipApiComparison: $[ dependencies.configure.outputs['labels.skip_api_comparison'] ] SkipApiComparison: $[ stageDependencies.configure_build.configure.outputs['labels.skip_api_comparison'] ]
# old and ugly env var use by jenkins, we do have parts of the code that use it, contains the PR number # old and ugly env var use by jenkins, we do have parts of the code that use it, contains the PR number
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ] PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
# set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it # set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
XHARNESS_LABELS: $[ dependencies.configure.outputs['labels.xharness_labels'] ] XHARNESS_LABELS: $[ stageDependencies.configure_build.configure.outputs['labels.xharness_labels'] ]
RUN_MAC_TESTS: $[ dependencies.configure.outputs['decisions.RUN_MAC_TESTS'] ] RUN_MAC_TESTS: $[ stageDependencies.configure_build.configure.outputs['decisions.RUN_MAC_TESTS'] ]
pool: pool:
name: $(AgentPoolComputed) name: $(AgentPoolComputed)
demands: demands:

Просмотреть файл

@ -40,31 +40,11 @@ stages:
displayName: ${{ parameters.displayName }} displayName: ${{ parameters.displayName }}
dependsOn: dependsOn:
- build_macos_tests - build_macos_tests
condition: and(succeeded(), eq(dependencies.build_macos_tests.outputs['configure.decisions.RUN_MAC_TESTS'], 'true'))
variables: variables:
GITHUB_FAILURE_COMMENT_FILE: $(System.DefaultWorkingDirectory)/github-comment-file.md GITHUB_FAILURE_COMMENT_FILE: $(System.DefaultWorkingDirectory)/github-comment-file.md
jobs: jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: false
- job: run_tests - job: run_tests
dependsOn:
- configure
displayName: 'macOS tests' displayName: 'macOS tests'
timeoutInMinutes: 1000 timeoutInMinutes: 1000
workspace: workspace:
@ -78,7 +58,7 @@ stages:
vmImage: ${{ parameters.macPool }} vmImage: ${{ parameters.macPool }}
variables: variables:
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ] PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
GIT_HASH: $[ stageDependencies.build_macos_tests.build.outputs['fix_commit.GIT_HASH'] ] GIT_HASH: $[ stageDependencies.build_macos_tests.build.outputs['fix_commit.GIT_HASH'] ]
steps: steps:

Просмотреть файл

@ -175,13 +175,33 @@ stages:
steps: steps:
- template: ./common/clean.yml - template: ./common/clean.yml
- stage: configure_build
- stage: build_packages displayName: '${{ parameters.stageDisplayNamePrefix }}Configure'
displayName: '${{ parameters.stageDisplayNamePrefix }}Build'
dependsOn: ${{ parameters.dependsOn }} dependsOn: ${{ parameters.dependsOn }}
${{ if and(ne(parameters.dependsOn, ''), ne(parameters.dependsOnResult, '')) }}: ${{ if and(ne(parameters.dependsOn, ''), ne(parameters.dependsOnResult, '')) }}:
condition: eq(dependencies.${{ parameters.dependsOn }}.result, '${{ parameters.dependsOnResult }}') condition: eq(dependencies.${{ parameters.dependsOn }}.result, '${{ parameters.dependsOnResult }}')
jobs: jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: true
- stage: build_packages
displayName: '${{ parameters.stageDisplayNamePrefix }}Build'
dependsOn: [ configure_build ]
jobs:
- template: ./build/build-stage.yml - template: ./build/build-stage.yml
parameters: parameters:
xcodeChannel: ${{ parameters.xcodeChannel }} xcodeChannel: ${{ parameters.xcodeChannel }}
@ -200,9 +220,7 @@ stages:
- stage: build_macos_tests - stage: build_macos_tests
displayName: '${{ parameters.stageDisplayNamePrefix }}Build macOS tests' displayName: '${{ parameters.stageDisplayNamePrefix }}Build macOS tests'
dependsOn: ${{ parameters.dependsOn }} dependsOn: [ configure_build ]
${{ if and(ne(parameters.dependsOn, ''), ne(parameters.dependsOnResult, '')) }}:
condition: eq(dependencies.${{ parameters.dependsOn }}.result, '${{ parameters.dependsOnResult }}')
jobs: jobs:
- template: ./build/build-mac-tests-stage.yml - template: ./build/build-mac-tests-stage.yml
parameters: parameters:
@ -222,6 +240,7 @@ stages:
condition: and(eq(dependencies.build_packages.result, 'Succeeded'), eq('${{ parameters.enableLegacySigning }}', true)) condition: and(eq(dependencies.build_packages.result, 'Succeeded'), eq('${{ parameters.enableLegacySigning }}', true))
dependsOn: dependsOn:
- build_packages - build_packages
- configure_build
jobs: jobs:
- template: ./sign-and-notarized/prepare-pkg-stage.yml - template: ./sign-and-notarized/prepare-pkg-stage.yml
parameters: parameters:
@ -251,7 +270,7 @@ stages:
}} }}
: - template: ./release/vs-insertion-prep.yml : - template: ./release/vs-insertion-prep.yml
parameters: parameters:
dependsOn: build_packages dependsOn: [ build_packages, configure_build ]
stageDisplayNamePrefix: ${{ parameters.stageDisplayNamePrefix }} stageDisplayNamePrefix: ${{ parameters.stageDisplayNamePrefix }}
isPR: ${{ parameters.isPR }} isPR: ${{ parameters.isPR }}
repositoryAlias: ${{ parameters.repositoryAlias }} repositoryAlias: ${{ parameters.repositoryAlias }}
@ -263,6 +282,7 @@ stages:
condition: and(eq(dependencies.prepare_packages_legacy.result, 'Succeeded'), eq('${{ parameters.enableLegacySigning }}', true)) condition: and(eq(dependencies.prepare_packages_legacy.result, 'Succeeded'), eq('${{ parameters.enableLegacySigning }}', true))
dependsOn: dependsOn:
- prepare_packages_legacy - prepare_packages_legacy
- configure_build
jobs: jobs:
- template: ./sign-and-notarized/funnel.yml - template: ./sign-and-notarized/funnel.yml
parameters: parameters:
@ -278,9 +298,7 @@ stages:
- ${{ if eq(parameters.enableAPIDiff, true) }}: - ${{ if eq(parameters.enableAPIDiff, true) }}:
- stage: generate_api_diff - stage: generate_api_diff
displayName: '${{ parameters.stageDisplayNamePrefix }}API diff' displayName: '${{ parameters.stageDisplayNamePrefix }}API diff'
dependsOn: ${{ parameters.dependsOn }} dependsOn: [ configure_build ]
${{ if and(ne(parameters.dependsOn, ''), ne(parameters.dependsOnResult, '')) }}:
condition: eq(dependencies.${{ parameters.dependsOn }}.result, '${{ parameters.dependsOnResult }}')
jobs: jobs:
- template: ./build/api-diff-stage.yml - template: ./build/api-diff-stage.yml
parameters: parameters:

Просмотреть файл

@ -42,23 +42,6 @@ stages:
condition: eq(${{ parameters.isPR }}, false) condition: eq(${{ parameters.isPR }}, false)
jobs: jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: false
# Check - "xamarin-macios (Prepare Release Sign NuGets)" # Check - "xamarin-macios (Prepare Release Sign NuGets)"
- template: sign-artifacts/jobs/v2.yml@yaml-templates - template: sign-artifacts/jobs/v2.yml@yaml-templates
parameters: parameters:
@ -66,7 +49,7 @@ stages:
artifactName: '${{ parameters.uploadPrefix }}not-signed-package' artifactName: '${{ parameters.uploadPrefix }}not-signed-package'
signType: Real signType: Real
usePipelineArtifactTasks: true usePipelineArtifactTasks: true
condition: "ne(dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')" condition: "ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')"
dependsOn: configure dependsOn: configure
# Check - "xamarin-macios (Prepare Release Convert NuGet to MSI)" # Check - "xamarin-macios (Prepare Release Convert NuGet to MSI)"
@ -82,7 +65,7 @@ stages:
binlogsArtifactName: ${{ parameters.uploadPrefix }}nuget-msi-convert-binlogs binlogsArtifactName: ${{ parameters.uploadPrefix }}nuget-msi-convert-binlogs
signType: Real signType: Real
useDateTimeVersion: true useDateTimeVersion: true
condition: "ne(dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')" condition: "ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')"
postConvertSteps: postConvertSteps:
- task: DownloadPipelineArtifact@2 - task: DownloadPipelineArtifact@2
inputs: inputs:
@ -105,7 +88,7 @@ stages:
- job: push_signed_nugets - job: push_signed_nugets
displayName: Push NuGets displayName: Push NuGets
dependsOn: nuget_convert dependsOn: nuget_convert
condition: "ne(dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')" condition: "ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')"
variables: variables:
skipNugetSecurityAnalysis: true skipNugetSecurityAnalysis: true
pool: pool:

Просмотреть файл

@ -25,25 +25,7 @@ parameters:
default: '$(MaciosUploadPrefix)' default: '$(MaciosUploadPrefix)'
jobs: jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
- job: funnel_job - job: funnel_job
dependsOn:
- configure
displayName: 'Collect signed artifacts' displayName: 'Collect signed artifacts'
condition: and(not(failed()), not(canceled())) # default is succeded(), but that fails if there are any skipped jobs, so change the condition to !failed && !cancelled condition: and(not(failed()), not(canceled())) # default is succeded(), but that fails if there are any skipped jobs, so change the condition to !failed && !cancelled
timeoutInMinutes: 1000 timeoutInMinutes: 1000
@ -53,7 +35,7 @@ jobs:
clean: all clean: all
variables: variables:
${{ each pkg in parameters.packages }}: ${{ each pkg in parameters.packages }}:
${{ pkg.conditionVariable }}: $[ dependencies.configure.outputs['configure_platforms.${{ pkg.conditionVariable }}'] ] ${{ pkg.conditionVariable }}: $[ stageDependencies.configure_build.configure.outputs['configure_platforms.${{ pkg.conditionVariable }}'] ]
steps: steps:
@ -168,7 +150,7 @@ jobs:
variables: variables:
Parameters.outputStorageUri: '' Parameters.outputStorageUri: ''
SKIP_NUGETS: $[ dependencies.configure.outputs['labels.skip_nugets'] ] SKIP_NUGETS: $[ stageDependencies.configure_build.configuree.outputs['labels.skip_nugets'] ]
pool: pool:
name: azurepipelines-EO name: azurepipelines-EO
@ -190,11 +172,10 @@ jobs:
displayName: 'Publish GitHub Comment - Artifacts' displayName: 'Publish GitHub Comment - Artifacts'
timeoutInMinutes: 1000 timeoutInMinutes: 1000
dependsOn: dependsOn:
- configure
- upload_azure_blob - upload_azure_blob
condition: succeededOrFailed() condition: succeededOrFailed()
variables: variables:
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ] PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
TESTS_BOT: $[ stageDependencies.build_packages.build.outputs['build.TESTS_BOT'] ] # we build in a diff bot than the ones used for the comments TESTS_BOT: $[ stageDependencies.build_packages.build.outputs['build.TESTS_BOT'] ] # we build in a diff bot than the ones used for the comments
GIT_HASH: $[ stageDependencies.build_packages.build.outputs['fix_commit.GIT_HASH'] ] GIT_HASH: $[ stageDependencies.build_packages.build.outputs['fix_commit.GIT_HASH'] ]
pool: pool:

Просмотреть файл

@ -27,28 +27,11 @@ parameters:
default: [] default: []
jobs: jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
- ${{ each pkg in parameters.packages }}: - ${{ each pkg in parameters.packages }}:
- job: ${{ pkg.job }} - job: ${{ pkg.job }}
dependsOn: dependsOn:
- configure
displayName: 'Sign & Notarize ${{ pkg.name }}' displayName: 'Sign & Notarize ${{ pkg.name }}'
condition: ne(dependencies.configure.outputs['configure_platforms.${{ pkg.conditionVariable }}'],'') condition: ne(stageDependencies.configure_build.configure.outputs['configure_platforms.${{ pkg.conditionVariable }}'],'')
timeoutInMinutes: 1000 timeoutInMinutes: 1000
pool: pool:
vmImage: internal-macos-11 vmImage: internal-macos-11

Просмотреть файл

@ -91,42 +91,22 @@ stages:
displayName: ${{ parameters.displayName }} displayName: ${{ parameters.displayName }}
dependsOn: dependsOn:
- build_packages - build_packages
- configure_build
# we need to have the pkgs built and the device sets to be ran, that is decided via the labels or type of build during the build_packages stage # we need to have the pkgs built and the device sets to be ran, that is decided via the labels or type of build during the build_packages stage
condition: and(succeeded(), ${{ parameters.condition }}) condition: and(succeeded(), ${{ parameters.condition }})
jobs: jobs:
- ${{ if eq(parameters.parseLabels, true) }}:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: false
- job: "tests" - job: "tests"
${{ if eq(parameters.parseLabels, true) }}: ${{ if eq(parameters.parseLabels, true) }}:
condition: ne(dependencies.configure.outputs['labels.skip_all_tests'], 'True') condition: ne(stageDependencies.configure_build.configure.outputs['labels.skip_all_tests'], 'True')
dependsOn:
- ${{ if eq(parameters.parseLabels, true) }}:
- configure
displayName: 'Running tests:' displayName: 'Running tests:'
timeoutInMinutes: 1000 timeoutInMinutes: 1000
variables: variables:
# old and ugly env var use by jenkins, we do have parts of the code that use it, contains the PR number # old and ugly env var use by jenkins, we do have parts of the code that use it, contains the PR number
PR_ID: $[ dependencies.configure.outputs['labels.pr_number'] ] PR_ID: $[ stageDependencies.configure_build.configure.outputs['labels.pr_number'] ]
# set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it # set the branch variable name, this is required by jenkins and we have a lot of scripts that depend on it
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ] BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
XHARNESS_LABELS: $[ dependencies.configure.outputs['labels.xharness_labels'] ] XHARNESS_LABELS: $[ stageDependencies.configure_build.configure.outputs['labels.xharness_labels'] ]
${{ if eq(parameters.testPool, '') }}: ${{ if eq(parameters.testPool, '') }}:
AgentPoolComputed: $(PRBuildPool) AgentPoolComputed: $(PRBuildPool)
${{ else }}: ${{ else }}:
@ -169,15 +149,13 @@ stages:
- job: publish_test_results - job: publish_test_results
${{ if eq(parameters.parseLabels, true) }}: ${{ if eq(parameters.parseLabels, true) }}:
condition: and(ne(dependencies.configure.outputs['labels.skip_all_tests'], 'True'), succeededOrFailed()) condition: and(ne(stageDependencies.configure_build.configure.outputs['labels.skip_all_tests'], 'True'), succeededOrFailed())
${{ else }}: ${{ else }}:
condition: succeededOrFailed() condition: succeededOrFailed()
displayName: 'GitHub comment - Publish results' displayName: 'GitHub comment - Publish results'
timeoutInMinutes: 1000 timeoutInMinutes: 1000
dependsOn: # has to wait for the tests to be done AND the data to be uploaded dependsOn: # has to wait for the tests to be done AND the data to be uploaded
- tests - tests
- ${{ if eq(parameters.parseLabels, true) }}:
- configure
variables: variables:
GIT_HASH: $[ stageDependencies.build_packages.build.outputs['fix_commit.GIT_HASH'] ] GIT_HASH: $[ stageDependencies.build_packages.build.outputs['fix_commit.GIT_HASH'] ]
${{ each label in parameters.simTestsConfigurations }}: ${{ each label in parameters.simTestsConfigurations }}:
@ -202,13 +180,11 @@ stages:
- job: publish_skipped_tests - job: publish_skipped_tests
${{ if eq(parameters.parseLabels, true) }}: ${{ if eq(parameters.parseLabels, true) }}:
condition: eq(dependencies.configure.outputs['labels.skip_all_tests'], 'True') condition: eq(stageDependencies.configure_build.configure.outputs['labels.skip_all_tests'], 'True')
${{ else }}: ${{ else }}:
condition: false condition: false
displayName: 'GitHub comment - Skipped tests' displayName: 'GitHub comment - Skipped tests'
timeoutInMinutes: 1000 timeoutInMinutes: 1000
dependsOn: # has to wait for the tests to be done AND the data to be uploaded
- configure
variables: variables:
GIT_HASH: $[ stageDependencies.build_packages.build.outputs['fix_commit.GIT_HASH'] ] GIT_HASH: $[ stageDependencies.build_packages.build.outputs['fix_commit.GIT_HASH'] ]

Просмотреть файл

@ -37,32 +37,15 @@ stages:
displayName: ${{ parameters.displayName }} displayName: ${{ parameters.displayName }}
dependsOn: dependsOn:
- build_packages - build_packages
condition: and(succeeded(), eq(dependencies.build_packages.outputs['configure.decisions.RUN_WINDOWS_TESTS'], 'true')) - configure_build
condition: and(succeeded(), eq(dependencies.configure_build.outputs['configure.decisions.RUN_WINDOWS_TESTS'], 'true'))
jobs: jobs:
- job: configure
displayName: 'Configure build'
pool:
vmImage: windows-latest
variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
BRANCH_NAME: $[ replace(variables['Build.SourceBranch'], 'refs/heads/', '') ]
steps:
- template: ../common/configure.yml
parameters:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
uploadArtifacts: false
- job: mac_reservation - job: mac_reservation
dependsOn: dependsOn:
- configure
displayName: "Reserve bot for tests" displayName: "Reserve bot for tests"
timeoutInMinutes: 1000 timeoutInMinutes: 1000
condition: ne(dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'],'') condition: ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')
workspace: workspace:
clean: all clean: all
pool: pool:
@ -81,10 +64,9 @@ stages:
- job: run_tests - job: run_tests
dependsOn: dependsOn:
- mac_reservation - mac_reservation
- configure
displayName: 'Dotnet tests' displayName: 'Dotnet tests'
timeoutInMinutes: 1000 timeoutInMinutes: 1000
condition: ne(dependencies.configure.outputs['configure_platforms.ENABLE_DOTNET'],'') condition: ne(stageDependencies.configure_build.configure.outputs['configure_platforms.ENABLE_DOTNET'],'')
workspace: workspace:
clean: all clean: all