Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Cloud Build with git modules - git modules are not checked out

Discussion in 'Unity Build Automation' started by js__, Dec 28, 2017.

  1. js__

    js__

    Joined:
    Sep 20, 2015
    Posts:
    6
    We added some libraries to our project using gitmodules. Modules are using ssh path, not https. Cloud build has access to all the repositories.

    This is how the .gitmodules file looks like:

    [submodule "Assets/Lib/library1"]
    path = Assets/Lib/library2
    url = git@bitbucket.org:company/library1.git
    [submodule "Assets/Lib/library2"]
    path = Assets/Lib/library2
    url = git@bitbucket.org:company/library2.git



    However, there is no step in the build log that would be about updating gitmodules at all.

    1: Running Prebuild steps
    2: In quiet period, build will start momentarily...
    3: Agent pid 15640
    4: All identities removed.
    5: Removing bvr
    6: Successfully uninstalled bvr-1.8.2
    7: done.
    8: bvr 1.8.2
    9: bvr-api 0.3.5
    10: prebuildstatus finished successfully.
    11: All identities removed.
    12: Agent pid 15999
    13: BVR: SCM Checkout
    14: GIT: Checkout project...
    15: GIT: Checking out git@bitbucket.org:company/project.git/master
    16: Cloned in 13 seconds.
    17: GIT: Checkout operation complete.
    18: BVR: SCM Checkout completed in 13 seconds.
    19: Calculated Workspace Size: 45.27 MiB
    20: PATH | SIZE
    21: ---------------------|----------
    22: /Assets | 45.23 MiB
    23: /ProjectSettings | 40.28 KiB
    24: /UnityPackageManager | 26.00 B
    25: GIT: Get current revision
    26: GIT: Current revision is XXXXX
    27: postcheckoutstatus finished successfully.
    28: Added new build target 'project'



    I also tried to create completely new build target but it didn't help. There are no errors, the modules are just ignored.

    How can I set up the cloud build to also clone the git modules?
     
    Mr-Knieves and goldbug like this.
  2. Mr-Knieves

    Mr-Knieves

    Joined:
    Mar 7, 2013
    Posts:
    41
    Bump, any update on this?
     
  3. henriqueranj

    henriqueranj

    Joined:
    Feb 18, 2016
    Posts:
    177
    Hi, unfortunately UCB does not output in the console about pulling the submodules.

    Are your submodules not being checked out at all or just not getting the latest state? Would your app be able to build without any errors if such happens? Make sure that your main repo is bumping properly the pointer to the submodule latest commits.

    Git submodules are working fine for me today.