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

Move scripts from azp to tools #325

Merged
merged 3 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Move artifacts and variables scripts to tools
  • Loading branch information
AArnott committed Dec 24, 2024
commit abbd6b001e55897f9922dd90ddce51b8ad6bb818
2 changes: 1 addition & 1 deletion .github/actions/publish-artifacts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
using: composite
steps:
- name: 📥 Collect artifacts
run: azure-pipelines/artifacts/_stage_all.ps1
run: tools/artifacts/_stage_all.ps1
shell: pwsh
if: always()

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
}
shell: pwsh
- name: ⚙️ Set pipeline variables based on source
run: azure-pipelines/variables/_pipelines.ps1
run: azure-pipelines/define_variables.ps1
shell: pwsh
- name: 🛠 build
run: dotnet build -t:build,pack --no-restore -c ${{ env.BUILDCONFIGURATION }} -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904 /bl:"${{ runner.temp }}/_artifacts/build_logs/build.binlog"
Expand All @@ -58,7 +58,7 @@ jobs:
run: dotnet docfx docfx/docfx.json --warningsAsErrors --disableGitFeatures
if: runner.os == 'Linux'
- name: ⚙ Update pipeline variables based on build outputs
run: azure-pipelines/variables/_pipelines.ps1
run: azure-pipelines/define_variables.ps1
shell: pwsh
- name: 📢 Publish artifacts
uses: ./.github/actions/publish-artifacts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
param (
)

(& "$PSScriptRoot\_all.ps1").GetEnumerator() |% {
(& "$PSScriptRoot\..\tools\variables\_all.ps1").GetEnumerator() |% {
# Always use ALL CAPS for env var names since Azure Pipelines converts variable names to all caps and on non-Windows OS, env vars are case sensitive.
$keyCaps = $_.Key.ToUpper()
if ((Test-Path "env:$keyCaps") -and (Get-Content "env:$keyCaps")) {
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ steps:
displayName: 🧪 dotnet test
condition: and(succeeded(), ${{ parameters.RunTests }})

- powershell: azure-pipelines/variables/_pipelines.ps1
- powershell: azure-pipelines/define_variables.ps1
failOnStderr: true
displayName: ⚙ Update pipeline variables based on build outputs
condition: succeededOrFailed()

- powershell: azure-pipelines/artifacts/_pipelines.ps1 -ArtifactNameSuffix "-$(Agent.JobName)" -Verbose
- powershell: azure-pipelines/publish_artifacts.ps1 -ArtifactNameSuffix "-$(Agent.JobName)" -Verbose
failOnStderr: true
displayName: 📢 Publish artifacts
condition: succeededOrFailed()
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/install-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ steps:
}
displayName: ⚙ Install prerequisites

- powershell: azure-pipelines/variables/_pipelines.ps1
- powershell: azure-pipelines/define_variables.ps1
failOnStderr: true
displayName: ⚙ Set pipeline variables based on source
name: SetPipelineVariables
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Function Test-ArtifactUploaded($artifactName) {
Test-Path "env:$varName"
}

& "$PSScriptRoot/_stage_all.ps1" -ArtifactNameSuffix $ArtifactNameSuffix -AvoidSymbolicLinks:$AvoidSymbolicLinks |% {
& "$PSScriptRoot/../tools/artifacts/_stage_all.ps1" -ArtifactNameSuffix $ArtifactNameSuffix -AvoidSymbolicLinks:$AvoidSymbolicLinks |% {
# Set a variable which will out-live this script so that a subsequent attempt to collect and upload artifacts
# will skip this one from a check in the _all.ps1 script.
Set-PipelineVariable "ARTIFACTSTAGED_$($_.Name.ToUpper())" 'true'
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tools/Install-DotNetSdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if (!(Test-Path $DotNetInstallScriptRoot)) { New-Item -ItemType Directory -Path
$DotNetInstallScriptRoot = Resolve-Path $DotNetInstallScriptRoot

# Look up actual required .NET SDK version from global.json
$sdkVersion = & "$PSScriptRoot/../azure-pipelines/variables/DotNetSdkVersion.ps1"
$sdkVersion = & "$PSScriptRoot/variables/DotNetSdkVersion.ps1"

If ($IncludeX86 -and ($IsMacOS -or $IsLinux)) {
Write-Verbose "Ignoring -IncludeX86 switch because 32-bit runtimes are only supported on Windows."
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.