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

Storage/ Merge main to unblock pipeline failure #5561

Merged
merged 8 commits into from
Apr 23, 2024
2 changes: 1 addition & 1 deletion .github/workflows/event-processor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
if: ${{ github.event_name == 'issues' && github.event.action == 'opened' }}
steps:
- name: 'Az CLI login'
uses: azure/login@v1
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
Expand Down
2 changes: 2 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"AMQPS",
"amqpvalue",
"AMQPVALUE",
"ATLMFC",
"australiacentral",
"australiaeast",
"authcid",
Expand Down Expand Up @@ -206,6 +207,7 @@
"Ragrs",
"Ragzrs",
"Reconnector",
"Redist",
"rehydrated",
"Reitz",
"retriable",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ steps:
-RepoFullName $(Build.Repository.Name)
-APIViewUri $(ApiChangeDetectRequestUrl)
-ArtifactName ${{ parameters.ArtifactName }}
-DevopsProject $(System.TeamProject)
pwsh: true
displayName: Detect API changes
condition: and(succeededOrFailed(), eq(variables['Build.Reason'],'PullRequest'))
4 changes: 2 additions & 2 deletions eng/common/pipelines/templates/steps/policheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:
ExclusionFilePath: "$(Build.SourcesDirectory)/eng/guardian-tools/policheck/PolicheckExclusions.xml"

steps:
- task: AzurePowerShell@5
- task: AzurePowerShell@5
displayName: 'Download Policheck Exclusion Database'
inputs:
azureSubscription: 'Azure SDK Artifacts'
Expand All @@ -14,7 +14,7 @@ steps:
pwsh: true
Inline: |
azcopy copy "https://azuresdkartifacts.blob.core.windows.net/policheck/${{ parameters.ExclusionDataBaseFileName }}.mdb" "$(Build.BinariesDirectory)"
env:
env:
AZCOPY_AUTO_LOGIN_TYPE: 'PSCRED'

- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@2
Expand Down
2 changes: 2 additions & 0 deletions eng/common/scripts/Create-APIReview.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function Upload-SourceArtifact($filePath, $apiLabel, $releaseStatus, $packageVer
try
{
$Response = Invoke-WebRequest -Method 'POST' -Uri $uri -Body $multipartContent -Headers $headers
Write-Host "API review: $($Response.Content)"
$StatusCode = $Response.StatusCode
}
catch
Expand Down Expand Up @@ -114,6 +115,7 @@ function Upload-ReviewTokenFile($packageName, $apiLabel, $releaseStatus, $review
try
{
$Response = Invoke-WebRequest -Method 'GET' -Uri $uri -Headers $headers
Write-Host "API review: $($Response.Content)"
$StatusCode = $Response.StatusCode
}
catch
Expand Down
5 changes: 4 additions & 1 deletion eng/common/scripts/Detect-Api-Changes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Param (
[string] $APIViewUri,
[string] $RepoFullName = "",
[string] $ArtifactName = "packages",
[string] $TargetBranch = ("origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" -replace "refs/heads/")
[string] $TargetBranch = ("origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH}" -replace "refs/heads/"),
[string] $DevopsProject = "internal"
)

. (Join-Path $PSScriptRoot common.ps1)
Expand All @@ -37,6 +38,7 @@ function Submit-Request($filePath, $packageName)
$query.Add('pullRequestNumber', $PullRequestNumber)
$query.Add('packageName', $packageName)
$query.Add('language', $LanguageShort)
$query.Add('project', $DevopsProject)
$reviewFileFullName = Join-Path -Path $ArtifactPath $packageName $reviewFileName
if (Test-Path $reviewFileFullName)
{
Expand Down Expand Up @@ -87,6 +89,7 @@ function Log-Input-Params()
Write-Host "Language: $($Language)"
Write-Host "Commit SHA: $($CommitSha)"
Write-Host "Repo Name: $($RepoFullName)"
Write-Host "Project: $($DevopsProject)"
}

Log-Input-Params
Expand Down
7 changes: 6 additions & 1 deletion eng/common/scripts/Update-DevOps-Release-WorkItem.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ Write-Host "Updated or created a release work item for a package release with th
Write-Host " Lanuage: $($workItem.fields['Custom.Language'])"
Write-Host " Version: $($workItem.fields['Custom.PackageVersionMajorMinor'])"
Write-Host " Package: $($workItem.fields['Custom.Package'])"
Write-Host " AssignedTo: $($workItem.fields['System.AssignedTo']["uniqueName"])"
if ($workItem.fields['System.AssignedTo']) {
Write-Host " AssignedTo: $($workItem.fields['System.AssignedTo']["uniqueName"])"
}
else {
Write-Host " AssignedTo: unassigned"
}
Write-Host " PackageDisplayName: $($workItem.fields['Custom.PackageDisplayName'])"
Write-Host " ServiceName: $($workItem.fields['Custom.ServiceName'])"
Write-Host " PackageType: $($workItem.fields['Custom.PackageType'])"
Expand Down
4 changes: 4 additions & 0 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ jobs:
workingDirectory: $(Agent.TempDirectory)
displayName: Download and Install Doxygen

- template: /eng/pipelines/templates/steps/install-cmake.yml

- template: /eng/pipelines/templates/steps/setup-msvc.yml

- template: /eng/pipelines/templates/steps/vcpkg.yml

- template: /eng/pipelines/templates/steps/cmake-build.yml
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/templates/jobs/ci.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ jobs:

- template: /eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml

- template: /eng/pipelines/templates/steps/setup-msvc.yml

- template: /eng/pipelines/templates/steps/install-cmake.yml

- pwsh: sudo apt update && sudo apt install -y $(AptDependencies)
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/templates/jobs/cmake-generate.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ jobs:

- template: /eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml

- template: /eng/pipelines/templates/steps/setup-msvc.yml

- template: /eng/pipelines/templates/steps/install-cmake.yml

- pwsh: sudo apt update && sudo apt install -y $(AptDependencies)
Expand Down
2 changes: 2 additions & 0 deletions eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ jobs:

- template: /eng/pipelines/templates/steps/fix-1es-image-apt-azure-sources.yml

- template: /eng/pipelines/templates/steps/setup-msvc.yml

- template: /eng/pipelines/templates/steps/install-cmake.yml

# Add g++5 repo to ubuntu
Expand Down
22 changes: 4 additions & 18 deletions eng/pipelines/templates/steps/install-cmake.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This temporary fix resolves an issue with CMake and vcpkg. When Linux and
# Windows agents have a later version of CMake installed this can be removed.

parameters:
Version: '3.29.2'

Expand All @@ -9,21 +12,4 @@ steps:
&& sudo ./cmakeinstall.sh --prefix=/usr/local --exclude-subdir \
&& sudo rm cmakeinstall.sh
displayName: Install Cmake ${{ parameters.Version }} (Linux)
condition: eq(variables['Agent.OS'], 'Linux')

- pwsh: |
$tempFile = New-TemporaryFile;
systeminfo.exe /fo csv > $tempFile
$osName = (Import-Csv $tempFile).'OS Name'

Write-Host "OS Name: $osName"
if (!($osName -like '*2019*')) {
Write-Host "OS is not Windows Server 2019, skipping CMake installation"
exit 0
}

Write-Host "Installing CMake ${{ parameters.Version }}"
Invoke-WebRequest -Uri https://github.com/Kitware/CMake/releases/download/v${{ parameters.Version }}/cmake-${{ parameters.Version }}-windows-x86_64.msi -OutFile cmake.msi
msiexec.exe /i cmake.msi | Wait-Process
displayName: Install Cmake ${{ parameters.Version }} (Windows)
condition: eq(variables['Agent.OS'], 'Windows_NT')
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
21 changes: 21 additions & 0 deletions eng/pipelines/templates/steps/setup-msvc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This temporary fix resolves an issue on Win2022 machines that have multiple
# MSVC versions installed side-by-side. When this issue is resolved, remove this
# template and references:
# https://github.com/actions/runner-images/issues/9701

steps:
- pwsh: |
$tempFile = New-TemporaryFile;
systeminfo.exe /fo csv > $tempFile
$osName = (Import-Csv $tempFile).'OS Name'

Write-Host "OS Name: $osName"
if (!($osName -like '*2022*')) {
Write-Host "OS is not Windows Server 2022, skipping MSVC changes"
exit 0
}

Remove-item 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCToolsVersion.v143.default.*' -Force
Get-ChildItem 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\' -Name | Write-Host
displayName: Setup MSVC
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
2 changes: 1 addition & 1 deletion eng/pipelines/templates/variables/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variables:
- name: LINUXNEXTVMIMAGE
value: azsdk-pool-mms-ubuntu-2204-1espt
- name: WINDOWSVMIMAGE
value: 1espt-win-2022-cpp-rollback
value: azsdk-pool-mms-win-2022-1espt
- name: WINDOWSPREVIOUSVMIMAGE
value: azsdk-pool-mms-win-2019-1espt
- name: MACVMIMAGE
Expand Down
Loading