diff --git a/.github/actions/publish-artifacts/action.yaml b/.github/actions/publish-artifacts/action.yaml index 94b742613..228b6404d 100644 --- a/.github/actions/publish-artifacts/action.yaml +++ b/.github/actions/publish-artifacts/action.yaml @@ -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() diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58e56ccc0..e6ffd3019 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,12 +43,12 @@ 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" - 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 @@ -58,13 +58,13 @@ 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 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 diff --git a/.github/workflows/libtemplate-update.yml b/.github/workflows/libtemplate-update.yml index f78c7e08c..c6b8fb4ab 100644 --- a/.github/workflows/libtemplate-update.yml +++ b/.github/workflows/libtemplate-update.yml @@ -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 } diff --git a/azure-pipelines/variables/_pipelines.ps1 b/azure-pipelines/define_variables.ps1 similarity index 95% rename from azure-pipelines/variables/_pipelines.ps1 rename to azure-pipelines/define_variables.ps1 index d40e5cf14..9cf362860 100644 --- a/azure-pipelines/variables/_pipelines.ps1 +++ b/azure-pipelines/define_variables.ps1 @@ -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")) { diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml index 2444928fb..f09422388 100644 --- a/azure-pipelines/dotnet.yml +++ b/azure-pipelines/dotnet.yml @@ -6,25 +6,25 @@ 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 }}) -- 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() - ${{ 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 diff --git a/azure-pipelines/install-dependencies.yml b/azure-pipelines/install-dependencies.yml index 817826689..ce88b25ef 100644 --- a/azure-pipelines/install-dependencies.yml +++ b/azure-pipelines/install-dependencies.yml @@ -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 diff --git a/azure-pipelines/justnugetorg.nuget.config b/azure-pipelines/justnugetorg.nuget.config deleted file mode 100644 index 765346e53..000000000 --- a/azure-pipelines/justnugetorg.nuget.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/azure-pipelines/libtemplate-update.yml b/azure-pipelines/libtemplate-update.yml index 87302b067..fdfa1df54 100644 --- a/azure-pipelines/libtemplate-update.yml +++ b/azure-pipelines/libtemplate-update.yml @@ -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 } diff --git a/azure-pipelines/artifacts/_pipelines.ps1 b/azure-pipelines/publish_artifacts.ps1 similarity index 92% rename from azure-pipelines/artifacts/_pipelines.ps1 rename to azure-pipelines/publish_artifacts.ps1 index 5f259a512..3f35cc6e1 100644 --- a/azure-pipelines/artifacts/_pipelines.ps1 +++ b/azure-pipelines/publish_artifacts.ps1 @@ -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' diff --git a/init.ps1 b/init.ps1 index e28498553..b4004e792 100755 --- a/init.ps1 +++ b/init.ps1 @@ -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" } } diff --git a/azure-pipelines/Get-ArtifactsStagingDirectory.ps1 b/tools/Get-ArtifactsStagingDirectory.ps1 similarity index 100% rename from azure-pipelines/Get-ArtifactsStagingDirectory.ps1 rename to tools/Get-ArtifactsStagingDirectory.ps1 diff --git a/azure-pipelines/Get-CodeCovTool.ps1 b/tools/Get-CodeCovTool.ps1 similarity index 100% rename from azure-pipelines/Get-CodeCovTool.ps1 rename to tools/Get-CodeCovTool.ps1 diff --git a/azure-pipelines/Get-LibTemplateBasis.ps1 b/tools/Get-LibTemplateBasis.ps1 similarity index 100% rename from azure-pipelines/Get-LibTemplateBasis.ps1 rename to tools/Get-LibTemplateBasis.ps1 diff --git a/azure-pipelines/Get-NuGetTool.ps1 b/tools/Get-NuGetTool.ps1 similarity index 100% rename from azure-pipelines/Get-NuGetTool.ps1 rename to tools/Get-NuGetTool.ps1 diff --git a/azure-pipelines/Get-ProcDump.ps1 b/tools/Get-ProcDump.ps1 similarity index 100% rename from azure-pipelines/Get-ProcDump.ps1 rename to tools/Get-ProcDump.ps1 diff --git a/azure-pipelines/Get-SymbolFiles.ps1 b/tools/Get-SymbolFiles.ps1 similarity index 100% rename from azure-pipelines/Get-SymbolFiles.ps1 rename to tools/Get-SymbolFiles.ps1 diff --git a/azure-pipelines/Get-TempToolsPath.ps1 b/tools/Get-TempToolsPath.ps1 similarity index 100% rename from azure-pipelines/Get-TempToolsPath.ps1 rename to tools/Get-TempToolsPath.ps1 diff --git a/tools/Install-DotNetSdk.ps1 b/tools/Install-DotNetSdk.ps1 index ffb522030..e08571bc7 100644 --- a/tools/Install-DotNetSdk.ps1 +++ b/tools/Install-DotNetSdk.ps1 @@ -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." diff --git a/tools/Install-NuGetCredProvider.ps1 b/tools/Install-NuGetCredProvider.ps1 index 2b904e33e..b776f56d9 100755 --- a/tools/Install-NuGetCredProvider.ps1 +++ b/tools/Install-NuGetCredProvider.ps1 @@ -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" diff --git a/tools/MergeFrom-Template.ps1 b/tools/MergeFrom-Template.ps1 index 3f721c6ac..240a57097 100644 --- a/tools/MergeFrom-Template.ps1 +++ b/tools/MergeFrom-Template.ps1 @@ -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 } diff --git a/azure-pipelines/artifacts/Variables.ps1 b/tools/artifacts/Variables.ps1 similarity index 100% rename from azure-pipelines/artifacts/Variables.ps1 rename to tools/artifacts/Variables.ps1 diff --git a/azure-pipelines/artifacts/_all.ps1 b/tools/artifacts/_all.ps1 old mode 100755 new mode 100644 similarity index 100% rename from azure-pipelines/artifacts/_all.ps1 rename to tools/artifacts/_all.ps1 diff --git a/azure-pipelines/artifacts/_stage_all.ps1 b/tools/artifacts/_stage_all.ps1 similarity index 96% rename from azure-pipelines/artifacts/_stage_all.ps1 rename to tools/artifacts/_stage_all.ps1 index bf961ce57..08e9844c3 100644 --- a/azure-pipelines/artifacts/_stage_all.ps1 +++ b/tools/artifacts/_stage_all.ps1 @@ -11,7 +11,7 @@ param ( [switch]$AvoidSymbolicLinks ) -$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal +$ArtifactStagingFolder = & "$PSScriptRoot/../../tools/Get-ArtifactsStagingDirectory.ps1" -CleanIfLocal function Create-SymbolicLink { param ( diff --git a/azure-pipelines/artifacts/build_logs.ps1 b/tools/artifacts/build_logs.ps1 similarity index 66% rename from azure-pipelines/artifacts/build_logs.ps1 rename to tools/artifacts/build_logs.ps1 index f05358e03..10c5478b3 100644 --- a/azure-pipelines/artifacts/build_logs.ps1 +++ b/tools/artifacts/build_logs.ps1 @@ -1,4 +1,4 @@ -$ArtifactStagingFolder = & "$PSScriptRoot/../Get-ArtifactsStagingDirectory.ps1" +$ArtifactStagingFolder = & "$PSScriptRoot/../../tools/Get-ArtifactsStagingDirectory.ps1" if (!(Test-Path $ArtifactStagingFolder/build_logs)) { return } diff --git a/azure-pipelines/artifacts/coverageResults.ps1 b/tools/artifacts/coverageResults.ps1 similarity index 100% rename from azure-pipelines/artifacts/coverageResults.ps1 rename to tools/artifacts/coverageResults.ps1 diff --git a/azure-pipelines/artifacts/deployables.ps1 b/tools/artifacts/deployables.ps1 similarity index 100% rename from azure-pipelines/artifacts/deployables.ps1 rename to tools/artifacts/deployables.ps1 diff --git a/azure-pipelines/artifacts/projectAssetsJson.ps1 b/tools/artifacts/projectAssetsJson.ps1 similarity index 100% rename from azure-pipelines/artifacts/projectAssetsJson.ps1 rename to tools/artifacts/projectAssetsJson.ps1 diff --git a/azure-pipelines/artifacts/symbols.ps1 b/tools/artifacts/symbols.ps1 similarity index 100% rename from azure-pipelines/artifacts/symbols.ps1 rename to tools/artifacts/symbols.ps1 diff --git a/azure-pipelines/artifacts/testResults.ps1 b/tools/artifacts/testResults.ps1 similarity index 100% rename from azure-pipelines/artifacts/testResults.ps1 rename to tools/artifacts/testResults.ps1 diff --git a/azure-pipelines/artifacts/test_symbols.ps1 b/tools/artifacts/test_symbols.ps1 similarity index 100% rename from azure-pipelines/artifacts/test_symbols.ps1 rename to tools/artifacts/test_symbols.ps1 diff --git a/azure-pipelines/dotnet-test-cloud.ps1 b/tools/dotnet-test-cloud.ps1 old mode 100755 new mode 100644 similarity index 100% rename from azure-pipelines/dotnet-test-cloud.ps1 rename to tools/dotnet-test-cloud.ps1 diff --git a/azure-pipelines/publish-CodeCov.ps1 b/tools/publish-CodeCov.ps1 similarity index 100% rename from azure-pipelines/publish-CodeCov.ps1 rename to tools/publish-CodeCov.ps1 diff --git a/azure-pipelines/test.runsettings b/tools/test.runsettings similarity index 100% rename from azure-pipelines/test.runsettings rename to tools/test.runsettings diff --git a/azure-pipelines/variables/DotNetSdkVersion.ps1 b/tools/variables/DotNetSdkVersion.ps1 similarity index 100% rename from azure-pipelines/variables/DotNetSdkVersion.ps1 rename to tools/variables/DotNetSdkVersion.ps1 diff --git a/azure-pipelines/variables/_all.ps1 b/tools/variables/_all.ps1 old mode 100755 new mode 100644 similarity index 100% rename from azure-pipelines/variables/_all.ps1 rename to tools/variables/_all.ps1