Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added task.json and taskdesign.md for new version of DotNetCoreInstal… #9729

Merged
merged 17 commits into from
Mar 19, 2019
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ Tasks/DotNetCoreCLIV2/* @sachinma

Tasks/DotNetCoreInstallerV0/* @sachinma

Tasks/DotNetCoreInstallerV1/* @sachinma

Tasks/DownloadBuildArtifactsV0/* @Lovakumar @omeshp

Tasks/DownloadFileshareArtifactsV0/* @Lovakumar @omeshp
Expand Down
2 changes: 1 addition & 1 deletion Tasks/DotNetCoreInstallerV0/task.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "B0CE7256-7898-45D3-9CB5-176B752BFEA6",
"name": "DotNetCoreInstaller",
"friendlyName": ".NET Core SDK Installer",
"friendlyName": ".NET Core SDK/Runtime Installer",
"description": "Acquires a specific version of the .NET Core SDK from the internet or the local cache and adds it to the PATH. Use this task to change the version of .NET Core used in subsequent tasks.",
"helpUrl": "https://go.microsoft.com/fwlink/?linkid=853651",
"helpMarkDown": "[More Information](https://go.microsoft.com/fwlink/?linkid=853651)",
Expand Down
56 changes: 56 additions & 0 deletions Tasks/DotNetCoreInstallerV1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# .NET Core Tool Installer

## Overview

The .NET Core Tool Installer task acquires a specific version of [.NET Core](https://docs.microsoft.com/en-us/dotnet/core/tools/?tabs=netcore2x) from internet or the tools cache and adds it to the PATH of the Azure Pipelines Agent (hosted or private). Use this task to change the version of .NET Core used in subsequent tasks like [.NET Core cli task](https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/DotNetCoreCLIV2).
Adding this task before the [.NET Core cli task](https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/DotNetCoreCLIV2) in a build definition ensures that the version would be available at the time of building, testing and publishing your app.

The tool installer approach also allows you to decouple from the agent update cycles. If the .NET Core version you are looking for is missing from the Azure Pipelines agent (Hosted or Private), then you can use this task to get the right version installed on the agent.

### Whats New
- Support for installing multiple versions side by side.

- Support for patterns in version to fetch latest in minor/major version. Example you can now specify 2.2.x to get the latest patch.

- Restrict Multi-level lookup. This input is only applicable to Windows based agents. It configures the .Net Core's host process behviour for looking for a suitable shared framework on the machine. You can read more about it **[HERE](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md)**

## Contact Information

Please report a problem at [Developer Community Forum](https://developercommunity.visualstudio.com/spaces/21/index.html) if you are facing problems in making this task work. You can also share feedback about the task like, what more functionality should be added to the task, what other tasks you would like to have, at the same place.

## Pre-requisites for the task

The task can run on either Windows or Linux.
hiyadav marked this conversation as resolved.
Show resolved Hide resolved

### Parameters of the task

* **Package to install\*:** You can choose to install either runtime or full SDK.
hiyadav marked this conversation as resolved.
Show resolved Hide resolved


* **Version\*:** Specify version of .NET Core SDK or runtime to install. It also allows you to always get the latest version in a minor or major version. See below for examples
Examples:
- To install 2.2.104 SDK, use 2.2.104
- To install 2.2.1 runtime, use 2.2.1
- To install 3.0.100-preview3-010431 sdk, use 3.0.100-preview3-010431
- To install latest patch version of 2.1 sdk, use 2.1.x
- To install latest minor version of 2. sdk, use 2.x<br/>For getting more details about exact version, refer [this link](https://github.com/dotnet/core/blob/master/release-notes/releases-index.json).


* **Include Preview Versions**: Select if you want preview versions to be included while searching for latest versions, such as while searching 2.2.x. This setting is ignored if you specify an exact version, such as: 3.0.100-preview3-010431


* **Path To Install .Net Core**: Specify where .Net Core SDK/Runtime should be installed. In case there was already a differnt version on the specified path, that earlier version wont be deleted.


* **Restrict Multi Level Lookup**: This input is only applicable to Windows based agents. This configures the behavior of .Net host process for looking up a suitable shared framework.
* *checked*: Only versions present in the folder specified in this task would be looked by the host process.
* *unchecked*: The host will attempt to look in pre-defined global locations using multi-level lookup.

The default global locations are:
- **For Windows**:
<br/>C:\\Program Files\\dotnet (64-bit processes)
<br/>C:\\Program Files (x86)\\dotnet (32-bit process)

You can read more about it [**HERE**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).<br/>


Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"loc.friendlyName": ".NET Core-Toolinstaller",
"loc.helpMarkDown": "[Weitere Informationen](https://go.microsoft.com/fwlink/?linkid=853651)",
"loc.description": "Ruft eine bestimmte .NET Core-Version aus dem Internet oder dem Toolcache ab und fügt sie dem PATH hinzu. Verwenden Sie diese Aufgabe, um die in nachfolgenden Aufgaben verwendete .NET Core-Version zu ändern.",
"loc.instanceNameFormat": "Verwenden Sie .NET Core $(packageType) $(version).",
"loc.input.label.packageType": "Zu installierendes Paket",
"loc.input.help.packageType": "Wählen Sie aus, ob nur die Runtime oder das vollständige SDK installiert werden soll.",
"loc.input.label.version": "Version",
"loc.input.help.version": "Geben Sie die genaue Version von .NET Core SDK oder Runtime an, die installiert werden soll.<br/>Den Wert von \"version-sdk\" zum Installieren des SDK oder den Wert von \"version-runtime\" zum Installieren der Runtime aus beliebigen Releases finden Sie [hier](https://github.com/dotnet/core/blob/master/release-notes/releases.json).",
"loc.messages.ToolFailed": "Fehler bei der Toolinstallation: %s",
"loc.messages.ImplicitVersionNotSupported": "Die Version muss eine gültige und bestimmte Version sein: %s.",
"loc.messages.getMachinePlatformFailed": "Fehler beim Abrufen der Details zur Computerplattform. Fehler: %s.",
"loc.messages.getDownloadUrlsFailed": "Fehler beim Abrufen der Download-URLs. Fehler: %s.",
"loc.messages.UsingCachedTool": "Es ist eine zwischengespeicherte Kopie von .NET Core vorhanden. Eine Neuinstallation ist nicht erforderlich. Speicherort des zwischengespeicherten Tools: %s.",
"loc.messages.CheckingToolCache": "Es wird überprüft, ob eine zwischengespeicherte Kopie für diese Version vorhanden ist...",
"loc.messages.InstallingAfresh": "Der Cache enthält nicht die angeforderte Version von .NET Core. Laden Sie die Version jetzt herunter, und installieren Sie sie.",
"loc.messages.GettingDownloadUrl": "URL zum Herunterladen von .NET Core %s, Version %s wird abgerufen.",
"loc.messages.CouldNotDetectPlatform": "Das Betriebssystem des Computers konnte nicht ermittelt werden.",
"loc.messages.NullDownloadUrls": "Die Download-URL konnte nicht erstellt werden. Stellen Sie sicher, dass die angegebene Version %s gültig ist.",
"loc.messages.DownloadingUrl": ".NET Core-Paket wird von URL %s heruntergeladen.",
"loc.messages.ExtractingPackage": "Das heruntergeladene Paket %s wird extrahiert.",
"loc.messages.CachingTool": "Dieses installierte Tool wird zwischengespeichert.",
"loc.messages.SuccessfullyInstalled": ".NET Core %s Version %s wurde erfolgreich installiert.",
"loc.messages.ToolToInstall": "Zu installierendes Tool: .NET Core %s Version %s.",
"loc.messages.PrimaryPlatform": "Erkannte Plattform (primär): %s",
"loc.messages.LegacyPlatform": "Erkannte Plattform (Legacy): %s",
"loc.messages.WarningVersionNotFound": "Downloadinformationen für Version %s konnten nicht abgerufen werden. Überprüfen Sie, ob die angegebene Version richtig ist. Weitere Informationen finden Sie unter dem Link für unterstützte Versionen: https://github.com/dotnet/core/blob/master/release-notes/releases.json. Es wird ein Fallback zum Erstellen einer konventionsbasierten URL durchgeführt.",
"loc.messages.CouldNotDownload": "Das Installationspaket konnte nicht von dieser URL heruntergeladen werden: %s. Fehler: %s",
"loc.messages.FailedToDownloadPackage": "Fehler beim Herunterladen des Pakets für die Installation.",
"loc.messages.PrependGlobalToolPath": "Globaler Toolpfad wird erstellt und PATH vorangestellt."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"loc.friendlyName": ".NET Core SDK/Runtime Installer",
"loc.helpMarkDown": "[More Information](https://aka.ms/AA4ihfi)",
"loc.description": "Acquires a version of the .NET Core SDK/Runtime from the internet or the local cache and adds it to the PATH. Use this task to change the version of .NET Core used in subsequent tasks.",
"loc.instanceNameFormat": "Install .NET Core $(packageType) $(version)",
"loc.releaseNotes": "<li>Support for installing multiple versions side by side.</li><li>Support for patterns in version to fetch latest in minor/major version.</li><li>Restrict Multi-level lookup</li>",
"loc.group.displayName.advanced": "Advanced",
"loc.input.label.packageType": "Package to install",
"loc.input.help.packageType": "Please select whether to install only runtime or full SDK.",
"loc.input.label.version": "Version",
"loc.input.help.version": "Specify version of .NET Core SDK or runtime to install.<br/>Versions can be given in the following formats<li>2.x => Install latest in major version.</li><li>2.2.x => Install latest in major and minor version</li><li>2.2.104 => Install exact version</li><br/>Find the value of `version` for installing SDK/Runtime, from the releases.json. The link to releases.json of that major.minor version can be found in [**releases-index file.**](https://github.com/dotnet/core/blob/master/release-notes/releases-index.json). Like link to releases.json for 2.2 version is https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/2.2/releases.json",
"loc.input.label.includePreviewVersions": "Include Preview Versions",
"loc.input.help.includePreviewVersions": "Select if you want preview versions to be included while searching for latest versions, such as while searching 2.2.x. This setting is ignored if you specify an exact version, such as: 3.0.100-preview3-010431",
"loc.input.label.installationPath": "Path To Install .Net Core",
"loc.input.help.installationPath": "Specify where .Net Core SDK/Runtime should be installed. Different paths can have the following impact on .Net's behavior.<li>$(Agent.ToolsDirectory): This makes the version to be cached on the agent since this directory is not cleanup up across pipelines. All pipelines running on the agent, would have access to the versions installed previously using the agent.</li><li>$(Agent.TempDirectory): This can ensure that a pipeline doesn't use any cached version of .Net core since this folder is cleaned up after each pipeline.</li><li>Any other path: You can configure any other path given the agent process has access to the path. This will change the state of the machine and impact all processes running on it.<br/>Note that you can also configure Multi-Level Lookup setting which can configure .Net host's probing for a suitable version.",
"loc.input.label.restrictMultiLevelLookup": "Restrict Multi Level Lookup",
"loc.input.help.restrictMultiLevelLookup": "This input is only applicable to Windows based agents. This configures the behavior of .Net host process for looking up a suitable shared framework.<li>checked: Only versions present in the folder specified in this task would be looked by the host process.</li><li>unchecked: The host will attempt to look in pre-defined global locations using multi-level lookup.<br/>The default global locations are: <br/><b>For Windows:</b><br/>C:\\Program Files\\dotnet (64-bit processes)<br/>C:\\Program Files (x86)\\dotnet (32-bit process)</li> You can read more about it [**HERE**](https://github.com/dotnet/core-setup/blob/master/Documentation/design-docs/multilevel-sharedfx-lookup.md).<br/>",
"loc.messages.ToolFailed": "Tool install failed: %s",
"loc.messages.ImplicitVersionNotSupported": "Version should be a valid and explicit version: %s",
"loc.messages.getMachinePlatformFailed": "Failed to get machine platform details. Error: %s.",
"loc.messages.getDownloadUrlsFailed": "Failed to get download URLS. Error: %s.",
"loc.messages.UsingCachedTool": "Cached copy of .NET Core exists. No need to install afresh. Cached tool location: %s.",
"loc.messages.CheckingToolCache": "Checking if a cached copy exists for this version...",
"loc.messages.InstallingAfresh": "The cache does not contain the requested version of .NET Core. Downloading and installing it now.",
"loc.messages.GettingDownloadUrl": "Getting URL to download .NET Core %s version: %s.",
"loc.messages.CouldNotDetectPlatform": "Could not detect the machine's OS",
"loc.messages.NullDownloadUrls": "Could not construct download URL. Please ensure that specified version %s is valid.",
"loc.messages.DownloadingUrl": "Downloading .NET Core package from URL: %s",
"loc.messages.ExtractingPackage": "Extracting downloaded package %s.",
"loc.messages.CachingTool": "Caching this installed tool.",
"loc.messages.SuccessfullyInstalled": "Successfully installed .NET Core %s version %s.",
"loc.messages.ToolToInstall": "Tool to install: .NET Core %s version %s.",
"loc.messages.PrimaryPlatform": "Detected platform (Primary): %s",
"loc.messages.LegacyPlatform": "Detected platform (Legacy): %s",
"loc.messages.WarningVersionNotFound": "Could not fetch download information for version %s. Please check if the version specified is correct. You can refer the link for supported versions => https://github.com/dotnet/core/blob/master/release-notes/releases.json. Falling back to creating convention based URL.",
"loc.messages.CouldNotDownload": "Could not download installation package from this URL: %s Error: %s",
"loc.messages.FailedToDownloadPackage": "Failed to download package for installation",
"loc.messages.PrependGlobalToolPath": "Creating global tool path and pre-pending to PATH.",
"loc.messages.VersionsFileMalformed": "The specified version's download links are not correctly formed in the supported versions document => %s/",
"loc.messages.MatchingVersionNotFound": "No matching %s version could be found for specified version: %s Kindly note the preview versions are only considered in latest version searches if Include Preview Versions checkbox is checked.",
"loc.messages.UnableToAccessPath": "Unable to access path: %s. Error: %s \n please make sure that agent process has path to the path.",
"loc.messages.VersionCanNotBeDownloadedFromUrl": "Version: %s cannot be downloaded from URL: %s. Either the URL or version is incorrect.",
"loc.messages.CopyingFoldersIntoPath": "Copying all root folders into installation path: %s",
"loc.messages.CopyingFilesIntoPath": "Copying root files (such as dotnet.exe) into installation path: %s",
"loc.messages.FailedToCopyTopLevelFiles": "Failed to copy root files into installation path: %s. Error: %s",
"loc.messages.FailedWhileInstallingVersionAtPath": "Failed while installing version: %s at path: %s with error: %s",
"loc.messages.ExplicitVersionRequired": "Version: %s is not allowed. Versions to be installed should be of format: major.minor.patchversion. For example: 2.2.1",
"loc.messages.VersionFoundInCache": "Version: %s was found in cache.",
"loc.messages.VersionNotFoundInCache": "Version %s was not found in cache.",
"loc.messages.CreatingInstallationCompeleteFile": "Creating installation complete file for .Net core %s version %s",
"loc.messages.CannotFindRuntimeVersionForCompletingInstallation": "Cannot find runtime version for package type: %s with version: %s",
"loc.messages.PathNotFoundException": "Path: %s could not be located/found. Make sure the path exists.",
"loc.messages.VersionIsLocalLatest": "Version: %s is the latest among the versions present at path: %s",
"loc.messages.VersionIsNotLocalLatest": "Version: %s is not the latest among the versions present at %s",
"loc.messages.DownloadUrlForMatchingOsNotFound": "Download URL for .Net Core %s version %s could not be found for the following OS platforms (rid): %s",
"loc.messages.ExceptionWhileDownloadOrReadReleasesIndex": "Failed to download or parse release-index.json with error: %s",
"loc.messages.MatchingVersionForUserInputVersion": "Found version %s in channel %s for user specified version spec: %s",
"loc.messages.UrlForReleaseChannelNotFound": "Could not find URL for releases.json of channel version: %s",
"loc.messages.NoSuitableChannelWereFound": "Channel corresponding to version %s could not be found.",
"loc.messages.DetectingPlatform": "Detecting OS platform to find correct download package for the OS.",
"loc.messages.FailedInDetectingMachineArch": "Failed while detecting machine OS platform with error: %s",
"loc.messages.runtimeVersionPropertyNotFound": "runtime-version property could not be found for .Net Core %s version %s.",
"loc.messages.VersionNotFound": "%s version matching: %s could not be found",
"loc.messages.VersionNotAllowed": "Version %s is not allowed. Allowed version types are: majorVersion.x, majorVersion.minorVersion.x, majorVersion.minorVersion.patchVersion",
"loc.messages.VersionsCanNotBeCompared": "Versions %s and %s cannot be compared. Both versions should be explicit.",
"loc.messages.FileNameNotCorrectCompleteFileName": "File name %s is not correct version.complete file name.",
"loc.messages.ChannelVersionsNotComparable": "Channel versions %s and %s can not be compared. They both must have numeric major and minor versions.",
"loc.messages.LookingForVersionInChannel": "Searching for version in channel %s",
"loc.messages.FallingBackToAdjacentChannels": "Version %s could not be found in its channel, will now search in adjacent channels.",
"loc.messages.ErrorWhileSettingDotNetToolPath": "Failed while prepending .Net Core Tool path to PATH envrionment variable. Error: %s",
"loc.messages.RequiredChannelVersionForSpec": "Finding channel %s for version %s",
"loc.messages.ErrorWhileGettingVersionFromChannel": "Failed while getting version %s from channel %s with error: %s",
"loc.messages.ComparingInstalledFolderVersions": "Comparing if version being installed %s is greater than already installed version with folder name %s",
"loc.messages.ComparingInstalledFileVersions": "Comparing if version being installed %s is greater than already installed version with version complete file name %s",
"loc.messages.InvalidChannelObject": "Object cannot be used as Channel, required properties such as channel-version, releases.json is missing.",
"loc.messages.ReleasesIndexBodyIncorrect": "Parsed releases index body is not correct. Kindly see if the releases-index section is not empty in the file."
}
Loading