Public | Automated Build

Last pushed: 2 months ago
Short Description
Bridge from Plastic Cloud to Unity Cloud Build
Full Description

# Bridge from Plastic Cloud to Unity Cloud Build

Glue logic which enables Unity Cloud Build to build from Plastic Cloud repositories.

If either of these happened, this project would become obsolete:

  1. Codice Software implements a Git server interface, complete with account- and SSH-key-authentication, for Plastic Cloud. Once there is such an interface, then Unity Cloud Build will be able to connect to the Plastic Cloud repositories with their current implementation. Forum thread
  2. Unity's Cloud Build team implements Plastic-specific tooling or protocol support that enables it to watch and pull from remote Plastic repositories. Forum thread

Current state

Should work, but occasional bugs require manual restart of the containers once every couple of weeks.

This was used for internal development for a 6-month period. We abandoned it in favor of a Jenkins build setup, because the Jenkins setup offered significantly shorter build turnaround times (from 30-60 minutes to 15 minutes for our project).


This package contains two Docker containers. You deploy these containers to a VM in Azure or Google Cloud. Together, these form a bridge from Plastic Cloud to Unity Cloud Build.

  1. Plastic server/client. This will replicate from repos in Plastic Cloud, and push to the Git server.
  2. Git server. This will be exposed to the Internet. Unity Cloud Build will regularly look for changes in this server.


  • Install Plastic Cloud Edition
    • Have an organization set up in Plastic Cloud
    • Have at least one repo created in your organization's Plastic Cloud account
    • Have your local Plastic client/server able to connect to the Plastic Cloud account
    • Have a connection profile configured with account credentials for accessing your organization's Plastic Cloud account
  • Install Docker or Docker Toolbox

"Quick" start

  • Begin by testing on your local machine.
    You should be able to get replication up and running, but Unity Cloud Build will be unable to connect since your machine does not have a public IP.
  • Rent a VM from Google Cloud / Google Compute Engine
  • SSH into the VM: eval $(./commands/gce/ compute ssh plastic-cloud-to-ucb-gce
  • Clone the Git repository to your VM
  • Duplicate the 'temp' directory to your VM
  • Deploy the current configuration to Google: Run ./commands/ && ./commands/
  • Add repositories and branches for replication:
    • Run ./commands/ <reponame> for a repo
    • Run ./commands/ <reponame> <branch> to perform initial replication for a branch in that repo
  • Enable Unity Cloud Build to access repository:
    • Configure Unity Cloud Build for the corresponding project to point to the server URL
    • Copy the SSH key from the Unity Cloud Build configuration to ./temp/id_rsa.<reponame>.pub
    • Run ./commands/ to add key to Git server
    • Unity Cloud Build should now be able to initiate builds from the newly added repository
  • Start continuous replication:
    • Run ./commands/ to activate continuous replication

CI results for containers

See the Docker Hub page for build status.

Testing on your local machine

Perform all activity from within the Docker terminal.

Build Docker containers

Run ./commands/

Start Docker containers

Run ./commands/

Configure Docker containers to talk to each other and Plastic Cloud

Copy profiles.conf, cryptedservers.conf & *.key files from C:\Users\<Current user>\AppData\Local\plastic4 to temp

Run ./commands/

Prepare for replication of a Plastic Cloud repository

Run ./commands/ <reponame>

Replicate a branch in repository from Plastic Cloud to the Git server running inside the VM

Run ./commands/ <reponame> <branchname>

Configure Git server to accept logins from Unity Cloud Build for one specific project

Begin setup of the build job in Unity Cloud Build; URL = ssh://git@<Docker machine external IP>:2222/repos/<reponame>.git

Copy the SSH public key that Unity Cloud Build will use into a file named temp/id_rsa.<reponame>.pub

Run ./commands/

Unity Cloud Build should now be able to access the repository on your Git server.

Install a 1-year Plastic license

Request a Plastic Team Edition 1-year license for 1 user via . Then copy the plasticd.lic file into temp, and reconfigure.

Start continuous replication

Run ./commands/

Stop continuous replication

Run ./commands/

Remove repository from Git server

Run ./commands/ <reponame>

Running in Google Cloud / Google Compute Engine


  • Install Google Cloud SDK
  • Create a new project in Google cloud
    • Name it "Plastic Cloud to UCB GCE"
    • Enable Compute Engine API access for project
    • Enable billing for project


Run eval $(./commands/gce/ auth login and complete authentication in browser

Run eval $(./commands/gce/ auth application-default login and complete authentication in browser

Rent & start up a VM with Google Compute Engine

Run ./commands/gce/ [region (default: europe-west1)] [zone (default: europe-west1-b)]

Access your VM in Google Compute Engine

Run eval $(./commands/gce/ compute ssh plastic-cloud-to-ucb-gce

Remove your VM from Google Compute Engine

Run ./commands/gce/


Thanks to Miguel González for the original Plastic server project:

Thanks to José Carlos Bernárdez for the original Git server project:

Docker Pull Command