We are currently using TeamCity for our builds and I am trying to model our build pipeline in GitLab but am unsure how to configure parallel builds.
So what I currently have and what to do in GitLab:
Repository A with Branch “develop”. I want to trigger a build every night and not on commit.
Every night I want to execute 3 different build jobs using the “develop” branch. These build jobs will execute an npm run script which will build the project and do some file copy stuff. This npm run script will need different arguments in every build job and will create different files during the build. These three artefacts are actually 3 different android apks with different bundle identifiers and different resource files. So every build needs to run isolated from the other one or it would corrupt the others.
In TeamCity lingo I have a VCS connection for the “develop” branch and 3 different “Build Configurations” generating the 3 different artefacts.
In GitLab it looks like jobs under a certain stage would run in parallel, tempting me to just specify three jobs with different build commands/arguments and a restriction “only: - develop”. But does this work? Will the parallel jobs run in the same checkout directory on the same files? If yes then the three jobs would destroy/corrupt each other’s builds. This bug here would suggest that this is an issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/2588
Another way would be to have multiple pipelines (which are kind of like “Build Configurations”) which is also not available it seems: https://gitlab.com/gitlab-org/gitlab-ce/issues/22972
A super hack would be to just do the three builds sequentially with a reset in between… but that just seems super wrong.
Is there a manageable way to achieve what I want?