Jump to content

Plastic Cloud Automation with encryption possible?


Ryxali

Recommended Posts

Heya!

I'm currently researching how to do Build Automation with Plastic Cloud edition. I've started out trying to integrate it with Jenkins to build a unity game. I'm using the plugin you provided for Jenkins. For simplicity's sake I'm simply testing on my Windows desktop machine.

The first issue I encountered was that it seems to look in the wrong place for the client config. It was looking in "C:\WINDOWS\system32\config\systemprofile\AppData\Local\plastic4\client.conf" while my config is in the default generated location in AppData. By copying my client config to the path it was looking in I was able to bypass this.

The next issue I encountered was when I attempted to download from the cloud via Jenkins. We use an encrypted cloud, so it got stuck in an infinite loop asking for the encryption key.

Is there any way to use your plugin while also providing an encryption key? Currently I've switched to testing with a local repository - and it works fine, but it would be nice to use the repo which is 100% up to date.

While on the topic of Cloud & Integration, is there any way to setup hooks/polling so I can setup some responsive build automation?

I've attached the Jenkins execution logs from both my failed runs. Thanks in advance!

error-config.txt error-encryption.txt

Link to comment
Share on other sites

Hi,

we have been using Plastic Cloud + Jenkins + Unity up until a few months ago. Support staff may have better answers, but hopefully this will get you going:

1 hour ago, Ryxali said:

The first issue I encountered was that it seems to look in the wrong place for the client config. It was looking in "C:\WINDOWS\system32\config\systemprofile\AppData\Local\plastic4\client.conf" while my config is in the default generated location in AppData. By copying my client config to the path it was looking in I was able to bypass this.

This is happening because Jenkins is by default not running as your local user, but under the Local System account. C:\WINDOWS\system32\config\systemprofile\appdata is the %APPDATA% folder for the Local System account.

You can change which account is used when launching Jenkins if you want to. Change these settings by starting the "Services" function in Windows, locating the Jenkins entry in the long list, and editing its properties.

Ideally you should create a separate account (probably named "Jenkins") and run the Jenkins service under that. The config file location will then be C:\Users\Jenkins\AppData\Local\plastic4\client.conf.

1 hour ago, Ryxali said:

The next issue I encountered was when I attempted to download from the cloud via Jenkins. We use an encrypted cloud, so it got stuck in an infinite loop asking for the encryption key.

Is there any way to use your plugin while also providing an encryption key? Currently I've switched to testing with a local repository - and it works fine, but it would be nice to use the repo which is 100% up to date.

You need to ensure that two files exist in the config dir: "cryptedservers.conf" and one "*.key" file. You can copy the cryptedservers.conf / *.key file pair from your local user's Plastic folder. It is also possible to create these files programmatically, but that's a fair bit more work.

1 hour ago, Ryxali said:

While on the topic of Cloud & Integration, is there any way to setup hooks/polling so I can setup some responsive build automation?

1+ year ago there were no hooks available in Plastic Cloud. We configured Jenkins to poll with 2-minute intervals - that was good enough for our purposes. The syntax to do so is to give a schedule like "H/2 * * * *" in Jenkins.

----

You may also find these references useful:

Automation scripts for setting up and deleting Jenkins build slaves, for a Plastic/Jenkins/Unity build system: https://github.com/falldamagestudio/JenkinsAutomation

Performance profiling results for a Jenkins build system: https://blog.falldamagestudio.com/posts/performance-optimizing-a-small-build-system-for-unity/

 

 

 

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...