My submodules have been updated according to the interval that I wanted. Since I did not want all other jobs to run when I was running this job, I add the following code to other jobs: rules:ĭo not run these jobs if the $UPDATE_SUBMODULE is trueīy using a pipeline schedule with the $UPDATE_SUBMODULE set, this solution was working. Job used in projectB to update all its submodules git:push job I wrote in my post How to push to a Git repository from a GitLab CI pipeline? Well, I have found another case to use it! □ update:submodule: □ Solution 1: Update the submodules from withinĭo you remember the. To simplify my explanation, let's says we have two projects: projectA and projectB, and projectB has projectA as one of its submodules. It turned out to be not as simple as I would have liked, but I managed to make it work. I am aware that sometimes, you do not want that a submodule to be able to introduce a breaking change, but if you are 99.99% sure that it cannot break your project, would not it be fun to forget that you have to update their references to use the latest changes? □ Imagine if you could only check out your project containing submodules and you have the guarantee that they are at their latest version.□ It is not really convenient when you want to automate your workflow and have to manually check out the code to update the submodule SHA, right? □ eb41d76) and it must be committed to your repository.Īnd it seems there is not a way yet to always use the latest submodule commit without updating their reference with a command like git submodule update -remote. Unfortunately, by design, Git keeps track of the submodules using their commit SHA (ex. If you are using Git submodules in your project, you might want to keep them up to date so that their latest version is available.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |