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 voiddownloadFile(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 booleanisInstallerRunning(String processName) Check if the installer is runningstatic FilePathmsBuildBinPath(Node node, String selectedVersion, String givenInstallPath) Get the path to the MSBuild Bin folderstatic booleanneedsModify(FilePath expected) Check if the installer needs to be modifiedstatic booleanneedsUpdate(FilePath expected) Check if the installer needs to be updatedperformInstallation(ToolInstallation tool, Node node, TaskListener log) Perform the installation of the Visual Studio Build ToolsvoidsetAdditionalArguments(String additionalArguments) voidsetSelectedVersion(String selectedVersion) voidsetVsconfig(String vsconfig) static booleanuseConfigFile(String vsconfig, FilePath expected) Use the .vsconfig file to install the Visual Studio Build ToolsMethods 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
-
isInstallerRunning
Check if the installer is running- Parameters:
processName- String- Returns:
- boolean
- Throws:
IOException
-
buildToolsInstallPath
-
msBuildBinPath
-
getVs_BuildToolsExePath
-
extractInstallPath
-
checkIfOsIsWindows
Check if the OS is Windows.- Parameters:
node- Node- Returns:
- boolean
- Throws:
IOExceptionInterruptedException
-
useConfigFile
public static boolean useConfigFile(String vsconfig, FilePath expected) throws IOException, InterruptedException Use the .vsconfig file to install the Visual Studio Build Tools- Parameters:
vsconfig- Stringexpected- FilePath- Returns:
- boolean
- Throws:
IOExceptionInterruptedException
-
needsUpdate
Check if the installer needs to be updated- Parameters:
expected- FilePath- Returns:
- boolean
-
needsModify
Check if the installer needs to be modified- Parameters:
expected- FilePath- Returns:
- boolean
- Throws:
IOExceptionInterruptedException
-
downloadFile
public static void downloadFile(URI uri, FilePath targetPath) throws IOException, InterruptedException Download a file from a URI to a target path- Parameters:
uri- URItargetPath- FilePath- 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
-