Hello @dmontesdeocaSMK . We use u3d with Jenkins ourselves, so maybe we can help!
Note: our servers are Mac, Linux so far.
What you need is to install ruby on your Jenkins server, and run u3d within a Ruby environment. I recommend using RVM to install ruby on your server and use the ruby RVM plugin (rvm) to integrate it with jenkins. Then enable the āRun the build in a RVM-managed environmentā. After that you can use a shell plugin to run your u3d builds.
For example, hereās the code I use to install unity across servers.
if [[ ! `which u3d` ]]; then
gem install u3d
else
gem update u3d
fi
echo "${U3D_INSTALL_ARGS}"
PASS_KEY=U3D_PASSWORD_${NODE_NAME}
echo "PASS KEY: ${PASS_KEY}"
export U3D_PASSWORD=${!PASS_KEY}
u3d install --trace --verbose $U3D_VERSION $U3D_INSTALL_ARGS
u3d list
I also set up some environment variables such as
U3D_PASSWORD_name_of_my_slave ā points to the root password for the slave named āname_of_my_slaveā
You can use the Build Secret plugin to store your passwords and configure your job to pass them to your build script. Or you use the keychain integration if on mac.
and then pass your u3d configuration like this:
U3D_INSTALL_ARGS=-p Unity,Android,iOS,Linux,Windows,WebGL
U3D_VERSION=2017.1.2f1
(these could be set using the Jenkins Parameter plugin).
As for running builds, we are in fact using fastlane to drive our builds, and u3d is used in one of our lane to build the app before we let other fastlane actions (supply, deliver, hockey ā¦) distribute the builds to Google, Apple, etc.
I plan on sharing our Fastfile (fastlane configuration file) in the near future.
A pure u3d Ruby Jenkins (GitHub - jenkinsci/jenkins.rb: Deprecated, see https://www.jenkins.io/jep/7) could have been possible, but I donāt intend to work on that as we use u3d within fastlane ourselves. Also as Iāve never seen the pure ruby Jenkins plugins solution take off, I am uncertain as this would be useful.