Search Unity

What is the equivalent of Github Actions for PlasticSCM?

Discussion in 'Unity Version Control' started by jsaade-gc, Nov 17, 2021.

  1. jsaade-gc

    jsaade-gc

    Joined:
    Apr 6, 2021
    Posts:
    11
    As a game development team we want:
    - Our PRs to go through Unit / Integrations and Build tests
    - Our Merged PRs to automatically distribute builds to different testing tracks (Example: Testflight, Google Play).

    We currently use Github actions, gameci and fastlane to do the above.

    What is the equivalent in PlasticSCM?
    Again maybe I have missed something, but I did not see any straightforward way of doing it with PlasticSCM Cloud.
     
  2. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    It's hard to name a direct equivalent for a suite of different tools, but there's a lot available when using PlasticSCM. I can only give a really limited view on the things my company uses:

    - TeamCity as the build server (probably similar to gameci). TeamCity has a PlasticSCM plugin (and there are plugins for multiple other products) that can e.g. trigger a build whenever a certain branch changed.
    - We use commandline scripts to call into xcode for Testflight upload and a custom C# app to upload to Google Play (other plugins may be available, such as Gradle)
    - Not sure if there's a direct equivalent for "pull requests" because Plastic isn't focused on public open source development, but there's a workflow for code reviews for example.
    - Plastic has an attribute system which allows branches to be tagged like "ready-for-review"
    - There are merge bots which can be used to automatically merge branches with certain conditions, but it's a more powerful system that allows for different filtering
    - There are triggers which are roughly equivalent to commit hooks, as they let you execute things on certain operations like before merge or after a checkin, etc.

    I realize that there a many ways to setup your pipeline and I believe Plastic has all the tools necessary, the hard part is knowing what you need/want and so on. I recommend browsing through topics like PlasticSCM DevOps:

    See the section "DevOps with Plastic SCM":
    https://www.plasticscm.com/documentation

    upload_2021-11-17_13-19-50.png

    Or, there are other articles:

    https://www.plasticscm.com/devops-version-control
     
  3. jsaade-gc

    jsaade-gc

    Joined:
    Apr 6, 2021
    Posts:
    11
    That is what actually made me steer away from PlasticSCM. Great source Control for managing data files, but so far bad for teams if they come from git background (using gitflow, or similar).

    I know there is no magic formula or "one" single approach but having their DevOps distributed across different tools and lack of solid way to do code reviews and automated tests (it seems to me as saying, go try to figure it out) versus offering a solid way.

    Also, last time I checked, mergebots and hooks did not work on cloud edition so would need additional investment.

    I still do not think it is the way to go, at least not yet. Not until Unity + PlasticSCM offer a strong DevOps solution.
     
  4. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    What exactly are you missing?

    Also, not sure why you believe you need Gitflow in Plastic or what "similar" would be. My team had to use Gitflow a couple of times previously and never saw a benefit in creating a complex taxonomy of branch names and conventions that are only sometimes enforced by helper plugins in your commandline or GUI tools. However, you can still setup the same thing in plastic, just without having to delete any branch when your done. Gitflow doesn't do anything in itself, other than define a convention.

    Git + hosting on GitHub + GitHub actions is three tools that let you configure updating from a repository, using commit hooks to trigger command line stuff, start a build process and call some more command line to run other things.

    PlasticSCM + Cloud Edition + TeamCity is three tools that do the same thing, but more costly of course, because it already does a lot of the configuration for you. In TeamCity, by simply setting a checkbox, you can run all Unity tests and then make a build. You can save the money on TeamCity (or use the free version) and do the same thing by using a custom or free open source solution, e.g. Jenkins which is roughly the same configuration/setup work as GitHub Actions for Unity.

    Not sure what you mean by "solid way" for code reviews. In Git you create a pull request, login to your web UI or use a client to manually work through it, then click a button to accept and merge. In Plastic, you do the same thing either with the builtin code review tool or with third party, which might be more powerful than either GitHubs or Plastics builtin ones.

    In Plastic Cloud you can also setup Merge rules to enforce that nobody merges to main unless reviewed:
    upload_2021-11-17_14-9-48.png


    But maybe the thing you're missing is that you really want a CI tool that already handles Plastic. I don't have a complete list, but TeamCity, Bamboo, Jenkins, all do the heavy lifting for you and its only clicking a few buttons to configure things. I believe you wouldn't set up custom commit hooks etc in Git either, so that's only for advanced use.

    I think your right about mergebots being available only with the custom server, but I'd say you probably don't need that option, because something like Jenkins does the same thing (at least superficially and for the common case). You can setup triggers in the cloud backend, but you don't need to, it would just be an optimization instead of polling the main branch every x seconds:
    upload_2021-11-17_14-16-57.png

    Of course, I get that Plastic and tools cost money and offer advanced functionality that not everyone needs, and if GitHub + Actions works for you, why not stick to it? Git isn't going anywhere soon, although I wished for personal reasons. :D

    EDIT: I've google a little myself to see what the "recommended approach" would be if you don't want to build your CI pipeline from the individual pieces and I it looks like the official list is: Bamboo, Jenkins or TeamCity. The PlasticSCM plugins for these tools implement things that triggers and mergebots would let you build: monitor branches with rules, run tests, there are Unity plugins (run Unity tests, find correct editor version), build steps to send notifications to Slack and upload to hosting, etc.
     
    Last edited: Nov 17, 2021
  5. jsaade-gc

    jsaade-gc

    Joined:
    Apr 6, 2021
    Posts:
    11
    Probably you are right, we need to put more effort on this. One of the reasons, is as you mentioned, most of the team comes for a git background.
     
  6. Xarbrough

    Xarbrough

    Joined:
    Dec 11, 2014
    Posts:
    1,188
    I totally understand and would also admit that the PlasticSCM eco system isn't the most easy to navigate.

    One the one hand it has perfect support for designers who don't want to think about anything and just use Gluon with two buttons, which is so much simpler and more robust than using and keeping Git maintained (in the past we had to setup Git LFS, ensure it was running on all clients, keep the commit hooks locally in sync because the cannot be shared, the GUIs are often confusing and bloated for simple mainline development).

    But on the other hand, Plastic has so many features and configurable things that its difficult to get started. It also took me a while so setup our build server pipeline, and there are fewer beginner guides out there than for git. However, if you look at it from a clean slate and work through a few setup struggles, it'll be much simpler and more powerful.

    Regarding build server, I can really recommend hosting TeamCity on your own server (or let's say a simple PC in your indie studio office, if that's more fitting). They allow three additional build agents (or simply three unused PCs in the office) and 100 build configurations. A build config is something like: ProjectName/iOS/Testflight and ProjectName/Android/GooglePlay and if you don't actively use the config, you can save a template or backup and delete it, so you probably won't run out of free configs easily. Once the company is larger and you need additional stuff, it gets more expensive, but you can probably afford it by then, but until then it's just a a couple of button clicks to get everything setup, including things like Slack notifications:
    upload_2021-11-17_16-31-45.png

    One important point: I don't exactly know the characteristics of GitHub Actions and GameCI, but I assume they are not much different from Bitbucket or Unity Cloud Build, which we previously used. These cloud hosted virtual servers are incredibly slow compared to just a simple PC sitting in your office. For example, builds for certain consoles would take up to an hour on cloud hosted infrastructure, but when we switched to Plastic SCM + TeamCity and hosted the server on one of our local PCs, it was done in 8 minutes. Sure, you need to setup a static IP with your ISP to access it from home office, but it only costs 5$ per month and a Telekom call and then you copy paste the IP to TeamCity and voila, everyone on the team has password protected remote access.

    For example, permissions can be configured in a really nice way: per user, per group, per operation, in a base template or with overrides (positive and negative) and also per repo path. So you could easily set something up where third party contractors (music/sound) can only read and write to the "Assets/Audio" folder and not touch or break anything else. You can easily only allow developers to make branches and constrain artists to working on main, etc.

    upload_2021-11-17_16-26-18.png


    PS: Why do I keep advocating like this? Plastic is the best version control for my indie game studio using Unity so far (more powerful than Git, SVN, Mercurial, but less expensive/maintenance than Perforce), but Unity has some work to do to make it more approachable, maybe polish out some onboarding issues, make integration easier, etc. The core tools are all solid, that's what counts, but a few things could make it really stand apart: host Unity packages on PlasticSCM cloud repos, Unity Cloud Build integration with one click, etc.