Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Plastic SCM + TeamCity integration error

Discussion in 'Unity Version Control' started by R0bit, Apr 6, 2023.

  1. R0bit

    R0bit

    Joined:
    Sep 17, 2018
    Posts:
    6
    Hello! :)
    I am using TeamCity and Plastic SCM. I added a plugin for Plastic to TeamCity and installed Plastic on the Build Agent. Build Agent(Win) and TeamCity(Linux) are different machines. I also installed Plastic on the TeamCity machine because without it I couldn't create a VCS Root. After TeamCity responds to a new commit and, in theory, it should update the workspace or clone the repository. But the following happens:
    "Failed to perform checkout on agent: Unable to open a Plastic SCM shell"
    The PATH environment variables have the path "C:\Program Files\PlasticSCM5\client"

    What should I do? :(
     
  2. R0bit

    R0bit

    Joined:
    Sep 17, 2018
    Posts:
    6
    Fixed by setting the "VCS checkout mode" parameter to "Always checkout files on server"
    It also turned out that the plugin crashes
    Plastic version: 11.0.16.7881
    Plugin version: SNAPSHOT-202303292320
     
  3. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    863
    Hi,

    From your last comment, I don't fully understand if you fixed the problem. If the issue persists, we need to enable the "cm" log to debug the issue: https://docs.plasticscm.com/technical-articles/kb-enabling-logging-for-plastic-scm-part-i

    When enabling the TeamCity integration it's important to follow the next steps:
    - Install the Plastic SCM client in the server and build nodes.

    - Configure the Plastic SCM client to reach the Plastic SCM server.

    - Manually paste the "C:\Users\xxx\AppData\Local\plsatic4\client.conf" to the client binaries folder: "C:\Program Files\PlasticSCM5\client\client.conf". This is step is important so the TeamCity server service is also able to read the client configuration.


    Regards,
    Carlos.
     
  4. R0bit

    R0bit

    Joined:
    Sep 17, 2018
    Posts:
    6
    Yes, I fixed it by doing this:
    Setting the "VCS checkout mode" parameter to "Always checkout files on server"
     
  5. R0bit

    R0bit

    Joined:
    Sep 17, 2018
    Posts:
    6
    After that, this error appears:
    Failed to perform checkout on agent: Error performing agent-side checkout to 73: Error: The handle is invalid. CommandResult 1
     
  6. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    863
    I don't understand, Is the issue currently fixed or not? Are you using server-side checkout or client side?
    If it's not, we need to enable the "cm" logs to debug it.
     
  7. R0bit

    R0bit

    Joined:
    Sep 17, 2018
    Posts:
    6
    Yes, the problem has been fixed. But I don't think this is the right solution.
     
  8. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    863
    If some kind of issue still persists, please enable the "cm" logs so we can debug the error.
     
  9. R0bit

    R0bit

    Joined:
    Sep 17, 2018
    Posts:
    6
    The error was due to the fact that the TeamCity Build Agent was run as the "Administrator" user. To solve the problem, you need to create a separate user for the TeamCity Build Agent. Steps I did:
    1) Created a separate user for the Build Agent
    2) Authorized Build Agent through this user(https://stackoverflow.com/questions...-identity-that-runs-a-build-agent-in-teamcity)
    3) Gave all permissions to the BuildAgent folder for the created user
    4) Launched Plastic SCM on behalf of the created user and logged into the account
     
  10. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    863
    Thanks for the update!