Search in sources :

Example 26 with Computer

use of hudson.model.Computer in project sonar-scanner-jenkins by SonarSource.

the class SonarMaven method buildEnvVars.

@Override
protected void buildEnvVars(EnvVars env, MavenInstallation mi) throws IOException, InterruptedException {
    super.buildEnvVars(env, mi);
    // Override JDK in case it is set on Sonar publisher
    if (jdk != null) {
        Computer computer = Computer.currentComputer();
        if (computer != null) {
            // just in case were not in a build
            jdk = jdk.forNode(computer.getNode(), listener);
        }
        jdk.buildEnvVars(env);
    }
}
Also used : Computer(hudson.model.Computer)

Aggregations

Computer (hudson.model.Computer)26 IOException (java.io.IOException)10 Node (hudson.model.Node)8 Executor (hudson.model.Executor)6 AbortException (hudson.AbortException)4 FilePath (hudson.FilePath)4 Jenkins (jenkins.model.Jenkins)4 EnvVars (hudson.EnvVars)3 VirtualChannel (hudson.remoting.VirtualChannel)3 PrintWriter (java.io.PrintWriter)3 Test (org.junit.Test)3 Content (com.cloudbees.jenkins.support.api.Content)2 SlaveComputer (hudson.slaves.SlaveComputer)2 WorkspaceList (hudson.slaves.WorkspaceList)2 InterruptedIOException (java.io.InterruptedIOException)2 ArrayList (java.util.ArrayList)2 Folder (com.cloudbees.hudson.plugins.folder.Folder)1 FileContent (com.cloudbees.jenkins.support.api.FileContent)1 FilePathContent (com.cloudbees.jenkins.support.api.FilePathContent)1 PrintedContent (com.cloudbees.jenkins.support.api.PrintedContent)1