My question is relatively simple,
I have gitlab set-up, gitlab CI too and two separate server which each have their own runner. Both runners are working and can execute a build successfully.
What I'd like to achieve now is to have one project be build by both runners, perferrably even with seperate commands. This last thing doesn't seem possible however if I add both runners to a project it just seems to build on one of them and not the other.
Is it possible to get it to build on both and maybe even vary the scripts?
You can have one gitlab runner for all stages. The build job would then be picked up by any gitlab runner that you have defined that has the tag build .
GitLab Runners do not offer secure isolation between projects that they do builds for. You are TRUSTING all GitLab users who can push code to project A, B or C to run shell scripts on the machine hosting runner X.
It's possible to run multiple GitLab runners on the same host by encapsulating the runner and its executor dependencies inside a container. For example, since I use GitLab with the Docker executor, I created a container that encapsulates the GitLab runner + a docker engine.
GitLab provides a method to make clones of a job and run them in parallel for faster execution using the parallel: keyword. While parallel jobs may not help in reducing the consumption of CI minutes, they definitely help increase work productivity.
Someone brought this up on the GitLab CI issue tracker (https://gitlab.com/gitlab-org/gitlab-ci/issues/237). The workaround proposed there is as follows:
Create multiple jobs with different tags and assign different tags to these runners:
job1: script: echo 1 tags: - runner1 job2: script: echo 2 tags: - runner2
Not a great solution, especially if you want to run the exact same job on a bunch of runners (as I do), but it can be made to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With