mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 14:17:22 +00:00
added pipx and yamllint
This commit is contained in:
@@ -235,7 +235,6 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-PyPy.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-PyPy.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-Toolset.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-Toolset.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Configure-Toolset.ps1",
|
"{{ template_dir }}/scripts/Installers/Configure-Toolset.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-YAMLLint.ps1",
|
|
||||||
"{{ template_dir }}/scripts/Installers/Update-AndroidSDK.ps1"
|
"{{ template_dir }}/scripts/Installers/Update-AndroidSDK.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -328,6 +327,13 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-CodeQLBundle.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-CodeQLBundle.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts": [
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-Pipx.ps1",
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-Pipx-Packages.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts": [
|
"scripts": [
|
||||||
|
|||||||
@@ -249,7 +249,6 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-PyPy.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-PyPy.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-Toolset.ps1",
|
"{{ template_dir }}/scripts/Installers/Install-Toolset.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Configure-Toolset.ps1",
|
"{{ template_dir }}/scripts/Installers/Configure-Toolset.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-YAMLLint.ps1",
|
|
||||||
"{{ template_dir }}/scripts/Installers/Update-AndroidSDK.ps1",
|
"{{ template_dir }}/scripts/Installers/Update-AndroidSDK.ps1",
|
||||||
"{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1"
|
||||||
]
|
]
|
||||||
@@ -326,6 +325,13 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-CodeQLBundle.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-CodeQLBundle.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts": [
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-Pipx.ps1",
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-Pipx-Packages.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts": [
|
"scripts": [
|
||||||
|
|||||||
12
images/win/scripts/Installers/Install-Pipx-Packages.ps1
Normal file
12
images/win/scripts/Installers/Install-Pipx-Packages.ps1
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
$pipxToolset = (Get-ToolsetContent).pipx
|
||||||
|
foreach($tool in $pipxToolset) {
|
||||||
|
if ($tool.python) {
|
||||||
|
$pythonPath = "${env:AGENT_TOOLSDIRECTORY}\Python\${tool.python}*\${env:AGENT_OSARCHITECTURE}\python-${tool.python}*"
|
||||||
|
Write-Host "Install ${tool.package} into python ${tool.python}"
|
||||||
|
pipx install $tool.package --python $python_path
|
||||||
|
} else {
|
||||||
|
Write-Host "Install ${tool.package} into default python"
|
||||||
|
pipx install $tool.package
|
||||||
|
}
|
||||||
|
Invoke-PesterTests -TestFile "PipxPackages" -TestName $tool.package
|
||||||
|
}
|
||||||
14
images/win/scripts/Installers/Install-Pipx.ps1
Normal file
14
images/win/scripts/Installers/Install-Pipx.ps1
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Set custom directorys for pipx
|
||||||
|
$env:PIPX_BIN_DIR = "${env:ProgramFiles(x86)}\pipx_bin"
|
||||||
|
$env:PIPX_HOME = "${env:ProgramFiles(x86)}\pipx"
|
||||||
|
|
||||||
|
# Install pipx
|
||||||
|
pip install pipx
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
Add-MachinePathItem "${env:PIPX_BIN_DIR}"
|
||||||
|
Set-SystemVariable -SystemVariable PIPX_BIN_DIR -Value $env:PIPX_BIN_DIR
|
||||||
|
Set-SystemVariable -SystemVariable PIPX_HOME -Value $env:PIPX_HOME
|
||||||
|
|
||||||
|
# Test pipx
|
||||||
|
Invoke-PesterTests -TestFile "Tools" -TestName "Pipx"
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
pip install yamllint
|
|
||||||
|
|
||||||
Invoke-PesterTests -TestFile "Tools" -TestName "yamllint"
|
|
||||||
@@ -273,4 +273,8 @@ function Get-PacmanVersion {
|
|||||||
|
|
||||||
function Get-YAMLLintVersion {
|
function Get-YAMLLintVersion {
|
||||||
yamllint --version
|
yamllint --version
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-PipxVersion {
|
||||||
|
pipx --version
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,8 @@ $markdown += New-MDList -Style Unordered -Lines @(
|
|||||||
(Get-RubyGemsVersion),
|
(Get-RubyGemsVersion),
|
||||||
(Get-HelmVersion),
|
(Get-HelmVersion),
|
||||||
(Get-ComposerVersion),
|
(Get-ComposerVersion),
|
||||||
(Get-NugetVersion)
|
(Get-NugetVersion),
|
||||||
|
(Get-PipxVersion)
|
||||||
)
|
)
|
||||||
|
|
||||||
$markdown += New-MDHeader "Project Management" -Level 3
|
$markdown += New-MDHeader "Project Management" -Level 3
|
||||||
|
|||||||
5
images/win/scripts/Tests/PipxPackages.Test.ps1
Normal file
5
images/win/scripts/Tests/PipxPackages.Test.ps1
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
Describe "yamllint" {
|
||||||
|
It "yamllint" {
|
||||||
|
"yamllint --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -214,12 +214,6 @@ Describe "ServiceFabricSDK" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "yamllint" {
|
|
||||||
It "yamllint" {
|
|
||||||
"yamllint --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Describe "Svn" {
|
Describe "Svn" {
|
||||||
It "svn" {
|
It "svn" {
|
||||||
"svn --version --quiet" | Should -ReturnZeroExitCode
|
"svn --version --quiet" | Should -ReturnZeroExitCode
|
||||||
@@ -269,3 +263,9 @@ Describe "Zstd" {
|
|||||||
"zstd -V" | Should -ReturnZeroExitCode
|
"zstd -V" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Describe "Pipx" {
|
||||||
|
It "Pipx" {
|
||||||
|
"pipx --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -236,5 +236,11 @@
|
|||||||
"mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2016",
|
"mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2016",
|
||||||
"microsoft/aspnetcore-build:1.0-2.0"
|
"microsoft/aspnetcore-build:1.0-2.0"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"pipx": [
|
||||||
|
{
|
||||||
|
"package": "yamllint",
|
||||||
|
"cmd": "yamllint"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,5 +288,11 @@
|
|||||||
"mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019",
|
"mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019",
|
||||||
"microsoft/aspnetcore-build:1.0-2.0"
|
"microsoft/aspnetcore-build:1.0-2.0"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"pipx": [
|
||||||
|
{
|
||||||
|
"package": "yamllint",
|
||||||
|
"cmd": "yamllint"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user