Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/certification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ concurrency:
# file for each affected ansible-core version (for example, tests/sanity/ignore-2.18.txt).
jobs:
call:
uses: ansible-collections/partner-certification-checker/.github/workflows/certification-reusable.yml@6a7d1fe5159620648295b44222c48789008a9660 # v3.0.0
uses: ansible-collections/partner-certification-checker/.github/workflows/certification-reusable.yml@f4bf7ba4d3f008b2db8fc6a812fa3f89fdf42c2e # v4.1.0
13 changes: 13 additions & 0 deletions playbooks/eap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,19 @@
- match: "eap_migration_server_tool_subfolder_to_configuration:\\s*\"\\{\\{ \\(eap_version != '8\\.0\\.0'\\) \\| ternary\\('/migration',''\\) \\}\\}\""
replace: 'eap_migration_server_tool_subfolder_to_configuration: ""'
file: 'roles/eap_migration/defaults/main.yml$'
- match: "eap_install_supported_configuration:.*$"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please let me know why do we need it? when we already have https://github.com/ansible-middleware/wildfly/blob/main/roles/wildfly_install/meta/argument_specs.yml#L151-L163 which will be later pasted in the defaults/main.yml, maybe something is broken or we don't need this part.

Can you please run the test again without this and let us know what's the failure you are facin?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

community.fqcn_migration pastes downstream defaults into defaults/main.yml, but lineinfile serializes the dict as a single-line:

eap_install_supported_configuration: {'eap7.4': {'openjdk': ['1.8', '11', '17'], 'rhel': ...}, ...}

That's 238 characters — exceeds the 160-char yaml[line-length] limit. The post-processor reformats it to multi-line YAML.

Without it, partner certification fails with:
1 yaml[line-length] — Line too long (238 > 160 characters)
roles/eap_install/defaults/main.yml:44

replace: |-
eap_install_supported_configuration:
eap7.4:
openjdk: ['1.8', '11', '17']
rhel: ['7', '8', '9']
eap8.0:
openjdk: ['11', '17', '21']
rhel: ['8', '9', '10']
eap8.1:
openjdk: ['17', '21']
rhel: ['8', '9', '10']
file: 'roles/eap_install/defaults/main.yml$'
galaxy:
documentation: https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform
homepage: https://access.redhat.com/products/red-hat-jboss-enterprise-application-platform
Expand Down
35 changes: 26 additions & 9 deletions playbooks/tasks/run_partner_certification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
partner_certification_output_dir: "{{ partner_certification_output_dir | default('/tmp/janus-partner-certification') }}"
partner_certification_python_version: "{{ partner_certification_python_version | default('3.12') }}"
partner_certification_venv: "{{ (partner_certification_output_dir | default('/tmp/janus-partner-certification')) }}/venv-py{{ (partner_certification_python_version | default('3.12')) | replace('.', '') }}"
partner_certification_collections_path: "{{ (partner_certification_output_dir | default('/tmp/janus-partner-certification')) }}/collections"
partner_certification_collections_dir: "{{ (partner_certification_output_dir | default('/tmp/janus-partner-certification')) }}/collections"
partner_certification_sanity_targets:
- { ansible_core_version: "2.16.0", python_version: "3.12" }
- { ansible_core_version: "2.18.0", python_version: "3.12" }
Expand Down Expand Up @@ -84,11 +84,12 @@

- name: Set partner certification Ansible collections search path
ansible.builtin.set_fact:
partner_certification_ansible_collections_path: "{{ (partner_certification_output_dir | default('/tmp/janus-partner-certification')) }}/collections:{{ lookup('env', 'HOME') | default('/root', true) }}/.ansible/collections:/usr/share/ansible/collections"
partner_certification_collections_path: "{{ partner_certification_collections_dir }}:{{ lookup('env', 'HOME') | default('/root', true) }}/.ansible/collections:/usr/share/ansible/collections"
partner_certification_installed_collection_path: "{{ partner_certification_collections_dir }}/ansible_collections/{{ downstream_namespace }}/{{ downstream_name }}"

- name: Ensure partner certification collections directory exists
ansible.builtin.file:
path: "{{ partner_certification_collections_path }}"
path: "{{ partner_certification_collections_dir }}"
state: directory
mode: "0755"

Expand Down Expand Up @@ -127,15 +128,15 @@
- install
- "{{ _partner_cert_downstream_projects_dir }}/{{ item.item.name | default(item.item) | regex_replace('^[^.]+\\.', '') }}"
- -p
- "{{ partner_certification_collections_path }}"
- "{{ partner_certification_collections_dir }}"
- --force
- --pre
loop: "{{ _partner_cert_local_requirement_stats.results | default([]) }}"
when:
- item.stat is defined
- item.stat.exists
environment:
ANSIBLE_COLLECTIONS_PATH: "{{ partner_certification_ansible_collections_path }}"
ANSIBLE_COLLECTIONS_PATH: "{{ partner_certification_collections_path }}"
changed_when: false

- name: Install remaining collection requirements for ansible-lint from Galaxy
Expand All @@ -147,7 +148,7 @@
- -r
- requirements.yml
- -p
- "{{ partner_certification_collections_path }}"
- "{{ partner_certification_collections_dir }}"
- --pre
args:
chdir: "{{ partner_certification_collection_root }}"
Expand All @@ -157,7 +158,21 @@
(_partner_cert_local_requirement_stats.results | default([]) | selectattr('stat.exists') | list | length)
< (_partner_cert_requirements | default([]) | length)
environment:
ANSIBLE_COLLECTIONS_PATH: "{{ partner_certification_ansible_collections_path }}"
ANSIBLE_COLLECTIONS_PATH: "{{ partner_certification_collections_path }}"
changed_when: false

- name: Install downstream collection itself for ansible-lint FQCN resolution
ansible.builtin.command:
argv:
- "{{ partner_certification_venv }}/bin/ansible-galaxy"
- collection
- install
- "{{ partner_certification_collection_root }}"
- -p
- "{{ partner_certification_collections_dir }}"
- --force
environment:
ANSIBLE_COLLECTIONS_PATH: "{{ partner_certification_collections_path }}"
changed_when: false

- name: Run ansible-lint production profile on downstream collection
Expand All @@ -166,10 +181,12 @@
- "{{ partner_certification_venv }}/bin/ansible-lint"
- --offline
- --profile=production
- --config-file
- "{{ partner_certification_collection_root }}/.ansible-lint"
args:
chdir: "{{ partner_certification_collection_root }}"
chdir: "{{ partner_certification_installed_collection_path }}"
environment:
ANSIBLE_COLLECTIONS_PATH: "{{ partner_certification_ansible_collections_path }}"
ANSIBLE_COLLECTIONS_PATH: "{{ partner_certification_collections_path }}"
register: _partner_cert_ansible_lint
changed_when: false

Expand Down
2 changes: 1 addition & 1 deletion playbooks/tasks/run_partner_certification_sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- --color
- --verbose
args:
chdir: "{{ partner_certification_collection_root }}"
chdir: "{{ partner_certification_installed_collection_path }}"
environment:
ANSIBLE_TEST_ALLOW_ROOT: "1"
register: _partner_cert_sanity
Expand Down
Loading