mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-28 19:00:17 +01:00
gitlab CI: use a separate variable for the template list
Just because I feel more comfortable with having this code in python than in the templates. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
3a7412a4d7
commit
50d916467b
2 changed files with 7 additions and 4 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue