-
Bug
-
Resolution: Fixed
-
Major
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