Class OpenJDKInstaller
- java.lang.Object
-
- hudson.tools.ToolInstaller
-
- org.jenkinsci.plugins.openjdk_native.OpenJDKInstaller
-
- All Implemented Interfaces:
hudson.ExtensionPoint
,hudson.model.Describable<hudson.tools.ToolInstaller>
public class OpenJDKInstaller extends hudson.tools.ToolInstaller
Auto-installer of native OpenJDK packages for RedHat-like distros Switch to required OpenJDK version via Linux alternatives. If required OpenJDK is not installed, try to install it via yum. Alternatives and yum are run via sudo, therefore appropriate sudoers setup is requited (including switching off tty requirement). Example setup:#Defaults requiretty User_Alias JENKINS = test Cmnd_Alias OPENJDK = /usr/sbin/alternatives, /usr/bin/yum JENKINS ALL = NOPASSWD: OPENJDK
- Author:
- vjuranek
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OpenJDKInstaller.DescriptorImpl
static class
OpenJDKInstaller.OpenJDKPackage
-
Field Summary
Fields Modifier and Type Field Description static String
OPENJDK_BIN
static String
OPENJDK_HOME_BIN
static String
OPENJDK_HOME_PREFIX
OpenJDKInstaller.OpenJDKPackage
openjdkPackage
-
Constructor Summary
Constructors Constructor Description OpenJDKInstaller(OpenJDKInstaller.OpenJDKPackage openjdkPackage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpenJDKInstaller.OpenJDKPackage
getPackageName()
hudson.FilePath
performInstallation(hudson.tools.ToolInstallation tool, hudson.model.Node node, hudson.model.TaskListener log)
-
-
-
Field Detail
-
OPENJDK_HOME_PREFIX
public static final String OPENJDK_HOME_PREFIX
- See Also:
- Constant Field Values
-
OPENJDK_HOME_BIN
public static final String OPENJDK_HOME_BIN
- See Also:
- Constant Field Values
-
OPENJDK_BIN
public static final String OPENJDK_BIN
- See Also:
- Constant Field Values
-
openjdkPackage
public final OpenJDKInstaller.OpenJDKPackage openjdkPackage
-
-
Constructor Detail
-
OpenJDKInstaller
@DataBoundConstructor public OpenJDKInstaller(OpenJDKInstaller.OpenJDKPackage openjdkPackage)
-
-
Method Detail
-
getPackageName
public OpenJDKInstaller.OpenJDKPackage getPackageName()
-
performInstallation
public hudson.FilePath performInstallation(hudson.tools.ToolInstallation tool, hudson.model.Node node, hudson.model.TaskListener log) throws IOException, InterruptedException
- Specified by:
performInstallation
in classhudson.tools.ToolInstaller
- Throws:
IOException
InterruptedException
-
-