From 29cf955ede30064df88e4c82b79967347087c2e2 Mon Sep 17 00:00:00 2001 From: Jacob Viau Date: Mon, 3 Feb 2025 13:50:29 -0800 Subject: [PATCH] Cleanup unneeded files, move others (#10736) --- .github/workflows/backport.yml | 2 +- Dockerfile | 35 - build/Get-AzureFunctionsVersion.psm1 | 20 - build/build-extensions.ps1 | 1 - build/check-vulnerabilities.ps1 | 24 - build/install-dotnet.yml | 16 - build/python.props | 6 - build/webjobs.png | Bin 14849 -> 0 bytes check.ps1 | 116 --- dotnet-install.sh | 976 ------------------ {tools => eng}/actions/backport/action.yml | 0 {tools => eng}/actions/backport/index.js | 0 .../official/jobs/run-integration-tests.yml | 4 +- .../official/jobs/run-non-e2e-tests.yml | 4 +- {build => eng/res}/functions.png | Bin {build => eng/script}/checkin-secrets.ps1 | 0 {build => eng/script}/checkout-secrets.ps1 | 0 src/Common/CommonAssemblyInfo.cs | 18 - src/Common/PublicKey.snk | Bin 160 -> 0 bytes .../GrpcMessageConversionExtensionsTests.cs | 4 +- 20 files changed, 7 insertions(+), 1219 deletions(-) delete mode 100644 Dockerfile delete mode 100644 build/Get-AzureFunctionsVersion.psm1 delete mode 100644 build/build-extensions.ps1 delete mode 100644 build/check-vulnerabilities.ps1 delete mode 100644 build/install-dotnet.yml delete mode 100644 build/python.props delete mode 100644 build/webjobs.png delete mode 100644 check.ps1 delete mode 100644 dotnet-install.sh rename {tools => eng}/actions/backport/action.yml (100%) rename {tools => eng}/actions/backport/index.js (100%) rename {build => eng/res}/functions.png (100%) rename {build => eng/script}/checkin-secrets.ps1 (100%) rename {build => eng/script}/checkout-secrets.ps1 (100%) delete mode 100644 src/Common/CommonAssemblyInfo.cs delete mode 100644 src/Common/PublicKey.snk diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 4112819ecb..b30c6447b1 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -39,7 +39,7 @@ jobs: with: fetch-depth: 0 - name: Run backport - uses: ./tools/actions/backport + uses: ./eng/actions/backport with: target_branch: ${{ steps.target-branch-extractor.outputs.result }} auth_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 86c6867f3f..0000000000 --- a/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS installer-env - -ENV PublishWithAspNetCoreTargetManifest false - -COPY . /workingdir - -RUN cd workingdir && \ - dotnet publish src/WebJobs.Script.WebHost/WebJobs.Script.WebHost.csproj --output /azure-functions-host - -# Runtime image -FROM mcr.microsoft.com/azure-functions/python:3.0 - -RUN apt-get update && \ - apt-get install -y gnupg && \ - curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ - apt-get update && \ - apt-get install -y nodejs dotnet-sdk-3.1 - -# Install the dependencies for Visual Studio Remote Debugger -RUN apt-get update && apt-get install -y --no-install-recommends unzip procps - -# Install Visual Studio Remote Debugger -RUN curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v latest -l ~/vsdbg - -COPY --from=installer-env ["/azure-functions-host", "/azure-functions-host"] - -ENV AzureWebJobsScriptRoot=/home/site/wwwroot \ - HOME=/home \ - ASPNETCORE_URLS=http://+:80 \ - AZURE_FUNCTIONS_ENVIRONMENT=Development \ - FUNCTIONS_WORKER_RUNTIME= - -EXPOSE 80 - -CMD dotnet /azure-functions-host/Microsoft.Azure.WebJobs.Script.WebHost.dll diff --git a/build/Get-AzureFunctionsVersion.psm1 b/build/Get-AzureFunctionsVersion.psm1 deleted file mode 100644 index 5f742363f3..0000000000 --- a/build/Get-AzureFunctionsVersion.psm1 +++ /dev/null @@ -1,20 +0,0 @@ -function Get-AzureFunctionsVersion { - param( - [string] $buildNumber, - [string] $suffix, - [string] $minorVersionPrefix - ) - - $hasSuffix = ![string]::IsNullOrEmpty($suffix) - - $suffixCmd = "" - if ($hasSuffix) { - $suffixCmd = "/p:VersionSuffix=$suffix" - } - - # use the same logic as the projects to generate the site extension version - $cmd = "build", "$PSScriptRoot\common.props", "/t:EchoVersion", "-restore:False", "/p:BuildNumber=$buildNumber", "/p:MinorVersionPrefix=$minorVersionPrefix", $suffixCmd, "--nologo", "-clp:NoSummary" - $version = (& dotnet $cmd).Trim() - - return $version -} diff --git a/build/build-extensions.ps1 b/build/build-extensions.ps1 deleted file mode 100644 index 479c6b3e0e..0000000000 --- a/build/build-extensions.ps1 +++ /dev/null @@ -1 +0,0 @@ -Write-Error "This script is no longer used. Instead, publish src/WebJobs.Script.SiteExtension/WebJobs.Script.SiteExtension.proj directly." diff --git a/build/check-vulnerabilities.ps1 b/build/check-vulnerabilities.ps1 deleted file mode 100644 index 06361a1dcf..0000000000 --- a/build/check-vulnerabilities.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -$projectPath = "$PSScriptRoot\..\src\WebJobs.Script.WebHost\WebJobs.Script.WebHost.csproj" -$logFilePath = "$PSScriptRoot\..\build.log" -if (-not (Test-Path $projectPath)) -{ - throw "Project path '$projectPath' does not exist." -} - -$cmd = "list", $projectPath, "package", "--include-transitive", "--vulnerable" -Write-Host "dotnet $cmd" -dotnet $cmd | Tee-Object build.log - -$result = Get-content $logFilePath | select-string "has no vulnerable packages given the current sources" - -$logFileExists = Test-Path $logFilePath -PathType Leaf -if ($logFileExists) -{ - Remove-Item $logFilePath -} - -if (!$result) -{ - Write-Host "Vulnerabilities found" - Exit 1 -} diff --git a/build/install-dotnet.yml b/build/install-dotnet.yml deleted file mode 100644 index 5826ed83b2..0000000000 --- a/build/install-dotnet.yml +++ /dev/null @@ -1,16 +0,0 @@ -steps: -- task: UseDotNet@2 # Needed by some of our test resources - displayName: 'Install .NET 3.1' - inputs: - packageType: sdk - version: 3.1.x -- task: UseDotNet@2 # Needed by our projects and CI steps - displayName: 'Install .NET 6' - inputs: - packageType: sdk - version: 6.x -- task: UseDotNet@2 # The pinned SDK we use to build - displayName: 'Install .NET SDK from global.json' - inputs: - packageType: sdk - useGlobalJson: true diff --git a/build/python.props b/build/python.props deleted file mode 100644 index 05b690e9d4..0000000000 --- a/build/python.props +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/build/webjobs.png b/build/webjobs.png deleted file mode 100644 index 831f064bfbe73617e373629cb208266368242cbc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14849 zcmd^m^b|{6nN07-*`k4%CgYZ;`&h+|_QV0YKw@^qCVJ0HA=efw^WlsYFMIN5@4+M+e8n z1;-@?$EEovWyX=(Ntym>Io_ECNl8imnFZcCpsi-o;H$BIpGC0X}P)n#dWUb9cj4*(FK)hxy6~exp4*M z!Nql+Vzhkbvrp~i# zDYL07xMM1_sn@$}DW|C`sdYHKW2&a6#=mPWt#!b^YbmZ{EVyefu4A&GsVlr|&cAo5 zuC6Y)ceS#qHN1Bzymz&{wX3PADW_{JdSEqfV70ZiwWgytX?Qhhcs*@+y`!Teb8Nk< zt1D-0J$G!qx3{--U@UiXy;Yw zlaozLJFQDQ!*fehQ&SzQI|EDW9jkkDb923<>(bJ|`rgvg((wA;>gwv)_ruBWhwJO> zQ#*%qJBQ!De_z@=T-rO?+1Xj$J6R{y!;`(ez3+!7JBKHShle{SCwu?u#o@`t$-i=O za`CT_ruY9_`BM4k7fJJHkg1{B|9blW)!{Ye{`L+LR`(! z)lf4Jv;SHA*V%S9eEPNj1BGfEIi!uL{fJGRdKr%A%G=jLv)QvZio9Ago5!B_|G13k z-)?~or=y|XBDBBEaXiM^=(>;jy!yQ}OO1Z=|g?ucP;mH)#kN3_bih(G}Nu7c{MFE1uMF_nOl%1L<5{)ZdK zR7U8JNCMlXC9c0pGQX5=rmNXPJpS&<&E2JV+{NdfSHk&;TM&$TcQ>ydF9~zKvn5hM z{*(sad9lGpG&>cgPLF!tyAcAi%Z!wWsVVl zkaCm>Xu`$$gH@4vmXuR2@bw3ygDlAgKsHwQ-Ly5eFUlo99B|l1@>c<}ANGT9tt@Hx zex~cBh0)_B?mla5BTNnUhOPbAf=)m>?%N%gXN0%!e>9Hf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yDul?aFkqyl@|oMolPuxxof5{+(T_ zFHH43OY`JevH%<)n<9?prQgHAo$D+or_h^pCYiBp^NR}aFHnRVKsAJ-&-coc(W8xl zm6?IkM~t+D&PY0Jr1R>%+3LDbr1Q>wea%!vWTFAnDOt+YF&%(;4_cf z25)H@cT;h1Eg*%$ddtq2!dao~E!ievmA<_6xJfS+ST~#LNbYL+*#b$xRkkxICIfV~ z)~QnV$$%Iaj2hZ4^AcojwOPnlf|t@v0MX`fc{A|j$KoeCvHJpgpi&>x&%+Dyl$EY; VU)Tpo|Iz{gT}?xcI(5hR{{xlXV}1Yt diff --git a/check.ps1 b/check.ps1 deleted file mode 100644 index b3432f1b50..0000000000 --- a/check.ps1 +++ /dev/null @@ -1,116 +0,0 @@ -# Check prereqs for Script Runtime -# prints diagnostic messages. - -function Check([string] $componentName, [string] $verstr, [Version] $requiredVersion) -{ - if ($verStr[0] -eq "v") # trim leading 'v' - { - $verStr = $verStr.Substring(1) - } - - # Version could be a beta, like 2.1.200-preview-007576 - $x = $verstr; - $idxDash = $x.IndexOf('-') - if ($idxDash -gt 0) { - $x = $x.Substring(0, $idxDash) - } - - $actualVersion = [Version]::Parse($x) - - $msg = $componentName + " " + $verstr; - - if ($actualVersion -lt $requiredVersion) - { - Write-Host ("[X] " + $msg +". Error. Must be at least major version " + $requiredVersion) -ForegroundColor Red - return $false - } else { - Write-Host -NoNewline ("[*] " + $msg) -foreground "green" - Write-Host " (must be at least" $requiredVersion ")" - return $true - } -} - - -Write-Host "Checking dependencies" - -# Check VS -# Use vswhere, which is installed with VS 15.2 and later. https://github.com/Microsoft/vswhere -$x= [Environment]::ExpandEnvironmentVariables("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe") -if(![System.IO.File]::Exists($x)){ - Write-Host " VSWhere is missing. Is VS 2017 installed? See https://www.visualstudio.com/downloads/ " -ForegroundColor Red -} else { - $installedVersions = & $x -property catalog_buildVersion - - # could be either a string or an array of strings. - if ($installedVersions -is [array]) { - # as an array, take the latest version on the machine - $latest = [Version]::Parse($installedVersions[0]) - Write-Host " Multiple VS versions installed:" - foreach($ver in $installedVersions) { - $verCurrent = [Version]::Parse($ver) - Write-Host " " $verCurrent - if ($verCurrent -gt $latest) { - $latest = $verCurrent - } - } - } else { - $latest = $installedVersions; - } - - - $ok = Check "VS 2017" ($latest.ToString()) ([Version]::Parse("15.7.0")) - if (-Not $ok) { - Write-Host " You can update VS from the Tools | Extensions and Updates menu." - } -} - -# Check dotnet -# C:\dev\AFunc\script-core3>dotnet --version -# 2.0.0 -$actualVersion = & "dotnet" --version -$ok = Check "dotnet" $actualVersion ([Version]::Parse("2.1.300")) -if (-Not $ok) { - Write-Host "You can update by installing '.NET Core 2.1 SDK' from https://www.microsoft.com/net/download/windows" - Write-Host -} - -# Check Node -$actualVersion = & "node" -v -$ok = Check "node" $actualVersion ([Version]::Parse("8.4.0")) -if (-Not $ok) { - Write-Host " You can update node by downloading the latest from https://nodejs.org" - Write-Host -} - -# Check NPM -$actualVersion = & "npm" -v -$ok = Check "npm" $actualVersion ([Version]::Parse("5.0")) - -if (-Not $ok) { - Write-Host "You can upgrade npm by running: " - Write-Host " npm install -g npm@latest" - Write-Host -} - -# Check Java -$javaFullVersion = & "java" -version 2>&1 -$javaVersion = $javaFullVersion[0].toString().Split(' ') -$javaVersion = $javaVersion[2].Trim('"') -$underscoreIndex = $javaVersion.IndexOf('_') -$actualVersion = $javaVersion.Substring(0, $underscoreIndex) -$ok = Check "java" $actualVersion ([Version]::Parse("1.8.0")) - -if (-Not $ok) { - Write-Host " You can udpate java by downloading from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html" - Write-Host -} -$ok = Test-Path 'env:JAVA_HOME' -if (-Not $ok) { - Write-Host "JAVA_HOME Environment variable not set. Set it to JDK folder. Example c:\Program Files\Java\jdk1.8.0_171" -ForegroundColor Red - Write-Host -} - - -# See here for hints on doing Devenv detection: -# https://stackoverflow.com/questions/42435592/determining-installed-visual-studio-path-for-2017 -# Or here: https://stackoverflow.com/questions/40694598/how-do-i-call-visual-studio-2017-rcs-version-of-msbuild-from-a-bat-file/40702534#40702534 \ No newline at end of file diff --git a/dotnet-install.sh b/dotnet-install.sh deleted file mode 100644 index 881dc69226..0000000000 --- a/dotnet-install.sh +++ /dev/null @@ -1,976 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) .NET Foundation and contributors. All rights reserved. -# Licensed under the MIT license. See LICENSE file in the project root for full license information. -# -# Original file from https://github.com/dotnet/cli/blob/80d542b8f4eff847a0f72dc8f2c2a29851272778/scripts/obtain/dotnet-install.sh - -# Stop script on NZEC -set -e -# Stop script if unbound variable found (use ${var:-} if intentional) -set -u -# By default cmd1 | cmd2 returns exit code of cmd2 regardless of cmd1 success -# This is causing it to fail -set -o pipefail - -# Use in the the functions: eval $invocation -invocation='say_verbose "Calling: ${yellow:-}${FUNCNAME[0]} ${green:-}$*${normal:-}"' - -# standard output may be used as a return value in the functions -# we need a way to write text on the screen in the functions so that -# it won't interfere with the return value. -# Exposing stream 3 as a pipe to standard output of the script itself -exec 3>&1 - -# Setup some colors to use. These need to work in fairly limited shells, like the Ubuntu Docker container where there are only 8 colors. -# See if stdout is a terminal -if [ -t 1 ] && command -v tput > /dev/null; then - # see if it supports colors - ncolors=$(tput colors) - if [ -n "$ncolors" ] && [ $ncolors -ge 8 ]; then - bold="$(tput bold || echo)" - normal="$(tput sgr0 || echo)" - black="$(tput setaf 0 || echo)" - red="$(tput setaf 1 || echo)" - green="$(tput setaf 2 || echo)" - yellow="$(tput setaf 3 || echo)" - blue="$(tput setaf 4 || echo)" - magenta="$(tput setaf 5 || echo)" - cyan="$(tput setaf 6 || echo)" - white="$(tput setaf 7 || echo)" - fi -fi - -say_warning() { - printf "%b\n" "${yellow:-}dotnet_install: Warning: $1${normal:-}" -} - -say_err() { - printf "%b\n" "${red:-}dotnet_install: Error: $1${normal:-}" >&2 -} - -say() { - # using stream 3 (defined in the beginning) to not interfere with stdout of functions - # which may be used as return value - printf "%b\n" "${cyan:-}dotnet-install:${normal:-} $1" >&3 -} - -say_verbose() { - if [ "$verbose" = true ]; then - say "$1" - fi -} - -# This platform list is finite - if the SDK/Runtime has supported Linux distribution-specific assets, -# then and only then should the Linux distribution appear in this list. -# Adding a Linux distribution to this list does not imply distribution-specific support. -get_legacy_os_name_from_platform() { - eval $invocation - - platform="$1" - case "$platform" in - "centos.7") - echo "centos" - return 0 - ;; - "debian.8") - echo "debian" - return 0 - ;; - "fedora.23") - echo "fedora.23" - return 0 - ;; - "fedora.27") - echo "fedora.27" - return 0 - ;; - "fedora.24") - echo "fedora.24" - return 0 - ;; - "opensuse.13.2") - echo "opensuse.13.2" - return 0 - ;; - "opensuse.42.1") - echo "opensuse.42.1" - return 0 - ;; - "opensuse.42.3") - echo "opensuse.42.3" - return 0 - ;; - "rhel.7"*) - echo "rhel" - return 0 - ;; - "ubuntu.14.04") - echo "ubuntu" - return 0 - ;; - "ubuntu.16.04") - echo "ubuntu.16.04" - return 0 - ;; - "ubuntu.16.10") - echo "ubuntu.16.10" - return 0 - ;; - "ubuntu.18.04") - echo "ubuntu.18.04" - return 0 - ;; - "alpine.3.4.3") - echo "alpine" - return 0 - ;; - esac - return 1 -} - -get_linux_platform_name() { - eval $invocation - - if [ -n "$runtime_id" ]; then - echo "${runtime_id%-*}" - return 0 - else - if [ -e /etc/os-release ]; then - . /etc/os-release - echo "$ID.$VERSION_ID" - return 0 - elif [ -e /etc/redhat-release ]; then - local redhatRelease=$( /dev/null 2>&1 - return $? -} - - -check_min_reqs() { - local hasMinimum=false - if machine_has "curl"; then - hasMinimum=true - elif machine_has "wget"; then - hasMinimum=true - fi - - if [ "$hasMinimum" = "false" ]; then - say_err "curl (recommended) or wget are required to download dotnet. Install missing prerequisite to proceed." - return 1 - fi - return 0 -} - -check_pre_reqs() { - eval $invocation - - if [ "${DOTNET_INSTALL_SKIP_PREREQS:-}" = "1" ]; then - return 0 - fi - - if [ "$(uname)" = "Linux" ]; then - if [ ! -x "$(command -v ldconfig)" ]; then - echo "ldconfig is not in PATH, trying /sbin/ldconfig." - LDCONFIG_COMMAND="/sbin/ldconfig" - else - LDCONFIG_COMMAND="ldconfig" - fi - - local librarypath=${LD_LIBRARY_PATH:-} - LDCONFIG_COMMAND="$LDCONFIG_COMMAND -NXv ${librarypath//:/ }" - - [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libunwind)" ] && say_warning "Unable to locate libunwind. Probable prerequisite missing; please install libunwind." - [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libssl)" ] && say_warning "Unable to locate libssl. Probable prerequisite missing; please install libssl." - [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep libicu)" ] && say_warning "Unable to locate libicu. Probable prerequisite missing; please install libicu." - [ -z "$($LDCONFIG_COMMAND 2>/dev/null | grep -F libcurl.so)" ] && say_warning "Unable to locate libcurl. Probable prerequisite missing; please install libcurl." - fi - - return 0 -} - -# args: -# input - $1 -to_lowercase() { - #eval $invocation - - echo "$1" | tr '[:upper:]' '[:lower:]' - return 0 -} - -# args: -# input - $1 -remove_trailing_slash() { - #eval $invocation - - local input="${1:-}" - echo "${input%/}" - return 0 -} - -# args: -# input - $1 -remove_beginning_slash() { - #eval $invocation - - local input="${1:-}" - echo "${input#/}" - return 0 -} - -# args: -# root_path - $1 -# child_path - $2 - this parameter can be empty -combine_paths() { - eval $invocation - - # TODO: Consider making it work with any number of paths. For now: - if [ ! -z "${3:-}" ]; then - say_err "combine_paths: Function takes two parameters." - return 1 - fi - - local root_path="$(remove_trailing_slash "$1")" - local child_path="$(remove_beginning_slash "${2:-}")" - say_verbose "combine_paths: root_path=$root_path" - say_verbose "combine_paths: child_path=$child_path" - echo "$root_path/$child_path" - return 0 -} - -get_machine_architecture() { - eval $invocation - - if command -v uname > /dev/null; then - CPUName=$(uname -m) - case $CPUName in - armv7l) - echo "arm" - return 0 - ;; - aarch64) - echo "arm64" - return 0 - ;; - esac - fi - - # Always default to 'x64' - echo "x64" - return 0 -} - -# args: -# architecture - $1 -get_normalized_architecture_from_architecture() { - eval $invocation - - local architecture="$(to_lowercase "$1")" - case "$architecture" in - \) - echo "$(get_normalized_architecture_from_architecture "$(get_machine_architecture)")" - return 0 - ;; - amd64|x64) - echo "x64" - return 0 - ;; - arm) - echo "arm" - return 0 - ;; - arm64) - echo "arm64" - return 0 - ;; - esac - - say_err "Architecture \`$architecture\` not supported. If you think this is a bug, please report it at https://github.com/dotnet/cli/issues" - return 1 -} - -# version_info is a conceptual two line string representing commit hash and 4-part version -# format: -# Line 1: # commit_hash -# Line 2: # 4-part version - -# args: -# version_text - stdin -get_version_from_version_info() { - eval $invocation - - cat | tail -n 1 | sed 's/\r$//' - return 0 -} - -# args: -# version_text - stdin -get_commit_hash_from_version_info() { - eval $invocation - - cat | head -n 1 | sed 's/\r$//' - return 0 -} - -# args: -# install_root - $1 -# relative_path_to_package - $2 -# specific_version - $3 -is_dotnet_package_installed() { - eval $invocation - - local install_root="$1" - local relative_path_to_package="$2" - local specific_version="${3//[$'\t\r\n']}" - - local dotnet_package_path="$(combine_paths "$(combine_paths "$install_root" "$relative_path_to_package")" "$specific_version")" - say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path" - - if [ -d "$dotnet_package_path" ]; then - return 0 - else - return 1 - fi -} - -# args: -# azure_feed - $1 -# channel - $2 -# normalized_architecture - $3 -# coherent - $4 -get_latest_version_info() { - eval $invocation - - local azure_feed="$1" - local channel="$2" - local normalized_architecture="$3" - local coherent="$4" - - local version_file_url=null - if [[ "$runtime" == "dotnet" ]]; then - version_file_url="$uncached_feed/Runtime/$channel/latest.version" - elif [[ "$runtime" == "aspnetcore" ]]; then - version_file_url="$uncached_feed/aspnetcore/Runtime/$channel/latest.version" - elif [ -z "$runtime" ]; then - if [ "$coherent" = true ]; then - version_file_url="$uncached_feed/Sdk/$channel/latest.coherent.version" - else - version_file_url="$uncached_feed/Sdk/$channel/latest.version" - fi - else - say_err "Invalid value for \$runtime" - return 1 - fi - say_verbose "get_latest_version_info: latest url: $version_file_url" - - download "$version_file_url" - return $? -} - -# args: -# azure_feed - $1 -# channel - $2 -# normalized_architecture - $3 -# version - $4 -get_specific_version_from_version() { - eval $invocation - - local azure_feed="$1" - local channel="$2" - local normalized_architecture="$3" - local version="$(to_lowercase "$4")" - - case "$version" in - latest) - local version_info - 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" - echo "$version_info" | get_version_from_version_info - return 0 - ;; - coherent) - local version_info - version_info="$(get_latest_version_info "$azure_feed" "$channel" "$normalized_architecture" true)" || return 1 - say_verbose "get_specific_version_from_version: version_info=$version_info" - echo "$version_info" | get_version_from_version_info - return 0 - ;; - *) - echo "$version" - return 0 - ;; - esac -} - -# args: -# azure_feed - $1 -# channel - $2 -# normalized_architecture - $3 -# specific_version - $4 -construct_download_link() { - eval $invocation - - local azure_feed="$1" - local channel="$2" - local normalized_architecture="$3" - local specific_version="${4//[$'\t\r\n']}" - - local osname - osname="$(get_current_os_name)" || return 1 - - local download_link=null - if [[ "$runtime" == "dotnet" ]]; then - download_link="$azure_feed/Runtime/$specific_version/dotnet-runtime-$specific_version-$osname-$normalized_architecture.tar.gz" - elif [[ "$runtime" == "aspnetcore" ]]; then - download_link="$azure_feed/aspnetcore/Runtime/$specific_version/aspnetcore-runtime-$specific_version-$osname-$normalized_architecture.tar.gz" - elif [ -z "$runtime" ]; then - download_link="$azure_feed/Sdk/$specific_version/dotnet-sdk-$specific_version-$osname-$normalized_architecture.tar.gz" - else - return 1 - fi - - echo "$download_link" - return 0 -} - -# args: -# azure_feed - $1 -# channel - $2 -# normalized_architecture - $3 -# specific_version - $4 -construct_legacy_download_link() { - eval $invocation - - local azure_feed="$1" - local channel="$2" - local normalized_architecture="$3" - local specific_version="${4//[$'\t\r\n']}" - - local distro_specific_osname - distro_specific_osname="$(get_legacy_os_name)" || return 1 - - local legacy_download_link=null - if [[ "$runtime" == "dotnet" ]]; then - legacy_download_link="$azure_feed/Runtime/$specific_version/dotnet-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz" - elif [ -z "$runtime" ]; then - legacy_download_link="$azure_feed/Sdk/$specific_version/dotnet-dev-$distro_specific_osname-$normalized_architecture.$specific_version.tar.gz" - else - return 1 - fi - - echo "$legacy_download_link" - return 0 -} - -get_user_install_path() { - eval $invocation - - if [ ! -z "${DOTNET_INSTALL_DIR:-}" ]; then - echo "$DOTNET_INSTALL_DIR" - else - echo "$HOME/.dotnet" - fi - return 0 -} - -# args: -# install_dir - $1 -resolve_installation_path() { - eval $invocation - - local install_dir=$1 - if [ "$install_dir" = "" ]; then - local user_install_path="$(get_user_install_path)" - say_verbose "resolve_installation_path: user_install_path=$user_install_path" - echo "$user_install_path" - return 0 - fi - - echo "$install_dir" - return 0 -} - -# args: -# install_root - $1 -get_installed_version_info() { - eval $invocation - - local install_root="$1" - local version_file="$(combine_paths "$install_root" "$local_version_file_relative_path")" - say_verbose "Local version file: $version_file" - if [ ! -z "$version_file" ] | [ -r "$version_file" ]; then - local version_info="$(cat "$version_file")" - echo "$version_info" - return 0 - fi - - say_verbose "Local version file not found." - return 0 -} - -# args: -# relative_or_absolute_path - $1 -get_absolute_path() { - eval $invocation - - local relative_or_absolute_path=$1 - echo "$(cd "$(dirname "$1")" && pwd -P)/$(basename "$1")" - return 0 -} - -# args: -# input_files - stdin -# root_path - $1 -# out_path - $2 -# override - $3 -copy_files_or_dirs_from_list() { - eval $invocation - - local root_path="$(remove_trailing_slash "$1")" - local out_path="$(remove_trailing_slash "$2")" - local override="$3" - local osname="$(get_current_os_name)" - local override_switch=$( - if [ "$override" = false ]; then - if [[ "$osname" == "linux-musl" ]]; then - printf -- "-u"; - else - printf -- "-n"; - fi - fi) - - cat | uniq | while read -r file_path; do - local path="$(remove_beginning_slash "${file_path#$root_path}")" - local target="$out_path/$path" - if [ "$override" = true ] || (! ([ -d "$target" ] || [ -e "$target" ])); then - mkdir -p "$out_path/$(dirname "$path")" - cp -R $override_switch "$root_path/$path" "$target" - fi - done -} - -# args: -# zip_path - $1 -# out_path - $2 -extract_dotnet_package() { - eval $invocation - - local zip_path="$1" - local out_path="$2" - - local temp_out_path="$(mktemp -d "$temporary_file_template")" - - local failed=false - tar -xzf "$zip_path" -C "$temp_out_path" > /dev/null || failed=true - - local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/' - find "$temp_out_path" -type f | grep -Eo "$folders_with_version_regex" | sort | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" false - find "$temp_out_path" -type f | grep -Ev "$folders_with_version_regex" | copy_files_or_dirs_from_list "$temp_out_path" "$out_path" "$override_non_versioned_files" - - rm -rf "$temp_out_path" - - if [ "$failed" = true ]; then - say_err "Extraction failed" - return 1 - fi -} - -# args: -# remote_path - $1 -# [out_path] - $2 - stdout if not provided -download() { - eval $invocation - - local remote_path="$1" - local out_path="${2:-}" - - local failed=false - if machine_has "curl"; then - downloadcurl "$remote_path" "$out_path" || failed=true - elif machine_has "wget"; then - downloadwget "$remote_path" "$out_path" || failed=true - else - failed=true - fi - if [ "$failed" = true ]; then - say_verbose "Download failed: $remote_path" - return 1 - fi - return 0 -} - -downloadcurl() { - eval $invocation - local remote_path="$1" - local out_path="${2:-}" - - # Append feed_credential as late as possible before calling curl to avoid logging feed_credential - remote_path="${remote_path}${feed_credential}" - - local failed=false - if [ -z "$out_path" ]; then - curl --retry 10 -sSL -f --create-dirs "$remote_path" || failed=true - else - curl --retry 10 -sSL -f --create-dirs -o "$out_path" "$remote_path" || failed=true - fi - if [ "$failed" = true ]; then - say_verbose "Curl download failed" - return 1 - fi - return 0 -} - -downloadwget() { - eval $invocation - local remote_path="$1" - local out_path="${2:-}" - - # Append feed_credential as late as possible before calling wget to avoid logging feed_credential - remote_path="${remote_path}${feed_credential}" - - local failed=false - if [ -z "$out_path" ]; then - wget -q --tries 10 -O - "$remote_path" || failed=true - else - wget --tries 10 -O "$out_path" "$remote_path" || failed=true - fi - if [ "$failed" = true ]; then - say_verbose "Wget download failed" - return 1 - fi - return 0 -} - -calculate_vars() { - eval $invocation - valid_legacy_download_link=true - - normalized_architecture="$(get_normalized_architecture_from_architecture "$architecture")" - say_verbose "normalized_architecture=$normalized_architecture" - - specific_version="$(get_specific_version_from_version "$azure_feed" "$channel" "$normalized_architecture" "$version")" - say_verbose "specific_version=$specific_version" - if [ -z "$specific_version" ]; then - say_err "Could not get version information." - return 1 - fi - - download_link="$(construct_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" - say_verbose "download_link=$download_link" - - legacy_download_link="$(construct_legacy_download_link "$azure_feed" "$channel" "$normalized_architecture" "$specific_version")" || valid_legacy_download_link=false - - if [ "$valid_legacy_download_link" = true ]; then - say_verbose "legacy_download_link=$legacy_download_link" - else - say_verbose "Cound not construct a legacy_download_link; omitting..." - fi - - install_root="$(resolve_installation_path "$install_dir")" - say_verbose "install_root=$install_root" -} - -install_dotnet() { - eval $invocation - local download_failed=false - local asset_name='' - local asset_relative_path='' - - if [[ "$runtime" == "dotnet" ]]; then - asset_relative_path="shared/Microsoft.NETCore.App" - asset_name=".NET Core Runtime" - elif [[ "$runtime" == "aspnetcore" ]]; then - asset_relative_path="shared/Microsoft.AspNetCore.App" - asset_name="ASP.NET Core Runtime" - elif [ -z "$runtime" ]; then - asset_relative_path="sdk" - asset_name=".NET Core SDK" - else - say_err "Invalid value for \$runtime" - return 1 - fi - - # Check if the SDK version is already installed. - if is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then - say "$asset_name version $specific_version is already installed." - return 0 - fi - - mkdir -p "$install_root" - zip_path="$(mktemp "$temporary_file_template")" - say_verbose "Zip path: $zip_path" - - say "Downloading link: $download_link" - - # Failures are normal in the non-legacy case for ultimately legacy downloads. - # Do not output to stderr, since output to stderr is considered an error. - download "$download_link" "$zip_path" 2>&1 || download_failed=true - - # if the download fails, download the legacy_download_link - if [ "$download_failed" = true ]; then - say "Cannot download: $download_link" - - if [ "$valid_legacy_download_link" = true ]; then - download_failed=false - download_link="$legacy_download_link" - zip_path="$(mktemp "$temporary_file_template")" - say_verbose "Legacy zip path: $zip_path" - say "Downloading legacy link: $download_link" - download "$download_link" "$zip_path" 2>&1 || download_failed=true - fi - fi - - if [ "$download_failed" = true ]; then - say_err "Could not download $asset_name version $specific_version" - return 1 - fi - - say "Extracting zip from $download_link" - extract_dotnet_package "$zip_path" "$install_root" - - # Check if the SDK version is now installed; if not, fail the installation. - if ! is_dotnet_package_installed "$install_root" "$asset_relative_path" "$specific_version"; then - say_err "$asset_name version $specific_version failed to install with an unknown error." - return 1 - fi - - return 0 -} - -local_version_file_relative_path="/.version" -bin_folder_relative_path="" -temporary_file_template="${TMPDIR:-/tmp}/dotnet.XXXXXXXXX" - -channel="LTS" -version="Latest" -install_dir="" -architecture="" -dry_run=false -no_path=false -azure_feed="https://builds.dotnet.microsoft.com/dotnet" -uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet" -feed_credential="" -verbose=false -runtime="" -runtime_id="" -override_non_versioned_files=true - -while [ $# -ne 0 ] -do - name="$1" - case "$name" in - -c|--channel|-[Cc]hannel) - shift - channel="$1" - ;; - -v|--version|-[Vv]ersion) - shift - version="$1" - ;; - -i|--install-dir|-[Ii]nstall[Dd]ir) - shift - install_dir="$1" - ;; - --arch|--architecture|-[Aa]rch|-[Aa]rchitecture) - shift - architecture="$1" - ;; - --shared-runtime|-[Ss]hared[Rr]untime) - say_warning "The --shared-runtime flag is obsolete and may be removed in a future version of this script. The recommended usage is to specify '--runtime dotnet'." - if [ -z "$runtime" ]; then - runtime="dotnet" - fi - ;; - --runtime|-[Rr]untime) - shift - runtime="$1" - if [[ "$runtime" != "dotnet" ]] && [[ "$runtime" != "aspnetcore" ]]; then - say_err "Unsupported value for --runtime: '$1'. Valid values are 'dotnet' and 'aspnetcore'." - exit 1 - fi - ;; - --dry-run|-[Dd]ry[Rr]un) - dry_run=true - ;; - --no-path|-[Nn]o[Pp]ath) - no_path=true - ;; - --verbose|-[Vv]erbose) - verbose=true - ;; - --azure-feed|-[Aa]zure[Ff]eed) - shift - azure_feed="$1" - ;; - --uncached-feed|-[Uu]ncached[Ff]eed) - shift - uncached_feed="$1" - ;; - --feed-credential|-[Ff]eed[Cc]redential) - shift - feed_credential="$1" - ;; - --runtime-id|-[Rr]untime[Ii]d) - shift - runtime_id="$1" - ;; - --skip-non-versioned-files|-[Ss]kip[Nn]on[Vv]ersioned[Ff]iles) - override_non_versioned_files=false - ;; - -?|--?|-h|--help|-[Hh]elp) - script_name="$(basename "$0")" - echo ".NET Tools Installer" - echo "Usage: $script_name [-c|--channel ] [-v|--version ] [-p|--prefix ]" - echo " $script_name -h|-?|--help" - echo "" - echo "$script_name is a simple command line interface for obtaining dotnet cli." - echo "" - echo "Options:" - echo " -c,--channel Download from the channel specified, Defaults to \`$channel\`." - echo " -Channel" - echo " Possible values:" - echo " - Current - most current release" - echo " - LTS - most current supported release" - echo " - 2-part version in a format A.B - represents a specific release" - echo " examples: 2.0; 1.0" - echo " - Branch name" - echo " examples: release/2.0.0; Master" - echo " -v,--version Use specific VERSION, Defaults to \`$version\`." - echo " -Version" - echo " Possible values:" - echo " - latest - most latest build on specific channel" - echo " - coherent - most latest coherent build on specific channel" - echo " coherent applies only to SDK downloads" - echo " - 3-part version in a format A.B.C - represents specific version of build" - echo " examples: 2.0.0-preview2-006120; 1.1.0" - echo " -i,--install-dir Install under specified location (see Install Location below)" - echo " -InstallDir" - echo " --architecture Architecture of dotnet binaries to be installed, Defaults to \`$architecture\`." - echo " --arch,-Architecture,-Arch" - echo " Possible values: x64, arm, and arm64" - echo " --runtime Installs a shared runtime only, without the SDK." - echo " -Runtime" - echo " Possible values:" - echo " - dotnet - the Microsoft.NETCore.App shared runtime" - echo " - aspnetcore - the Microsoft.AspNetCore.App shared runtime" - echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable." - echo " -SkipNonVersionedFiles" - echo " --dry-run,-DryRun Do not perform installation. Display download link." - echo " --no-path, -NoPath Do not set PATH for the current process." - echo " --verbose,-Verbose Display diagnostics information." - echo " --azure-feed,-AzureFeed Azure feed location. Defaults to $azure_feed, This parameter typically is not changed by the user." - echo " --uncached-feed,-UncachedFeed Uncached feed location. This parameter typically is not changed by the user." - echo " --feed-credential,-FeedCredential Azure feed shared access token. This parameter typically is not specified." - echo " --runtime-id Installs the .NET Tools for the given platform (use linux-x64 for portable linux)." - echo " -RuntimeId" - echo " -?,--?,-h,--help,-Help Shows this help message" - echo "" - echo "Obsolete parameters:" - echo " --shared-runtime The recommended alternative is '--runtime dotnet'." - echo " -SharedRuntime Installs just the shared runtime bits, not the entire SDK." - echo "" - echo "Install Location:" - echo " Location is chosen in following order:" - echo " - --install-dir option" - echo " - Environmental variable DOTNET_INSTALL_DIR" - echo " - $HOME/.dotnet" - exit 0 - ;; - *) - say_err "Unknown argument \`$name\`" - exit 1 - ;; - esac - - shift -done - -check_min_reqs -calculate_vars - -if [ "$dry_run" = true ]; then - say "Payload URL: $download_link" - if [ "$valid_legacy_download_link" = true ]; then - say "Legacy payload URL: $legacy_download_link" - fi - say "Repeatable invocation: ./$(basename "$0") --version $specific_version --channel $channel --install-dir $install_dir" - exit 0 -fi - -check_pre_reqs -install_dotnet - -bin_path="$(get_absolute_path "$(combine_paths "$install_root" "$bin_folder_relative_path")")" -if [ "$no_path" = false ]; then - say "Adding to current process PATH: \`$bin_path\`. Note: This change will be visible only when sourcing script." - export PATH="$bin_path":"$PATH" -else - say "Binaries of dotnet can be found in $bin_path" -fi - -say "Installation finished successfully." \ No newline at end of file diff --git a/tools/actions/backport/action.yml b/eng/actions/backport/action.yml similarity index 100% rename from tools/actions/backport/action.yml rename to eng/actions/backport/action.yml diff --git a/tools/actions/backport/index.js b/eng/actions/backport/index.js similarity index 100% rename from tools/actions/backport/index.js rename to eng/actions/backport/index.js diff --git a/eng/ci/templates/official/jobs/run-integration-tests.yml b/eng/ci/templates/official/jobs/run-integration-tests.yml index bbd8ee5bc1..cfa106e23d 100644 --- a/eng/ci/templates/official/jobs/run-integration-tests.yml +++ b/eng/ci/templates/official/jobs/run-integration-tests.yml @@ -46,7 +46,7 @@ jobs: inputs: azureSubscription: Azure-Functions-Host-CI-internal azurePowerShellVersion: 'LatestVersion' - ScriptPath: build/checkout-secrets.ps1 + ScriptPath: eng/script/checkout-secrets.ps1 - task: AzureKeyVault@1 inputs: @@ -201,5 +201,5 @@ jobs: inputs: azureSubscription: Azure-Functions-Host-CI-internal azurePowerShellVersion: 'LatestVersion' - ScriptPath: build/checkin-secrets.ps1 + ScriptPath: eng/script/checkin-secrets.ps1 ScriptArguments: '-leaseBlob $(LeaseBlob) -leaseToken $(LeaseToken)' diff --git a/eng/ci/templates/official/jobs/run-non-e2e-tests.yml b/eng/ci/templates/official/jobs/run-non-e2e-tests.yml index 12b285d42b..f10c7d1ac8 100644 --- a/eng/ci/templates/official/jobs/run-non-e2e-tests.yml +++ b/eng/ci/templates/official/jobs/run-non-e2e-tests.yml @@ -34,7 +34,7 @@ jobs: inputs: azureSubscription: Azure-Functions-Host-CI-internal azurePowerShellVersion: 'LatestVersion' - ScriptPath: build/checkout-secrets.ps1 + ScriptPath: eng/script/checkout-secrets.ps1 - task: AzureKeyVault@1 inputs: @@ -91,5 +91,5 @@ jobs: inputs: azureSubscription: Azure-Functions-Host-CI-internal azurePowerShellVersion: 'LatestVersion' - ScriptPath: build/checkin-secrets.ps1 + ScriptPath: eng/script/checkin-secrets.ps1 ScriptArguments: '-leaseBlob $(LeaseBlob) -leaseToken $(LeaseToken)' diff --git a/build/functions.png b/eng/res/functions.png similarity index 100% rename from build/functions.png rename to eng/res/functions.png diff --git a/build/checkin-secrets.ps1 b/eng/script/checkin-secrets.ps1 similarity index 100% rename from build/checkin-secrets.ps1 rename to eng/script/checkin-secrets.ps1 diff --git a/build/checkout-secrets.ps1 b/eng/script/checkout-secrets.ps1 similarity index 100% rename from build/checkout-secrets.ps1 rename to eng/script/checkout-secrets.ps1 diff --git a/src/Common/CommonAssemblyInfo.cs b/src/Common/CommonAssemblyInfo.cs deleted file mode 100644 index 062ab302d5..0000000000 --- a/src/Common/CommonAssemblyInfo.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) .NET Foundation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System; -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyProduct("Microsoft Azure WebJobs SDK Script")] -[assembly: AssemblyCompany("Microsoft Corporation")] -[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")] - -[assembly: ComVisible(false)] - -[assembly: AssemblyVersion("1.0.0.0")] - -// The official build will replace the third place with the build number. -// For example, 1.0.0.0 becomes 1.0.1234.0 -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Common/PublicKey.snk b/src/Common/PublicKey.snk deleted file mode 100644 index 695f1b38774e839e5b90059bfb7f32df1dff4223..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 160 zcmV;R0AK$ABme*efB*oL000060ssI2Bme+XQ$aBR1ONa50098C{E+7Ye`kjtcRG*W zi8#m|)B?I?xgZ^2Sw5D;l4TxtPwG;3)3^j?qDHjEteSTF{rM+4WI`v zCD?tsZ^;k+S&r1&HRMb=j738S=;J$tCKNrc$@P|lZ