Skip to content

Commit

Permalink
Remove failing part of self-test in release role (#512)
Browse files Browse the repository at this point in the history
* Use ansible-test to run integration tests.

* Remove test that fails.

* Remove antsibull_ansible_git_repo, antsibull_ansible_git_version, antsibull_ansible_git_dir options.
  • Loading branch information
felixfontein authored Apr 18, 2023
1 parent 81fb414 commit 8c81fe3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 44 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/512-release-role-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- "Remove now broken self-test from release role (https://github.com/ansible-community/antsibull/pull/512)."
- "Remove the parameters ``antsibull_ansible_git_repo``, ``antsibull_ansible_git_version``, and ``antsibull_ansible_git_dir`` from release role (https://github.com/ansible-community/antsibull/pull/512)."
17 changes: 0 additions & 17 deletions playbooks/nested-ansible-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# These can be supplied as extra-vars but are expected to come from roles/build-release/tasks/tests.yaml
antsibull_sdist_dir: "{{ playbook_dir | dirname }}/build"
antsibull_ansible_venv: "{{ antsibull_sdist_dir }}/venv"
antsibull_ansible_git_dir: "{{ antsibull_sdist_dir }}/ansible"
antsibull_ansible_git_version: "stable-2.12"
_python_version: "python3.9"
tasks:
- name: Parse installed ansible_builtin_runtime
Expand Down Expand Up @@ -52,18 +50,3 @@
- name: Print unavailable modules
ansible.builtin.debug:
msg: "The following modules are not available: {{ _unavailable_modules | map(attribute='item') | join(', ') }}"

- name: Clone the ansible git repository
ansible.builtin.git:
repo: "https://github.com/ansible/ansible"
dest: "{{ antsibull_ansible_git_dir }}"
version: "{{ antsibull_ansible_git_version }}"
depth: 1

- name: Run a simple ad-hoc integration test
environment:
ANSIBLE_ROLES_PATH: "{{ antsibull_ansible_git_dir }}/test/integration/targets"
# Note: this didn't work prior to ansible-base 2.10.4: https://github.com/ansible/ansible/pull/71824
ansible.builtin.command: >-
{{ antsibull_ansible_venv }}/bin/ansible -vv localhost -m include_role -a "name=include_vars"
changed_when: false
6 changes: 0 additions & 6 deletions roles/build-release/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ antsibull_data_git_dir: "{{ antsibull_sdist_dir }}/ansible-build-data"
# Directory to read .build and .deps files from
antsibull_data_dir: "{{ antsibull_data_git_dir }}/{{ antsibull_ansible_major_version }}"

# Where to clone the Ansible git repo from so we can run integration tests
antsibull_ansible_git_repo: "https://github.com/ansible/ansible"

# Where to clone the Ansible git repo
antsibull_ansible_git_dir: "{{ antsibull_sdist_dir }}/ansible"

# The major version of ansible to build
antsibull_ansible_major_version: "{{ (antsibull_ansible_version | default('')).split('.', 1)[0] }}"

Expand Down
19 changes: 0 additions & 19 deletions roles/build-release/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,6 @@ argument_specs:
type: path
default: "{{ antsibull_data_git_dir }}/<major_version>"

antsibull_ansible_git_repo:
description:
- Where to clone the Ansible git repository from so we can run integration tests.
type: str
default: "https://github.com/ansible/ansible"

antsibull_ansible_git_version:
description:
- The git tag (or branch) of the ansible repository to check out.
- Could be C(devel), C(stable-2.12), C(stable-2.13), etc.
type: str
required: true

antsibull_ansible_git_dir:
description:
- Where to clone the Ansible git repository.
type: path
default: "{{ antsibull_sdist_dir }}/ansible"

antsibull_ansible_version:
description:
- The version of ansible to build.
Expand Down
2 changes: 0 additions & 2 deletions roles/build-release/tasks/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,5 @@
{{ antsibull_ansible_venv }}/bin/ansible-playbook -i 'localhost,' --connection=local
-e antsibull_sdist_dir="{{ antsibull_sdist_dir }}"
-e antsibull_ansible_venv="{{ antsibull_ansible_venv }}"
-e antsibull_ansible_git_dir="{{ antsibull_ansible_git_dir }}"
-e antsibull_ansible_git_version="{{ antsibull_ansible_git_version }}"
-e _python_version="{{ _python_version }}"
{{ playbook_dir }}/nested-ansible-tests.yaml

0 comments on commit 8c81fe3

Please sign in to comment.