Usage of this plugin for deployment of applications to OpenShift only works on Jenkins environments where builds are run on the master Jenkins node and not in environments where builds are run on slave nodes. This is due to the way Jenkins plugins works, that they are by default only running their code on the master node and this plugin expects to read files of the running builds workspace for it to deploy. The current implementation uses Java standard File class for accessing the workspace which is then reading the filesystem of the master node and not where the build is running.

      There are ways to solve this using functionality already in the Jenkins codebase. Either by keeping the code running on the master node and using a class FilePath from the jenkins codebase that can read files from the build slaves filesystem (I have included a sample of how this could work as an attachment). Another way to solve this is to use Jenkins support of having plugins forward parts of their executed code to build slaves directly. For this see these explanations:

      https://wiki.jenkins-ci.org/display/JENKINS/Making+your+plugin+behave+in+distributed+Jenkins

      http://ccoetech.ebay.com/tutorial-dev-jenkins-plugin-distributed-jenkins

      Best regards
      Lars Milland

          [JENKINS-26710] Support Jenkins slave nodes

          Code changed in jenkins
          User: Siamak Sadeghianfar
          Path:
          src/main/java/org/jenkinsci/plugins/openshift/DeleteApplication.java
          src/main/java/org/jenkinsci/plugins/openshift/DeployApplication.java
          src/main/java/org/jenkinsci/plugins/openshift/GitClient.java
          src/main/java/org/jenkinsci/plugins/openshift/OpenShiftV2Client.java
          src/main/java/org/jenkinsci/plugins/openshift/util/Utils.java
          http://jenkins-ci.org/commit/openshift-deployer-plugin/f18ac6bea47eaced3f86a148e91760b45f143f2c
          Log:
          JENKINS-26710 allow the plugin to run on slave nodes

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Siamak Sadeghianfar Path: src/main/java/org/jenkinsci/plugins/openshift/DeleteApplication.java src/main/java/org/jenkinsci/plugins/openshift/DeployApplication.java src/main/java/org/jenkinsci/plugins/openshift/GitClient.java src/main/java/org/jenkinsci/plugins/openshift/OpenShiftV2Client.java src/main/java/org/jenkinsci/plugins/openshift/util/Utils.java http://jenkins-ci.org/commit/openshift-deployer-plugin/f18ac6bea47eaced3f86a148e91760b45f143f2c Log: JENKINS-26710 allow the plugin to run on slave nodes

          Fixed in 1.2.0

          Siamak Sadeghianfar added a comment - Fixed in 1.2.0

            siamaksade Siamak Sadeghianfar
            larsmilland Lars Milland
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: