Class MsBuildInstaller
java.lang.Object
hudson.tools.ToolInstaller
hudson.plugins.msbuild.MsBuildInstaller
- All Implemented Interfaces:
ExtensionPoint, Describable<ToolInstaller>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class ToolInstaller
ToolInstaller.ToolInstallerEntry, ToolInstaller.ToolInstallerListNested classes/interfaces inherited from interface ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class ToolInstaller
tool -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FilePathbuildToolsInstallPath(Node node, String selectedVersion, String givenInstallPath) Get the path to the Build Tools Install Pathstatic booleancheckIfOsIsWindows(Node node) Check if the OS is Windows.static URIdownloadFile(URI uri, FilePath targetPath) Download a file from a URI to a target pathstatic StringensureArguments(String givenArguments, String[] argsToAdd) Ensures that the specified arguments are present in the given argument string.static StringextractInstallPath(String givenArguments) Extract the installPath from the given argumentsstatic FilePathgetVs_BuildToolsExePath(FilePath expected) Get the path to the vs_BuildTools.exestatic FilePathmsBuildBinPath(Node node, String selectedVersion, String givenInstallPath) Get the path to the MSBuild Bin folderperformInstallation(ToolInstallation tool, Node node, TaskListener log) Perform the installation of the Visual Studio Build ToolsvoidsetAdditionalArguments(String additionalArguments) voidsetSelectedVersion(String selectedVersion) voidsetVsconfig(String vsconfig) Methods inherited from class ToolInstaller
appliesTo, getDescriptor, getLabel, preferredLocation, setTool
-
Constructor Details
-
MsBuildInstaller
-
-
Method Details
-
getSelectedVersion
-
setSelectedVersion
-
getAdditionalArguments
-
setAdditionalArguments
-
setVsconfig
-
getVsconfig
-
performInstallation
public FilePath performInstallation(ToolInstallation tool, Node node, TaskListener log) throws IOException, InterruptedException Perform the installation of the Visual Studio Build Tools- Specified by:
performInstallationin classToolInstaller- Parameters:
tool- ToolInstallationnode- Nodelog- TaskListener- Returns:
- FilePath
- Throws:
IOExceptionInterruptedException
-
buildToolsInstallPath
-
msBuildBinPath
-
getVs_BuildToolsExePath
-
extractInstallPath
-
checkIfOsIsWindows
Check if the OS is Windows.- Parameters:
node- Node- Returns:
- boolean
- Throws:
IOExceptionInterruptedException
-
downloadFile
public static URI downloadFile(URI uri, FilePath targetPath) throws IOException, InterruptedException Download a file from a URI to a target path- Parameters:
uri- URItargetPath- FilePath- Returns:
- the URI the file was downloaded from after redirects
- Throws:
IOExceptionInterruptedException
-
ensureArguments
Ensures that the specified arguments are present in the given argument string. If an argument is missing, it is appended to the string.- Parameters:
givenArguments- the initial argument stringargsToAdd- array of arguments to ensure presence- Returns:
- the modified argument string with all specified arguments included
-