Gitlab CI: running the same set of tests on several machines

我只是一个虾纸丫 提交于 2019-12-13 01:59:47

问题


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:


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".

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

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



来源:https://stackoverflow.com/questions/35837678/gitlab-ci-running-the-same-set-of-tests-on-several-machines

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!