How to setup parallel builds with different arguments


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:

Another way would be to have multiple pipelines (which are kind of like “Build Configurations”) which is also not available it seems:

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?

I have approximately the same use case. I need to build an Angular application for 3 environments with 3 different configuration variables (each of those builds are attached to a spécific environment, with a specific API URL).

I would like to trigger those 3 builds in parrallel, and when the tests pass, to deploy the preprod build on preproduction environment, and later, with a manual action, the production build on the production environment.

But since I’m not sure how to specify which artifact the deploy job must take, I will probably have to build for an environment in a job just before deployment to that environment. If someone has an idea how to achieve this better, please let me know.