This commit is contained in:
MilenaHristova 2023-03-02 13:09:30 +01:00
parent 7afd483cb1
commit 55922247b0
2 changed files with 31 additions and 46 deletions

View file

@ -20,42 +20,6 @@ parameters:
default: ' ' default: ' '
jobs: jobs:
- job: Get_Build_Information
displayName: Get installer and VMR build ids
variables:
- template: /eng/common/templates/variables/pipelines.yml
steps:
- script: |
vmr_build=${{ replace(parameters.dotnetDotnetRunID, ' ', '') }}
if [[ -z "$vmr_build" ]]; then
vmr_build=$(az pipelines runs list --organization '$(AZDO_ORG)' --project '$(AZDO_PROJECT)' --pipeline-ids '$(DOTNET_DOTNET_CI_PIPELINE_ID)' --status completed --top 1 --query "[].id" --output tsv)
fi
if [[ -z "$vmr_build" ]]; then
fail "Could not find a completed vmr build"
exit 1
fi
echo "Vmr build id: '$vmr_build'"
installer_sha=$(az pipelines build tag list --organization '$(AZDO_ORG)' --project '$(AZDO_PROJECT)' --build-id $vmr_build --output tsv | sed "s,installer-,,g")
installer_build=$(az pipelines runs list --organization '$(AZDO_ORG)' --project '$(AZDO_PROJECT)' --pipeline-ids '$(INSTALLER_OFFICIAL_CI_PIPELINE_ID)' --query "[?sourceVersion == '$installer_sha'].id" --output tsv)
if [[ -z "$installer_build" ]]; then
fail "Could not find a build of installer for commit '$installer_sha'"
exit 1
fi
echo "Installer build id: '$installer_build'"
echo "##vso[task.setvariable variable=InstallerBuildId;isoutput=true]$installer_build"
echo "##vso[task.setvariable variable=VmrBuildId;isoutput=true]$vmr_build"
displayName: Get Build IDs
name: Get_Build_Ids
env:
AZURE_DEVOPS_EXT_PAT: $(System.AccessToken)
- template: templates/jobs/sdk-comparison-tests.yml - template: templates/jobs/sdk-comparison-tests.yml
parameters: parameters:
buildName: CentOSStream8_Offline buildName: CentOSStream8_Offline

View file

@ -13,22 +13,43 @@ parameters:
jobs: jobs:
- job: ${{ parameters.buildName }}_${{ parameters.architecture }} - job: ${{ parameters.buildName }}_${{ parameters.architecture }}
dependsOn: Get_Build_Information
timeoutInMinutes: 150 timeoutInMinutes: 150
pool: pool:
name: NetCore1ESPool-Svc-Internal name: NetCore1ESPool-Svc-Internal
demands: ImageOverride -equals 1es-ubuntu-2004 demands: ImageOverride -equals 1es-ubuntu-2004
variables: variables:
- template: /eng/common/templates/variables/pool-providers.yml
- template: /eng/common/templates/variables/pipelines.yml - template: /eng/common/templates/variables/pipelines.yml
- name: InstallerBuildId
value: $[ dependencies.Get_Build_Information.outputs['Get_Build_Ids.InstallerBuildId'] ]
- name: VmrBuildId
value: $[ dependencies.Get_Build_Information.outputs['Get_Build_Ids.VmrBuildId'] ]
- name: TestResultsFileName
value: ${{ parameters.buildName }}_${{ parameters.architecture }}_SDKComparisonTests.trx
steps: steps:
- script: |
vmr_build=${{ replace(parameters.dotnetDotnetRunID, ' ', '') }}
if [[ -z "$vmr_build" ]]; then
vmr_build=$(az pipelines runs list --organization '$(AZDO_ORG)' --project '$(AZDO_PROJECT)' --pipeline-ids '$(DOTNET_DOTNET_CI_PIPELINE_ID)' --status completed --top 1 --query "[].id" --output tsv)
fi
if [[ -z "$vmr_build" ]]; then
fail "Could not find a completed vmr build"
exit 1
fi
echo "Vmr build id: '$vmr_build'"
installer_sha=$(az pipelines build tag list --organization '$(AZDO_ORG)' --project '$(AZDO_PROJECT)' --build-id $vmr_build --output tsv | sed "s,installer-,,g")
installer_build=$(az pipelines runs list --organization '$(AZDO_ORG)' --project '$(AZDO_PROJECT)' --pipeline-ids '$(INSTALLER_OFFICIAL_CI_PIPELINE_ID)' --query "[?sourceVersion == '$installer_sha'].id" --output tsv)
if [[ -z "$installer_build" ]]; then
fail "Could not find a build of installer for commit '$installer_sha'"
exit 1
fi
echo "Installer build id: '$installer_build'"
echo "##vso[task.setvariable variable=InstallerBuildId]$installer_build"
echo "##vso[task.setvariable variable=VmrBuildId]$vmr_build"
displayName: Get Build IDs
name: Get_Build_Ids
env:
AZURE_DEVOPS_EXT_PAT: $(System.AccessToken)
- task: DownloadPipelineArtifact@2 - task: DownloadPipelineArtifact@2
displayName: Download MSFT SDK displayName: Download MSFT SDK
inputs: inputs:
@ -89,7 +110,7 @@ jobs:
dockerEnvArgs+=" -e SMOKE_TESTS_WARN_POISON_DIFFS=true" dockerEnvArgs+=" -e SMOKE_TESTS_WARN_POISON_DIFFS=true"
fi fi
.dotnet/dotnet test $(Build.SourcesDirectory)/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj $envArgs --logger:'trx;LogFileName=$(TestResultsFileName)' --logger:'console;verbosity=detailed' .dotnet/dotnet test $(Build.SourcesDirectory)/src/SourceBuild/content/test/Microsoft.DotNet.SourceBuild.SmokeTests/Microsoft.DotNet.SourceBuild.SmokeTests.csproj $envArgs --logger:'trx;LogFileName=$(Agent.JobName)_SDKComparisonTests.trx' --logger:'console;verbosity=detailed'
displayName: Run Tests displayName: Run Tests
workingDirectory: $(Build.SourcesDirectory) workingDirectory: $(Build.SourcesDirectory)