diff --git a/.gitlab-ci/generate-gitlab-ci.py b/.gitlab-ci/generate-gitlab-ci.py index b3a05075..1b8720a7 100755 --- a/.gitlab-ci/generate-gitlab-ci.py +++ b/.gitlab-ci/generate-gitlab-ci.py @@ -26,6 +26,8 @@ distributions = [ } ] +templates = sorted(set([x['name'] for x in distributions])) + # in reverse order of duration to get the slowest ones started first test_suites = [ {'name': 'touchpad', 'suites': 'touchpad'}, @@ -44,7 +46,8 @@ def generate_template(): template = env.get_template('gitlab-ci.tmpl') config = {'distributions': distributions, - 'test_suites': test_suites} + 'test_suites': test_suites, + 'templates': templates} with open('.gitlab-ci.yml', 'w') as fd: template.stream(config).dump(fd) diff --git a/.gitlab-ci/gitlab-ci.tmpl b/.gitlab-ci/gitlab-ci.tmpl index 4d903f1c..102e9708 100644 --- a/.gitlab-ci/gitlab-ci.tmpl +++ b/.gitlab-ci/gitlab-ci.tmpl @@ -27,11 +27,11 @@ .templates_sha: &template_sha b7030c2cd0d6ccc5f6d4f8299bafa4daa9240d71 # see https://docs.gitlab.com/ee/ci/yaml/#includefile include: - {% for distribution in distributions|map(attribute='name')|unique()|sort() %} - # {{ distribution.capitalize() }} container builder template + {% for template in templates %} + # {{ template.capitalize() }} container builder template - project: 'wayland/ci-templates' ref: *template_sha - file: '/templates/{{distribution}}.yml' + file: '/templates/{{template}}.yml' {% endfor %} stages: