-
Notifications
You must be signed in to change notification settings - Fork 3
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
Create workload set insertion process #302
base: main
Are you sure you want to change the base?
Conversation
…ipt for publishing workload sets. Just downloading the workload assets at the moment.
…e existing one to test the script. # Conflicts: # eng/pipelines/official.yml
# Conflicts: # eng/pipelines/official.yml
…vertFrom-SecureString when passing to DARC.
…ile. # Conflicts: # global.json # workload-versions.sln
…uild properly. But, that's running into issues too.
…on set in the global.json. # Conflicts: # global.json
# Conflicts: # global.json
…ontain upstreams.
# Conflicts: # eng/common/tools.ps1
# Conflicts: # global.json # Conflicts: # NuGet.config # eng/Version.Details.xml # eng/Versions.props # eng/common/templates-official/job/job.yml # global.json
… VS drop creation. # Conflicts: # eng/pipelines/official.yml
…. This will be renamed in a future commit. Made the official.yml finally able to create the VS drops, but needs tested.
…sualStudio.Internal.MicroBuild.Vsman version. Awaiting 1ES PT update for skipUploadIfExists.
# Conflicts: # eng/Version.Details.xml # eng/Versions.props # eng/pipelines/official.yml # global.json
…ire branch name if needed.
eng/InsertVsPayload/plugin.ps1
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: remove
<Dependency Name="Microsoft.NET.Sdk.Android.Manifest-9.0.100" Version="35.0.24"> | ||
<Dependency Name="Microsoft.NET.Sdk.Android.Manifest-9.0.100" Version="35.99.0-ci.dev-pjc-msi-zip-artifact.29"> | ||
<Uri>https://github.com/dotnet/android</Uri> | ||
<Sha>4b20432d95ea8965a41cc73997e459d7fa561233</Sha> | ||
<Sha>b1501efd4a9cb8c48f58c6a099fda120841b7ec8</Sha> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: undo
<MicrosoftNETSdkAndroidManifest90100PackageVersion>35.0.24</MicrosoftNETSdkAndroidManifest90100PackageVersion> | ||
<MicrosoftNETSdkAndroidManifest90100PackageVersion>35.99.0-ci.dev-pjc-msi-zip-artifact.29</MicrosoftNETSdkAndroidManifest90100PackageVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: undo
eng/VstsDropFolder/plugin.ps1
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: remove
# $vsComponentValue = "$assemblyName.vsman{$workloadVersion}=$dropUrl," | ||
$vsComponentValue = "$assemblyName.vsman=$dropUrl," |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: switch on
# Sets the VstsDropFolder variable for the path to the MicroBuildUploadVstsDropFolder task. | ||
# Used during VS insertion to verify if the drop has been uploaded already or not. | ||
# Example: D:\a\_work\_tasks\MicroBuildUploadVstsDropFolder_4305a8de-ba66-4d8b-b2d1-0dc4ecbbf5e8\2.2.16\ | ||
- pwsh: | | ||
$tasksFolder = '$(Agent.RootDirectory)\_tasks' | ||
# The folders in _tasks are hidden. The -Force parameter allows them to be listed. | ||
$taskRootFolder = Get-ChildItem $tasksFolder -Directory -Filter 'MicroBuildUploadVstsDropFolder*' -Force | Select-Object -First 1 | ||
# Get the first version folder since the agent will only install a single version. | ||
$vstsDropFolder = ($taskRootFolder | Get-ChildItem -Directory -Force | Select-Object -First 1).FullName | ||
Write-Host "VstsDropFolder: $vstsDropFolder" | ||
Write-Host "##vso[task.setvariable variable=VstsDropFolder]$vstsDropFolder" | ||
displayName: 🟣 Set VstsDropFolder variable | ||
# - pwsh: | | ||
# $localPluginPath = '$(Build.SourcesDirectory)/eng/VstsDropFolder/plugin.ps1' | ||
# Write-Host "LocalPluginPath: $localPluginPath" | ||
# $taskPluginPath = '$(VstsDropFolder)/plugin.ps1' | ||
# Write-Host "TaskPluginPath: $taskPluginPath" | ||
# Copy-Item -Path $localPluginPath -Destination $taskPluginPath -Force | ||
# displayName: 🟣 Replace VstsDropFolder plugin.ps1 | ||
|
||
# - pwsh: | | ||
# $tasksFolder = '$(Agent.RootDirectory)\_tasks' | ||
# # The folders in _tasks are hidden. The -Force parameter allows them to be listed. | ||
# $taskRootFolder = Get-ChildItem $tasksFolder -Directory -Filter 'MicroBuildInsertVsPayload*' -Force | Select-Object -First 1 | ||
# # Get the first version folder since the agent will only install a single version. | ||
# $insertVsPayload = ($taskRootFolder | Get-ChildItem -Directory -Force | Select-Object -First 1).FullName | ||
# Write-Host "InsertVsPayload: $insertVsPayload" | ||
# Write-Host "##vso[task.setvariable variable=InsertVsPayload]$insertVsPayload" | ||
# displayName: 🟣 Set InsertVsPayload variable | ||
|
||
# - pwsh: | | ||
# $localPluginPath = '$(Build.SourcesDirectory)/eng/InsertVsPayload/plugin.ps1' | ||
# Write-Host "LocalPluginPath: $localPluginPath" | ||
# $taskPluginPath = '$(InsertVsPayload)/plugin.ps1' | ||
# Write-Host "TaskPluginPath: $taskPluginPath" | ||
# Copy-Item -Path $localPluginPath -Destination $taskPluginPath -Force | ||
# displayName: 🟣 Replace InsertVsPayload plugin.ps1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: remove when 1ES update
# Only create the drop if the workload drop directory exists, or if the drop wasn't published already. | ||
# Sets the PublishWorkloadDrop variable. See: https://stackoverflow.com/a/60630739/294804 | ||
- pwsh: >- | ||
eng/check-drop-publish.ps1 | ||
-workloadId '${{ workloadShortName }}_${{ workloadType }}' | ||
-workloadPath '$(${{ workloadShortName }}_${{ workloadType }}_dir)' | ||
-workloadName '$(${{ workloadShortName }}_${{ workloadType }}_name)' | ||
-token (ConvertTo-SecureString -String '$(dn-bot-devdiv-drop-rw-code-rw)' -AsPlainText -Force) | ||
-vstsDropFolder '$(VstsDropFolder)' | ||
displayName: 🟣 Check if ${{ workloadShortName }}_${{ workloadType }} needs published | ||
# - pwsh: | | ||
# # If the drop folder doesn't exist (not downloaded via DARC), the drop cannot be published. | ||
# if (-not (Test-Path -Path '$(${{ workloadShortName }}_${{ workloadType }}_dir)')) { | ||
# Write-Host "##vso[task.setvariable variable=PublishWorkloadDrop]False" | ||
# Write-Host 'Drop "${{ workloadShortName }}_${{ workloadType }}" was not downloaded via DARC. Skipping VS drop publish...' | ||
# return | ||
# } | ||
# Import-Module '$(VstsDropFolder)/Engineering.PowerShell.Vsts.Drop.psd1' | ||
# # Default value within: https://devdiv.visualstudio.com/Engineering/_git/MicroBuild?path=/src/Tasks/UploadDrop/task.json | ||
# $serviceUri = 'https://devdiv.artifacts.visualstudio.com' | ||
# $token = '$(dn-bot-devdiv-drop-rw-code-rw)' | ||
# $server = Get-VstsDropServer -Url $serviceUri -TraceToHost ActivityTracing -PatAuth $token | ||
# # Returns a JSON string. If the drop exists, an array with a single object is returned. If the drop does not exist, an empty array is returned. | ||
# $dropJson = $server.Client.List('$(${{ workloadShortName }}_${{ workloadType }}_name)') | ConvertFrom-Json | ||
# if ($dropJson.Count -ne 0) { | ||
# Write-Host "##vso[task.setvariable variable=PublishWorkloadDrop]False" | ||
# Write-Host 'Drop "${{ workloadShortName }}_${{ workloadType }}" has already been published. Skipping VS drop publish...' | ||
# return | ||
# } | ||
# Write-Host "PublishWorkloadDrop: True" | ||
# Write-Host "##vso[task.setvariable variable=PublishWorkloadDrop]True" | ||
# displayName: 🟣 Check if ${{ workloadShortName }}_${{ workloadType }} needs published | ||
# - pwsh: | | ||
# # If the drop folder doesn't exist (not downloaded via DARC), the drop cannot be published. | ||
# if (-not (Test-Path -Path '$(${{ workloadShortName }}_${{ workloadType }}_dir)')) { | ||
# Write-Host "##vso[task.setvariable variable=PublishWorkloadDrop]False" | ||
# Write-Host 'Drop "${{ workloadShortName }}_${{ workloadType }}" was not downloaded via DARC. Skipping VS drop publish...' | ||
# return | ||
# } | ||
# Write-Host "PublishWorkloadDrop: True" | ||
# Write-Host "##vso[task.setvariable variable=PublishWorkloadDrop]True" | ||
# displayName: 🟣 Check if ${{ workloadShortName }}_${{ workloadType }} needs published |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: consolidate when 1ES update
eng/check-drop-publish.ps1
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: might remove when 1ES update
- ***Message Matt Mitchell*** (@mmitche) for approval after requesting access to the entitlement. | ||
- Should take about 20 mins for the entitlement process to complete (will appear on your [entitlements list](https://coreidentity.microsoft.com/manage/entitlement)) and another 30 mins the access to propagate to DARC. Basically, after approval, wait an hour until you actually attempt to build. | ||
7. **TODO**: Test to see if PowerShell Core is required. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: validate or remove
<ItemGroup> | ||
<SdkAssetsToPublish Include="$(ArtifactsShippingPackagesDir)*.msi" /> | ||
<SdkAssetsToPublish Include="$(ArtifactsNonShippingPackagesDir)*.wixpack.zip" /> | ||
</ItemGroup> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't do anything. SdkAssetsToPublish
is not an item group in this repo/Arcade.
<ItemGroup> | ||
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.msi" /> | ||
<ItemsToSign Include="$(ArtifactsPackagesDir)**\*.nupkg" /> | ||
</ItemGroup> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are automatically added via Arcade as part of the publish process. If they remain here, Arcade will actually fail to sign because it'll try to double sign these files.
TODO