Merge "Ensure we create correct job names with role-addition.yml"

This commit is contained in:
Zuul 2022-05-26 12:11:42 +00:00 committed by Gerrit Code Review
commit 3b8c1d4138
2 changed files with 6 additions and 6 deletions

View File

@ -22,8 +22,8 @@ When the role is ready for CI, add a **job** entry into the
- job:
files:
- ^tripleo_ansible/roles/${NEWROLENAME}/.*
name: tripleo-ansible-centos-8-molecule-${NEWROLENAME}
parent: tripleo-ansible-centos-8-base
name: tripleo-ansible-centos-stream-molecule-${NEWROLENAME}
parent: tripleo-ansible-centos-stream-base
vars:
tox_envlist: mol-${NEWROLENAME}
@ -36,10 +36,10 @@ of the `molecule.yaml` file.
- project:
check:
jobs:
- tripleo-ansible-centos-8-molecule-${NEWROLENAME}
- tripleo-ansible-centos-stream-molecule-${NEWROLENAME}
gate:
jobs:
- tripleo-ansible-centos-8-molecule-${NEWROLENAME}
- tripleo-ansible-centos-stream-molecule-${NEWROLENAME}
Finally add a role documentation file at

View File

@ -52,7 +52,7 @@
---
{% set items = molecule_yaml['content'] | b64decode | from_yaml %}
{% set job_index = [] %}
{% set new_job_name = "tripleo-ansible-centos-8-molecule-" ~ _role_name %}
{% set new_job_name = "tripleo-ansible-centos-stream-molecule-" ~ _role_name %}
{% for item in items %}
{% if 'project-template' in item %}
{% if item['project-template']['name'] == "tripleo-ansible-molecule-jobs" %}
@ -81,7 +81,7 @@
{% if (job_index | length) < 1 %}
{% set new_job = {
"name": new_job_name,
"parent": "tripleo-ansible-centos-8-base",
"parent": "tripleo-ansible-centos-stream-base",
"files": [
"^tripleo_ansible/roles/" ~ _role_name ~ "/(?!meta).*"
],