mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
Compare commits
9 Commits
v2.277.1
...
releases/m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62d926efce | ||
|
|
fc4027b3f1 | ||
|
|
d14881b970 | ||
|
|
be9632302c | ||
|
|
2b5ddd7c21 | ||
|
|
8109c962f0 | ||
|
|
af198237ca | ||
|
|
1559ff15ec | ||
|
|
67ff8d3460 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -22,7 +22,4 @@ _dotnetsdk
|
|||||||
TestResults
|
TestResults
|
||||||
TestLogs
|
TestLogs
|
||||||
.DS_Store
|
.DS_Store
|
||||||
**/*.DotSettings.user
|
**/*.DotSettings.user
|
||||||
|
|
||||||
#generated
|
|
||||||
src/Runner.Sdk/BuildConstants.cs
|
|
||||||
@@ -1,16 +1,17 @@
|
|||||||
## Features
|
## Features
|
||||||
- Verify the Runner Hash during auto-upgrade before installing the new runner version (#967)
|
|
||||||
- Support download of runners from authenticated endpoints (#920)
|
- Use GITHUB_TOKEN for ghcr.io containers if credentials are not provided (#990)
|
||||||
- Enabled tty output in Docker Actions (#916)
|
|
||||||
- Added '--check' command to verify runner connectivity (#949)
|
|
||||||
|
|
||||||
## Bugs
|
## Bugs
|
||||||
- Fix usage of /dev/null and ping in run.sh (#968)
|
|
||||||
|
- Do not trucate error message from template evaluation (#1038)
|
||||||
|
- Make FileShare ReadWrite (#1033)
|
||||||
|
- Mask secrets with double-quotes when passed to docker command line (#1002)
|
||||||
|
- Delete script files before replacing during update (#984)
|
||||||
|
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
- Updated the copy for various runner messages (#972)
|
|
||||||
- Added the runner's OS to telemetry (#939)
|
|
||||||
- Various other telemetry improvements (#935)
|
|
||||||
|
|
||||||
## Windows x64
|
## Windows x64
|
||||||
We recommend configuring the runner in a root folder of the Windows drive (e.g. "C:\actions-runner"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.
|
We recommend configuring the runner in a root folder of the Windows drive (e.g. "C:\actions-runner"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<Update to ./src/runnerversion when creating release>
|
2.278.0
|
||||||
|
|||||||
101
src/Misc/dotnet-install.ps1
vendored
101
src/Misc/dotnet-install.ps1
vendored
@@ -340,9 +340,8 @@ function Get-Latest-Version-Info([string]$AzureFeed, [string]$Channel) {
|
|||||||
elseif ($Runtime -eq "aspnetcore") {
|
elseif ($Runtime -eq "aspnetcore") {
|
||||||
$VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version"
|
$VersionFileUrl = "$UncachedFeed/aspnetcore/Runtime/$Channel/latest.version"
|
||||||
}
|
}
|
||||||
# Currently, the WindowsDesktop runtime is manufactured with the .Net core runtime
|
|
||||||
elseif ($Runtime -eq "windowsdesktop") {
|
elseif ($Runtime -eq "windowsdesktop") {
|
||||||
$VersionFileUrl = "$UncachedFeed/Runtime/$Channel/latest.version"
|
$VersionFileUrl = "$UncachedFeed/WindowsDesktop/$Channel/latest.version"
|
||||||
}
|
}
|
||||||
elseif (-not $Runtime) {
|
elseif (-not $Runtime) {
|
||||||
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
|
$VersionFileUrl = "$UncachedFeed/Sdk/$Channel/latest.version"
|
||||||
@@ -438,7 +437,16 @@ function Get-Download-Link([string]$AzureFeed, [string]$SpecificVersion, [string
|
|||||||
$PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip"
|
$PayloadURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/aspnetcore-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip"
|
||||||
}
|
}
|
||||||
elseif ($Runtime -eq "windowsdesktop") {
|
elseif ($Runtime -eq "windowsdesktop") {
|
||||||
|
# The windows desktop runtime is part of the core runtime layout prior to 5.0
|
||||||
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip"
|
$PayloadURL = "$AzureFeed/Runtime/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip"
|
||||||
|
if ($SpecificVersion -match '^(\d+)\.(.*)$')
|
||||||
|
{
|
||||||
|
$majorVersion = [int]$Matches[1]
|
||||||
|
if ($majorVersion -ge 5)
|
||||||
|
{
|
||||||
|
$PayloadURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/windowsdesktop-runtime-$SpecificProductVersion-win-$CLIArchitecture.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif (-not $Runtime) {
|
elseif (-not $Runtime) {
|
||||||
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificProductVersion-win-$CLIArchitecture.zip"
|
$PayloadURL = "$AzureFeed/Sdk/$SpecificVersion/dotnet-sdk-$SpecificProductVersion-win-$CLIArchitecture.zip"
|
||||||
@@ -480,7 +488,16 @@ function Get-Product-Version([string]$AzureFeed, [string]$SpecificVersion) {
|
|||||||
$ProductVersionTxtURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/productVersion.txt"
|
$ProductVersionTxtURL = "$AzureFeed/aspnetcore/Runtime/$SpecificVersion/productVersion.txt"
|
||||||
}
|
}
|
||||||
elseif ($Runtime -eq "windowsdesktop") {
|
elseif ($Runtime -eq "windowsdesktop") {
|
||||||
|
# The windows desktop runtime is part of the core runtime layout prior to 5.0
|
||||||
$ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/productVersion.txt"
|
$ProductVersionTxtURL = "$AzureFeed/Runtime/$SpecificVersion/productVersion.txt"
|
||||||
|
if ($SpecificVersion -match '^(\d+)\.(.*)')
|
||||||
|
{
|
||||||
|
$majorVersion = [int]$Matches[1]
|
||||||
|
if ($majorVersion -ge 5)
|
||||||
|
{
|
||||||
|
$ProductVersionTxtURL = "$AzureFeed/WindowsDesktop/$SpecificVersion/productVersion.txt"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif (-not $Runtime) {
|
elseif (-not $Runtime) {
|
||||||
$ProductVersionTxtURL = "$AzureFeed/Sdk/$SpecificVersion/productVersion.txt"
|
$ProductVersionTxtURL = "$AzureFeed/Sdk/$SpecificVersion/productVersion.txt"
|
||||||
@@ -885,10 +902,10 @@ Say "Note that the script does not resolve dependencies during installation."
|
|||||||
Say "To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install/windows#dependencies"
|
Say "To check the list of dependencies, go to https://docs.microsoft.com/dotnet/core/install/windows#dependencies"
|
||||||
Say "Installation finished"
|
Say "Installation finished"
|
||||||
# SIG # Begin signature block
|
# SIG # Begin signature block
|
||||||
# MIIjkgYJKoZIhvcNAQcCoIIjgzCCI38CAQExDzANBglghkgBZQMEAgEFADB5Bgor
|
# MIIjjwYJKoZIhvcNAQcCoIIjgDCCI3wCAQExDzANBglghkgBZQMEAgEFADB5Bgor
|
||||||
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
|
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
|
||||||
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD2c707qnCLOLIC
|
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCNsnhcJvx/hXmM
|
||||||
# n6Mu5Gr4+Xp68foyZlGlTycnycc5l6CCDYEwggX/MIID56ADAgECAhMzAAABh3IX
|
# w8KjuvvIMDBFonhg9XJFc1QwfTyH4aCCDYEwggX/MIID56ADAgECAhMzAAABh3IX
|
||||||
# chVZQMcJAAAAAAGHMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
|
# chVZQMcJAAAAAAGHMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
|
||||||
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
|
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
|
||||||
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
|
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p
|
||||||
@@ -960,29 +977,29 @@ Say "Installation finished"
|
|||||||
# xw4o7t5lL+yX9qFcltgA1qFGvVnzl6UJS0gQmYAf0AApxbGbpT9Fdx41xtKiop96
|
# xw4o7t5lL+yX9qFcltgA1qFGvVnzl6UJS0gQmYAf0AApxbGbpT9Fdx41xtKiop96
|
||||||
# eiL6SJUfq/tHI4D1nvi/a7dLl+LrdXga7Oo3mXkYS//WsyNodeav+vyL6wuA6mk7
|
# eiL6SJUfq/tHI4D1nvi/a7dLl+LrdXga7Oo3mXkYS//WsyNodeav+vyL6wuA6mk7
|
||||||
# r/ww7QRMjt/fdW1jkT3RnVZOT7+AVyKheBEyIXrvQQqxP/uozKRdwaGIm1dxVk5I
|
# r/ww7QRMjt/fdW1jkT3RnVZOT7+AVyKheBEyIXrvQQqxP/uozKRdwaGIm1dxVk5I
|
||||||
# RcBCyZt2WwqASGv9eZ/BvW1taslScxMNelDNMYIVZzCCFWMCAQEwgZUwfjELMAkG
|
# RcBCyZt2WwqASGv9eZ/BvW1taslScxMNelDNMYIVZDCCFWACAQEwgZUwfjELMAkG
|
||||||
# A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx
|
# A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx
|
||||||
# H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VQQKExVNaWNyb3NvZnQgQ29y
|
||||||
# cG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEw
|
# cG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEw
|
||||||
@@ -1043,7 +1060,7 @@ Say "Installation finished"
|
|||||||
# cs0d9LiFAR6A+xuJKlQ5slvayA1VmXqHczsI5pgt6o3gMy4SKfXAL1QnIffIrE7a
|
# cs0d9LiFAR6A+xuJKlQ5slvayA1VmXqHczsI5pgt6o3gMy4SKfXAL1QnIffIrE7a
|
||||||
# KLixqduWsqdCosnPGUFN4Ib5KpqjEWYw07t0MkvfY3v1mYovG8chr1m1rtxEPJdQ
|
# KLixqduWsqdCosnPGUFN4Ib5KpqjEWYw07t0MkvfY3v1mYovG8chr1m1rtxEPJdQ
|
||||||
# cdeh0sVV42neV8HR3jDA/czmTfsNv11P6Z0eGTgvvM9YBS7vDaBQNdrvCScc1bN+
|
# cdeh0sVV42neV8HR3jDA/czmTfsNv11P6Z0eGTgvvM9YBS7vDaBQNdrvCScc1bN+
|
||||||
# NR4Iuto229Nfj950iEkSoYIC0jCCAjsCAQEwgfyhgdSkgdEwgc4xCzAJBgNVBAYT
|
# NR4Iuto229Nfj950iEkSoYICzzCCAjgCAQEwgfyhgdSkgdEwgc4xCzAJBgNVBAYT
|
||||||
# AlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYD
|
# AlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYD
|
||||||
# VQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKTAnBgNVBAsTIE1pY3Jvc29mdCBP
|
# VQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKTAnBgNVBAsTIE1pY3Jvc29mdCBP
|
||||||
# cGVyYXRpb25zIFB1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FK77JRCg7CJfse
|
# Q9abE1h/AaaNJl0iGxX4IihNWyfovSfYL3L4eODUBAu68tWSxeceRfWNsb/ZZfUi
|
||||||
# dSbnTv81/4VhSXOAO0jMP2dALP7DF59vQmlDh50u8/Wu61ActMOt6cArkoUhBRXO
|
# v89hpLssI/Gf1BEgNMA4zCuIGQiC8okusVumEpAhhvCEbSiTTTtBdolTnU/CAKui
|
||||||
# LnqOQCOEEku5Xy2ES9g9eUfLUvTvlWo6HiAq+cJnNV08QRBOnGWRxdwy8YJ5vwNW
|
# oxaU3R9XkKh1F4oAM26+dJ1J2BLQXPs5afNvvedDsZWNQUPK1sFF3JRfzxiTrwBW
|
||||||
# Pwx0ZG3rTvMtGzOaW6Ve5O36H2ynoEdzCmpakeDaF2sZ86/LNERKyIXiykV/Uig1
|
# EJRyflev9gyDoqCHzippgb+6+eti1WTkcA9Q49GIT11S6LOAVqkSC9N7Nqf8ksh8
|
||||||
# SZh2VLY/Yni9SCVHbYgvTOCh5ZZE5eOi6BwLf0T4xl5alHUx+AA=
|
# ARdwT8jigpsm+mj7lrVU9upDkhVYhKeO8oiZq95Q53Zkteo=
|
||||||
# SIG # End signature block
|
# SIG # End signature block
|
||||||
|
|||||||
59
src/Misc/dotnet-install.sh
vendored
59
src/Misc/dotnet-install.sh
vendored
@@ -303,7 +303,7 @@ get_machine_architecture() {
|
|||||||
echo "arm"
|
echo "arm"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
aarch64)
|
aarch64|arm64)
|
||||||
echo "arm64"
|
echo "arm64"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
@@ -489,7 +489,7 @@ get_specific_version_from_version() {
|
|||||||
local json_file="$5"
|
local json_file="$5"
|
||||||
|
|
||||||
if [ -z "$json_file" ]; then
|
if [ -z "$json_file" ]; then
|
||||||
if [[ "$version" == "latest" ]]; then
|
if [[ "$version" == "latest" ]]; then
|
||||||
local version_info
|
local version_info
|
||||||
version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1
|
version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" false)" || return 1
|
||||||
say_verbose "get_specific_version_from_version: version_info=$version_info"
|
say_verbose "get_specific_version_from_version: version_info=$version_info"
|
||||||
@@ -522,7 +522,7 @@ construct_download_link() {
|
|||||||
local specific_version="${4//[$'\t\r\n']}"
|
local specific_version="${4//[$'\t\r\n']}"
|
||||||
local specific_product_version="$(get_specific_product_version "$1" "$4")"
|
local specific_product_version="$(get_specific_product_version "$1" "$4")"
|
||||||
local osname="$5"
|
local osname="$5"
|
||||||
|
|
||||||
local download_link=null
|
local download_link=null
|
||||||
if [[ "$runtime" == "dotnet" ]]; then
|
if [[ "$runtime" == "dotnet" ]]; then
|
||||||
download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_product_version-$osname-$normalized_architecture.tar.gz"
|
download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_product_version-$osname-$normalized_architecture.tar.gz"
|
||||||
@@ -542,7 +542,7 @@ construct_download_link() {
|
|||||||
# azure_feed - $1
|
# azure_feed - $1
|
||||||
# specific_version - $2
|
# specific_version - $2
|
||||||
get_specific_product_version() {
|
get_specific_product_version() {
|
||||||
# If we find a 'productVersion.txt' at the root of any folder, we'll use its contents
|
# If we find a 'productVersion.txt' at the root of any folder, we'll use its contents
|
||||||
# to resolve the version of what's in the folder, superseding the specified version.
|
# to resolve the version of what's in the folder, superseding the specified version.
|
||||||
eval $invocation
|
eval $invocation
|
||||||
|
|
||||||
@@ -744,13 +744,30 @@ download() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local failed=false
|
local failed=false
|
||||||
if machine_has "curl"; then
|
local attempts=0
|
||||||
downloadcurl "$remote_path" "$out_path" || failed=true
|
while [ $attempts -lt 3 ]; do
|
||||||
elif machine_has "wget"; then
|
attempts=$((attempts+1))
|
||||||
downloadwget "$remote_path" "$out_path" || failed=true
|
failed=false
|
||||||
else
|
if machine_has "curl"; then
|
||||||
failed=true
|
downloadcurl "$remote_path" "$out_path" || failed=true
|
||||||
fi
|
elif machine_has "wget"; then
|
||||||
|
downloadwget "$remote_path" "$out_path" || failed=true
|
||||||
|
else
|
||||||
|
say_err "Missing dependency: neither curl nor wget was found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$failed" = false ] || [ $attempts -ge 3 ] || { [ ! -z $http_code ] && [ $http_code = "404" ]; }; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
say "Download attempt #$attempts has failed: $http_code $download_error_msg"
|
||||||
|
say "Attempt #$((attempts+1)) will start in $((attempts*10)) seconds."
|
||||||
|
sleep $((attempts*20))
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$failed" = true ]; then
|
if [ "$failed" = true ]; then
|
||||||
say_verbose "Download failed: $remote_path"
|
say_verbose "Download failed: $remote_path"
|
||||||
return 1
|
return 1
|
||||||
@@ -761,6 +778,8 @@ download() {
|
|||||||
# Updates global variables $http_code and $download_error_msg
|
# Updates global variables $http_code and $download_error_msg
|
||||||
downloadcurl() {
|
downloadcurl() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
|
unset http_code
|
||||||
|
unset download_error_msg
|
||||||
local remote_path="$1"
|
local remote_path="$1"
|
||||||
local out_path="${2:-}"
|
local out_path="${2:-}"
|
||||||
# Append feed_credential as late as possible before calling curl to avoid logging feed_credential
|
# Append feed_credential as late as possible before calling curl to avoid logging feed_credential
|
||||||
@@ -789,6 +808,8 @@ downloadcurl() {
|
|||||||
# Updates global variables $http_code and $download_error_msg
|
# Updates global variables $http_code and $download_error_msg
|
||||||
downloadwget() {
|
downloadwget() {
|
||||||
eval $invocation
|
eval $invocation
|
||||||
|
unset http_code
|
||||||
|
unset download_error_msg
|
||||||
local remote_path="$1"
|
local remote_path="$1"
|
||||||
local out_path="${2:-}"
|
local out_path="${2:-}"
|
||||||
# Append feed_credential as late as possible before calling wget to avoid logging feed_credential
|
# Append feed_credential as late as possible before calling wget to avoid logging feed_credential
|
||||||
@@ -882,12 +903,11 @@ install_dotnet() {
|
|||||||
say "Downloading primary link $download_link"
|
say "Downloading primary link $download_link"
|
||||||
|
|
||||||
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
||||||
http_code=""; download_error_msg=""
|
|
||||||
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
||||||
primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg"
|
|
||||||
|
|
||||||
# if the download fails, download the legacy_download_link
|
# if the download fails, download the legacy_download_link
|
||||||
if [ "$download_failed" = true ]; then
|
if [ "$download_failed" = true ]; then
|
||||||
|
primary_path_http_code="$http_code"; primary_path_download_error_msg="$download_error_msg"
|
||||||
case $primary_path_http_code in
|
case $primary_path_http_code in
|
||||||
404)
|
404)
|
||||||
say "The resource at $download_link is not available."
|
say "The resource at $download_link is not available."
|
||||||
@@ -906,11 +926,10 @@ install_dotnet() {
|
|||||||
say "Downloading legacy link $download_link"
|
say "Downloading legacy link $download_link"
|
||||||
|
|
||||||
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
# The download function will set variables $http_code and $download_error_msg in case of failure.
|
||||||
http_code=""; download_error_msg=""
|
|
||||||
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
download "$download_link" "$zip_path" 2>&1 || download_failed=true
|
||||||
legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg"
|
|
||||||
|
|
||||||
if [ "$download_failed" = true ]; then
|
if [ "$download_failed" = true ]; then
|
||||||
|
legacy_path_http_code="$http_code"; legacy_path_download_error_msg="$download_error_msg"
|
||||||
case $legacy_path_http_code in
|
case $legacy_path_http_code in
|
||||||
404)
|
404)
|
||||||
say "The resource at $download_link is not available."
|
say "The resource at $download_link is not available."
|
||||||
@@ -1112,10 +1131,10 @@ do
|
|||||||
echo " --arch,-Architecture,-Arch"
|
echo " --arch,-Architecture,-Arch"
|
||||||
echo " Possible values: x64, arm, and arm64"
|
echo " Possible values: x64, arm, and arm64"
|
||||||
echo " --os <system> Specifies operating system to be used when selecting the installer."
|
echo " --os <system> Specifies operating system to be used when selecting the installer."
|
||||||
echo " Overrides the OS determination approach used by the script. Supported values: osx, linux, linux-musl, freebsd, rhel.6."
|
echo " Overrides the OS determination approach used by the script. Supported values: osx, linux, linux-musl, freebsd, rhel.6."
|
||||||
echo " In case any other value is provided, the platform will be determined by the script based on machine configuration."
|
echo " In case any other value is provided, the platform will be determined by the script based on machine configuration."
|
||||||
echo " Not supported for legacy links. Use --runtime-id to specify platform for legacy links."
|
echo " Not supported for legacy links. Use --runtime-id to specify platform for legacy links."
|
||||||
echo " Refer to: https://aka.ms/dotnet-os-lifecycle for more information."
|
echo " Refer to: https://aka.ms/dotnet-os-lifecycle for more information."
|
||||||
echo " --runtime <RUNTIME> Installs a shared runtime only, without the SDK."
|
echo " --runtime <RUNTIME> Installs a shared runtime only, without the SDK."
|
||||||
echo " -Runtime"
|
echo " -Runtime"
|
||||||
echo " Possible values:"
|
echo " Possible values:"
|
||||||
@@ -1140,7 +1159,7 @@ do
|
|||||||
echo " Installs just the shared runtime bits, not the entire SDK."
|
echo " Installs just the shared runtime bits, not the entire SDK."
|
||||||
echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)."
|
echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)."
|
||||||
echo " -RuntimeId" The parameter is obsolete and may be removed in a future version of this script. Should be used only for versions below 2.1.
|
echo " -RuntimeId" The parameter is obsolete and may be removed in a future version of this script. Should be used only for versions below 2.1.
|
||||||
echo " For primary links to override OS or/and architecture, use --os and --architecture option instead."
|
echo " For primary links to override OS or/and architecture, use --os and --architecture option instead."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Install Location:"
|
echo "Install Location:"
|
||||||
echo " Location is chosen in following order:"
|
echo " Location is chosen in following order:"
|
||||||
@@ -1177,7 +1196,7 @@ if [ "$dry_run" = true ]; then
|
|||||||
if [ "$valid_legacy_download_link" = true ]; then
|
if [ "$valid_legacy_download_link" = true ]; then
|
||||||
say "Legacy named payload URL: $legacy_download_link"
|
say "Legacy named payload URL: $legacy_download_link"
|
||||||
fi
|
fi
|
||||||
repeatable_command="./$script_name --version "\""$specific_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\"""
|
repeatable_command="./$script_name --version "\""$specific_version"\"" --install-dir "\""$install_root"\"" --architecture "\""$normalized_architecture"\"" --os "\""$normalized_os"\"""
|
||||||
if [[ "$runtime" == "dotnet" ]]; then
|
if [[ "$runtime" == "dotnet" ]]; then
|
||||||
repeatable_command+=" --runtime "\""dotnet"\"""
|
repeatable_command+=" --runtime "\""dotnet"\"""
|
||||||
elif [[ "$runtime" == "aspnetcore" ]]; then
|
elif [[ "$runtime" == "aspnetcore" ]]; then
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ namespace GitHub.Runner.Common
|
|||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscape);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscape);
|
||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscapeShift1);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscapeShift1);
|
||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscapeShift2);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.Base64StringEscapeShift2);
|
||||||
|
this.SecretMasker.AddValueEncoder(ValueEncoders.CommandLineArgumentEscape);
|
||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.ExpressionStringEscape);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.ExpressionStringEscape);
|
||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.JsonStringEscape);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.JsonStringEscape);
|
||||||
this.SecretMasker.AddValueEncoder(ValueEncoders.UriDataEscape);
|
this.SecretMasker.AddValueEncoder(ValueEncoders.UriDataEscape);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace GitHub.Runner.Common
|
|||||||
EndPage();
|
EndPage();
|
||||||
_byteCount = 0;
|
_byteCount = 0;
|
||||||
_dataFileName = Path.Combine(_pagesFolder, $"{_timelineId}_{_timelineRecordId}_{++_pageCount}.log");
|
_dataFileName = Path.Combine(_pagesFolder, $"{_timelineId}_{_timelineRecordId}_{++_pageCount}.log");
|
||||||
_pageData = new FileStream(_dataFileName, FileMode.CreateNew);
|
_pageData = new FileStream(_dataFileName, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.ReadWrite);
|
||||||
_pageWriter = new StreamWriter(_pageData, System.Text.Encoding.UTF8);
|
_pageWriter = new StreamWriter(_pageData, System.Text.Encoding.UTF8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ namespace GitHub.Runner.Listener
|
|||||||
using (FileStream fs = new FileStream(archiveFile, FileMode.Create, FileAccess.Write, FileShare.None, bufferSize: 4096, useAsync: true))
|
using (FileStream fs = new FileStream(archiveFile, FileMode.Create, FileAccess.Write, FileShare.None, bufferSize: 4096, useAsync: true))
|
||||||
using (Stream result = await httpClient.GetStreamAsync(_targetPackage.DownloadUrl))
|
using (Stream result = await httpClient.GetStreamAsync(_targetPackage.DownloadUrl))
|
||||||
{
|
{
|
||||||
//81920 is the default used by System.IO.Stream.CopyTo and is under the large object heap threshold (85k).
|
//81920 is the default used by System.IO.Stream.CopyTo and is under the large object heap threshold (85k).
|
||||||
await result.CopyToAsync(fs, 81920, downloadCts.Token);
|
await result.CopyToAsync(fs, 81920, downloadCts.Token);
|
||||||
await fs.FlushAsync(downloadCts.Token);
|
await fs.FlushAsync(downloadCts.Token);
|
||||||
}
|
}
|
||||||
@@ -357,8 +357,13 @@ namespace GitHub.Runner.Listener
|
|||||||
Trace.Info($"Copy any remaining .sh/.cmd files into runner root.");
|
Trace.Info($"Copy any remaining .sh/.cmd files into runner root.");
|
||||||
foreach (FileInfo file in new DirectoryInfo(latestRunnerDirectory).GetFiles() ?? new FileInfo[0])
|
foreach (FileInfo file in new DirectoryInfo(latestRunnerDirectory).GetFiles() ?? new FileInfo[0])
|
||||||
{
|
{
|
||||||
// Copy and replace the file.
|
string destination = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Root), file.Name);
|
||||||
file.CopyTo(Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Root), file.Name), true);
|
|
||||||
|
// Removing the file instead of just trying to overwrite it works around permissions issues on linux.
|
||||||
|
// https://github.com/actions/runner/issues/981
|
||||||
|
Trace.Info($"Copy {file.FullName} to {destination}");
|
||||||
|
IOUtil.DeleteFile(destination);
|
||||||
|
file.CopyTo(destination, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
19
src/Runner.Sdk/BuildConstants.cs
Normal file
19
src/Runner.Sdk/BuildConstants.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
namespace GitHub.Runner.Sdk
|
||||||
|
{
|
||||||
|
/***
|
||||||
|
* WARNING: This file is automatically regenerated on layout so the runner can provide version/commit info (do not manually edit it).
|
||||||
|
*/
|
||||||
|
public static class BuildConstants
|
||||||
|
{
|
||||||
|
public static class Source
|
||||||
|
{
|
||||||
|
public static readonly string CommitHash = "N/A";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class RunnerPackage
|
||||||
|
{
|
||||||
|
public static readonly string PackageName = "N/A";
|
||||||
|
public static readonly string Version = "0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -311,7 +311,7 @@ namespace GitHub.Runner.Worker
|
|||||||
var result = new TemplateContext
|
var result = new TemplateContext
|
||||||
{
|
{
|
||||||
CancellationToken = CancellationToken.None,
|
CancellationToken = CancellationToken.None,
|
||||||
Errors = new TemplateValidationErrors(10, 500),
|
Errors = new TemplateValidationErrors(10, int.MaxValue), // Don't truncate error messages otherwise we might not scrub secrets correctly
|
||||||
Memory = new TemplateMemory(
|
Memory = new TemplateMemory(
|
||||||
maxDepth: 100,
|
maxDepth: 100,
|
||||||
maxEvents: 1000000,
|
maxEvents: 1000000,
|
||||||
|
|||||||
@@ -197,8 +197,7 @@ namespace GitHub.Runner.Worker.Container
|
|||||||
|
|
||||||
dockerOptions.Add($"--workdir {container.ContainerWorkDirectory}");
|
dockerOptions.Add($"--workdir {container.ContainerWorkDirectory}");
|
||||||
dockerOptions.Add($"--rm");
|
dockerOptions.Add($"--rm");
|
||||||
dockerOptions.Add($"-t");
|
|
||||||
|
|
||||||
foreach (var env in container.ContainerEnvironmentVariables)
|
foreach (var env in container.ContainerEnvironmentVariables)
|
||||||
{
|
{
|
||||||
// e.g. -e MY_SECRET maps the value into the exec'ed process without exposing
|
// e.g. -e MY_SECRET maps the value into the exec'ed process without exposing
|
||||||
|
|||||||
@@ -198,8 +198,7 @@ namespace GitHub.Runner.Worker
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Add at a later date. This currently no local package registry to test with
|
UpdateRegistryAuthForGitHubToken(executionContext, container);
|
||||||
// UpdateRegistryAuthForGitHubToken(executionContext, container);
|
|
||||||
|
|
||||||
// Before pulling, generate client authentication if required
|
// Before pulling, generate client authentication if required
|
||||||
var configLocation = await ContainerRegistryLogin(executionContext, container);
|
var configLocation = await ContainerRegistryLogin(executionContext, container);
|
||||||
@@ -494,31 +493,14 @@ namespace GitHub.Runner.Worker
|
|||||||
|
|
||||||
private void UpdateRegistryAuthForGitHubToken(IExecutionContext executionContext, ContainerInfo container)
|
private void UpdateRegistryAuthForGitHubToken(IExecutionContext executionContext, ContainerInfo container)
|
||||||
{
|
{
|
||||||
var registryIsTokenCompatible = container.RegistryServer.Equals("docker.pkg.github.com", StringComparison.OrdinalIgnoreCase);
|
var registryIsTokenCompatible = container.RegistryServer.Equals("ghcr.io", StringComparison.OrdinalIgnoreCase) || container.RegistryServer.Equals("containers.pkg.github.com", StringComparison.OrdinalIgnoreCase);
|
||||||
if (!registryIsTokenCompatible)
|
if (!registryIsTokenCompatible)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var registryMatchesWorkflow = false;
|
|
||||||
|
|
||||||
// REGISTRY/OWNER/REPO/IMAGE[:TAG]
|
|
||||||
var imageParts = container.ContainerImage.Split('/');
|
|
||||||
if (imageParts.Length != 4)
|
|
||||||
{
|
|
||||||
executionContext.Warning($"Could not identify owner and repo for container image {container.ContainerImage}. Skipping automatic token auth");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var owner = imageParts[1];
|
|
||||||
var repo = imageParts[2];
|
|
||||||
var nwo = $"{owner}/{repo}";
|
|
||||||
if (nwo.Equals(executionContext.GetGitHubContext("repository"), StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
registryMatchesWorkflow = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
var registryCredentialsNotSupplied = string.IsNullOrEmpty(container.RegistryAuthUsername) && string.IsNullOrEmpty(container.RegistryAuthPassword);
|
var registryCredentialsNotSupplied = string.IsNullOrEmpty(container.RegistryAuthUsername) && string.IsNullOrEmpty(container.RegistryAuthPassword);
|
||||||
if (registryCredentialsNotSupplied && registryMatchesWorkflow)
|
if (registryCredentialsNotSupplied)
|
||||||
{
|
{
|
||||||
container.RegistryAuthUsername = executionContext.GetGitHubContext("actor");
|
container.RegistryAuthUsername = executionContext.GetGitHubContext("actor");
|
||||||
container.RegistryAuthPassword = executionContext.GetGitHubContext("token");
|
container.RegistryAuthPassword = executionContext.GetGitHubContext("token");
|
||||||
|
|||||||
@@ -979,7 +979,10 @@ namespace GitHub.Runner.Worker
|
|||||||
traceWriter = context.ToTemplateTraceWriter();
|
traceWriter = context.ToTemplateTraceWriter();
|
||||||
}
|
}
|
||||||
var schema = PipelineTemplateSchemaFactory.GetSchema();
|
var schema = PipelineTemplateSchemaFactory.GetSchema();
|
||||||
return new PipelineTemplateEvaluator(traceWriter, schema, context.Global.FileTable);
|
return new PipelineTemplateEvaluator(traceWriter, schema, context.Global.FileTable)
|
||||||
|
{
|
||||||
|
MaxErrorMessageLength = int.MaxValue, // Don't truncate error messages otherwise we might not scrub secrets correctly
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ObjectTemplating.ITraceWriter ToTemplateTraceWriter(this IExecutionContext context)
|
public static ObjectTemplating.ITraceWriter ToTemplateTraceWriter(this IExecutionContext context)
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
dockerCommandArgs.Add($"exec");
|
dockerCommandArgs.Add($"exec");
|
||||||
|
|
||||||
// [OPTIONS]
|
// [OPTIONS]
|
||||||
dockerCommandArgs.Add($"-it");
|
dockerCommandArgs.Add($"-i");
|
||||||
dockerCommandArgs.Add($"--workdir {workingDirectory}");
|
dockerCommandArgs.Add($"--workdir {workingDirectory}");
|
||||||
foreach (var env in environment)
|
foreach (var env in environment)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,6 +37,12 @@ namespace GitHub.DistributedTask.Logging
|
|||||||
return Base64StringEscapeShift(value, 2);
|
return Base64StringEscapeShift(value, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Used when we pass environment variables to docker to escape " with \"
|
||||||
|
public static String CommandLineArgumentEscape(String value)
|
||||||
|
{
|
||||||
|
return value.Replace("\"", "\\\"");
|
||||||
|
}
|
||||||
|
|
||||||
public static String ExpressionStringEscape(String value)
|
public static String ExpressionStringEscape(String value)
|
||||||
{
|
{
|
||||||
return Expressions2.Sdk.ExpressionUtility.StringEscape(value);
|
return Expressions2.Sdk.ExpressionUtility.StringEscape(value);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace GitHub.DistributedTask.Pipelines.ObjectTemplating
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the maximum error message length before the message will be truncated.
|
/// Gets the maximum error message length before the message will be truncated.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Int32 MaxErrorMessageLength => 500;
|
public Int32 MaxErrorMessageLength { get; set; } = 500;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the maximum number of errors that can be recorded when parsing a pipeline.
|
/// Gets the maximum number of errors that can be recorded when parsing a pipeline.
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<BuildConstants Include="}"/>
|
<BuildConstants Include="}"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<WriteLinesToFile File="Runner.Sdk/BuildConstants.cs" Lines="@(BuildConstants)" Overwrite="true" Encoding="Unicode"/>
|
<WriteLinesToFile File="Runner.Sdk/BuildConstants.cs" Lines="@(BuildConstants)" Overwrite="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.277.0
|
2.278.0
|
||||||
|
|||||||
Reference in New Issue
Block a user