Gitlab CI: running the same set of tests on severa

2019-07-23 04:19发布

In high performance computing is crucial to have a code tested against many different architectures/compilers: from a laptop to a supercomputer.

Assuming that we have

  • N testing machines/workers (each one running gitlab-ci-runner);
  • M tests,

what shall be the correct layout of .gitlab-ci.yml to ensure that each of the N machines runs all the tests?

Looks to me that adding just more workers ends up in a round-robin like assignment of the jobs.

Thanks for your help.

1条回答
等我变得足够好
2楼-- · 2019-07-23 05:05

You could use tags in your .gitlab-ci.yml and on the runners to distribute your tests to all mashines you want. Gitlab CI is very open to those use cases. I assume that you don't use docker for testing.

To accomplish your goal, do following steps:

  1. Install your gitlab-ci-multi-runners on your N mashines BUT if the runner ask you for tags, tag the mashine with a specifc name e.g. "MashineWithManyCPUsWhatever". Please use the gitlab-ci-multi-runner register command to do so. You can alternatively change the tags in Gitlab on the administration view after registration. The type of the runners should be "shared" not "specific".

enter image description here

  1. When you installed and tagged every runner on your mashines, tag you jobs. Example:

enter image description here

Every job will now be excecuted on the specific mashine with the specific tag. For more Information see Gitlab CI Documentation

查看更多
登录 后发表回答