Skip to content

Commit

Permalink
Move scripts that apply to github workflows from azp to tools
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Dec 24, 2024
1 parent aa130d0 commit 8870497
Show file tree
Hide file tree
Showing 18 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- 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"
- name: 🧪 test
run: azure-pipelines/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }}
run: tools/dotnet-test-cloud.ps1 -Configuration ${{ env.BUILDCONFIGURATION }} -Agent ${{ runner.os }}
shell: pwsh
- name: 💅🏻 Verify formatted code
run: dotnet format --verify-no-changes --no-restore
Expand All @@ -64,7 +64,7 @@ jobs:
uses: ./.github/actions/publish-artifacts
if: cancelled() == false
- name: 📢 Publish code coverage results to codecov.io
run: ./azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}"
run: ./tools/publish-CodeCov.ps1 -CodeCovToken "${{ env.codecov_token }}" -PathToCodeCoverage "${{ runner.temp }}/_artifacts/coverageResults" -Name "${{ runner.os }} Coverage Results" -Flags "${{ runner.os }}"
shell: pwsh
timeout-minutes: 3
continue-on-error: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/libtemplate-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
id: merge
shell: pwsh
run: |
$LibTemplateBranch = & ./azure-pipelines/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated
$LibTemplateBranch = & ./tools/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/artifacts/_stage_all.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ param (
[switch]$AvoidSymbolicLinks
)

$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal
$ArtifactStagingFolder = & "$PSScriptRoot/../../tools/Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal

function Create-SymbolicLink {
param (
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/artifacts/build_logs.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1"
$ArtifactStagingFolder = & "$PSScriptRoot/../../tools/Get-ArtifactsStagingDirectory.ps1"

if (!(Test-Path $ArtifactStagingFolder/build_logs)) { return }

Expand Down
6 changes: 3 additions & 3 deletions azure-pipelines/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ steps:
- script: dotnet build -t:build,pack --no-restore -c $(BuildConfiguration) -warnAsError -warnNotAsError:NU1901,NU1902,NU1903,NU1904 /bl:"$(Build.ArtifactStagingDirectory)/build_logs/build.binlog"
displayName: 🛠 dotnet build

- powershell: azure-pipelines/dotnet-test-cloud.ps1 -Configuration $(BuildConfiguration) -Agent $(Agent.JobName) -PublishResults
- powershell: tools/dotnet-test-cloud.ps1 -Configuration $(BuildConfiguration) -Agent $(Agent.JobName) -PublishResults
displayName: 🧪 dotnet test
condition: and(succeeded(), ${{ parameters.RunTests }})

Expand All @@ -22,9 +22,9 @@ steps:

- ${{ if and(ne(variables['codecov_token'], ''), parameters.RunTests) }}:
- powershell: |
$ArtifactStagingFolder = & "azure-pipelines/Get-ArtifactsStagingDirectory.ps1"
$ArtifactStagingFolder = & "tools/Get-ArtifactsStagingDirectory.ps1"
$CoverageResultsFolder = Join-Path $ArtifactStagingFolder "coverageResults-$(Agent.JobName)"
azure-pipelines/publish-CodeCov.ps1 -CodeCovToken "$(codecov_token)" -PathToCodeCoverage "$CoverageResultsFolder" -Name "$(Agent.JobName) Coverage Results" -Flags "$(Agent.JobName)"
tools/publish-CodeCov.ps1 -CodeCovToken "$(codecov_token)" -PathToCodeCoverage "$CoverageResultsFolder" -Name "$(Agent.JobName) Coverage Results" -Flags "$(Agent.JobName)"
displayName: 📢 Publish code coverage results to codecov.io
timeoutInMinutes: 3
continueOnError: true
2 changes: 1 addition & 1 deletion azure-pipelines/libtemplate-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ stages:
fetchDepth: 0
clean: true
- pwsh: |
$LibTemplateBranch = & ./azure-pipelines/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated
$LibTemplateBranch = & ./tools/Get-LibTemplateBasis.ps1 -ErrorIfNotRelated
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Expand Down
2 changes: 1 addition & 1 deletion init.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if (!$NoPrerequisites) {
# The procdump tool and env var is required for dotnet test to collect hang/crash dumps of tests.
# But it only works on Windows.
if ($env:OS -eq 'Windows_NT') {
$EnvVars['PROCDUMP_PATH'] = & "$PSScriptRoot\azure-pipelines\Get-ProcDump.ps1"
$EnvVars['PROCDUMP_PATH'] = & "$PSScriptRoot\tools\Get-ProcDump.ps1"
}
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tools/Install-NuGetCredProvider.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Param (

$envVars = @{}

$toolsPath = & "$PSScriptRoot\..\azure-pipelines\Get-TempToolsPath.ps1"
$toolsPath = & "$PSScriptRoot\Get-TempToolsPath.ps1"

if ($IsMacOS -or $IsLinux) {
$installerScript = "installcredprovider.sh"
Expand Down
2 changes: 1 addition & 1 deletion tools/MergeFrom-Template.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Function Spawn-Tool($command, $commandArgs, $workingDirectory, $allowFailures) {
}
}

$remoteBranch = & $PSScriptRoot\..\azure-pipelines\Get-LibTemplateBasis.ps1 -ErrorIfNotRelated
$remoteBranch = & $PSScriptRoot\Get-LibTemplateBasis.ps1 -ErrorIfNotRelated
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8870497

Please sign in to comment.