Skip to content

Commit

Permalink
Merge pull request #85 from RedHatSatellite/rel500
Browse files Browse the repository at this point in the history
Release 5.0.0
  • Loading branch information
evgeni authored Nov 22, 2024
2 parents 737e90f + 59e6137 commit 501f491
Show file tree
Hide file tree
Showing 182 changed files with 7,148 additions and 8,198 deletions.
28 changes: 13 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
env:
COLORTERM: 'yes'
TERM: 'xterm-256color'
PYTEST_ADDOPTS: '--color=yes'
PYTEST_ADDOPTS: '-vv --color=yes'

concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
Expand All @@ -25,18 +25,11 @@ jobs:
- stable-2.15
- stable-2.16
- stable-2.17
- stable-2.18
- devel
include:
- python: "3.8"
ansible: "v2.9.17"
- python: "3.8"
ansible: "stable-2.10"
- python: "2.7"
ansible: "stable-2.11"
container: "python:2.7"
- python: "3.5"
ansible: "stable-2.11"
container: "python:3.5"
ansible: "v2.10.4"
- python: "3.6"
ansible: "stable-2.11"
- python: "3.7"
Expand All @@ -49,6 +42,8 @@ jobs:
ansible: "stable-2.13"
- python: "3.12"
ansible: "devel"
- python: "3.13"
ansible: "devel"
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -72,16 +67,19 @@ jobs:
if: matrix.container == null
- name: Install Ansible
run: pip install --upgrade https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz
- name: Ensure Jinja version is old enough for Ansible 2.9
- name: Ensure Jinja version is old enough for Ansible 2.10
run: pip install --upgrade 'Jinja2<3.1'
if: matrix.ansible == 'v2.9.17'
if: matrix.ansible == 'v2.10.4'
- name: Install dependencies
run: make test-setup
- name: prepare a redhat-uep.pem, even if we run on Ubuntu
run: sudo mkdir -p /etc/rhsm/ca/ && sudo curl -o /etc/rhsm/ca/redhat-uep.pem https://ftp.redhat.com/redhat/convert2rhel/redhat-uep.pem
- name: Install required collections for ansible-base (2.10+)
- name: Install required collections
run: ansible-galaxy collection install https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-docker-3.12.0.tar.gz
if: matrix.ansible != 'v2.9.17'
if: matrix.ansible != 'v2.10.4'
- name: Install required collections for ansible 2.10
run: ansible-galaxy collection install https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-docker-2.7.12.tar.gz
if: matrix.ansible == 'v2.10.4'
- name: Run crud tests
run: make test-crud
- name: Run other tests
Expand All @@ -90,7 +88,7 @@ jobs:
run: make dist-test
- name: Run sanity tests
run: make SANITY_OPTS="--docker" sanity
if: matrix.ansible != 'v2.9.17' && matrix.ansible != 'stable-2.10' && matrix.ansible != 'stable-2.11' && matrix.ansible != 'stable-2.12' && matrix.ansible != 'stable-2.13' && matrix.ansible != 'stable-2.14'
if: matrix.ansible != 'v2.10.4' && matrix.ansible != 'stable-2.11' && matrix.ansible != 'stable-2.12' && matrix.ansible != 'stable-2.13' && matrix.ansible != 'stable-2.14'

checkmode:
runs-on: ubuntu-latest
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@ redhat.satellite Release Notes

This changelog describes changes after version 0.8.1.

v5.0.0
======

Minor Changes
-------------

- host, hostgroup, domain, operatingsystem, subnet, organization, location - support setting hidden parameters

Breaking Changes / Porting Guide
--------------------------------

- Drop support for Ansible 2.9.
- Drop support for Python 2.7 and 3.5.

v4.2.0
======

Expand Down
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ $(foreach PLUGIN_TYPE,$(PLUGIN_TYPES),$(eval _$(PLUGIN_TYPE) := $(filter-out %__
DEPENDENCIES := $(METADATA) $(foreach PLUGIN_TYPE,$(PLUGIN_TYPES),$(_$(PLUGIN_TYPE))) $(foreach ROLE,$(ROLES),$(wildcard $(ROLE)/*/*)) $(foreach ROLE,$(ROLES),$(ROLE)/README.md) $(TESTDATA)

PYTHON_VERSION = $(shell $(PYTHON_COMMAND) -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))')
ANSIBLE_SUPPORTS_REDIRECTS = $(shell ansible --version | grep -q 'ansible 2.9' && echo 0 || echo 1)
COLLECTION_COMMAND ?= ansible-galaxy
SANITY_OPTS = --venv
TEST =
FLAGS =
PYTEST = pytest -n 4 --forked -vv
PYTEST_COMMAND ?= pytest
PYTEST = $(PYTEST_COMMAND) -n 4 --forked
# PYTEST_ADDOPTS is exported to sub-shells and picked up by *all* pytest invocations
PYTEST_ADDOPTS ?= -vv
export PYTEST_ADDOPTS

APIPIE_VERSION ?= v0.4.0
APIPIE_VERSION ?= v0.5.0

default: help
help:
Expand Down Expand Up @@ -72,17 +75,17 @@ test-other:
$(PYTEST) -k 'not test_crud.py'

livetest: $(MANIFEST) | tests/test_playbooks/vars/server.yml
pytest -vv 'tests/test_crud.py::test_crud' --vcrmode live $(FLAGS)
$(PYTEST_COMMAND) 'tests/test_crud.py::test_crud' --vcrmode live $(FLAGS)

test_%: FORCE $(MANIFEST) | tests/test_playbooks/vars/server.yml
pytest -vv 'tests/test_crud.py::test_crud[$*]' 'tests/test_crud.py::test_check_mode[$*]' $(FLAGS)
$(PYTEST_COMMAND) 'tests/test_crud.py::test_crud[$*]' 'tests/test_crud.py::test_check_mode[$*]' $(FLAGS)

livetest_%: FORCE $(MANIFEST) | tests/test_playbooks/vars/server.yml
pytest -vv 'tests/test_crud.py::test_crud[$*]' --vcrmode live $(FLAGS)
$(PYTEST_COMMAND) 'tests/test_crud.py::test_crud[$*]' --vcrmode live $(FLAGS)

record_%: FORCE $(MANIFEST)
$(RM) tests/test_playbooks/fixtures/$*-*.yml
pytest -vv 'tests/test_crud.py::test_crud[$*]' --vcrmode record $(FLAGS)
$(PYTEST_COMMAND) 'tests/test_crud.py::test_crud[$*]' --vcrmode record $(FLAGS)

clean_%: FORCE $(MANIFEST)
ansible-playbook --tags teardown,cleanup -i tests/inventory/hosts 'tests/test_playbooks/$*.yml'
Expand All @@ -99,9 +102,7 @@ tests/test_playbooks/vars/server.yml:

dist-test: $(MANIFEST)
SATELLITE_SERVER_URL=https://foreman.example.test ansible -m $(NAMESPACE).$(NAME).organization -a "username=admin password=changeme name=collectiontest" localhost | grep -q "Failed to connect to Foreman server.*foreman.example.test"
ifeq ($(ANSIBLE_SUPPORTS_REDIRECTS),1)
SATELLITE_SERVER_URL=https://foreman.example.test ansible -m $(NAMESPACE).$(NAME).foreman_organization -a "username=admin password=changeme name=collectiontest" localhost | grep -q "Failed to connect to Foreman server.*foreman.example.test"
endif
SATELLITE_SERVER_URL=http://foreman.example.test ansible -m $(NAMESPACE).$(NAME).organization -a "username=admin password=changeme name=collectiontest" localhost 2>&1| grep -q "You have configured a plain HTTP server URL."
ansible-doc $(NAMESPACE).$(NAME).organization | grep -q "Manage Organization"

Expand Down
2 changes: 1 addition & 1 deletion ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[defaults]
collections_paths = build/collections
collections_path = build/collections
inventory = tests/inventory/hosts
retry_files_enabled = False
devel_warning = False
Expand Down
1 change: 0 additions & 1 deletion bindep.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
python3-rpm [(platform:redhat platform:base-py3)]
rpm-python [(platform:redhat platform:base-py2)]
python38-requests [platform:centos-8 platform:rhel-8]
13 changes: 13 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -915,3 +915,16 @@ releases:
- 1769-callback-vault-facts.yml
- lce-role-state.yml
release_date: '2024-08-30'
5.0.0:
changes:
breaking_changes:
- Drop support for Ansible 2.9.
- Drop support for Python 2.7 and 3.5.
minor_changes:
- host, hostgroup, domain, operatingsystem, subnet, organization, location
- support setting hidden parameters
fragments:
- 1785-hidden_parameters.yml
- drop-ansible-29.yaml
- drop-python-pre-36.yaml
release_date: '2024-11-22'
3 changes: 2 additions & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ authors:
- "Thomas Mueller <[email protected]>"
- "William Bradford Clark <[email protected]>"
- "Yifat Makias <[email protected]>"
- "ab <[email protected]>"
- "achevalet <[email protected]>"
- "alesc <[email protected]>"
- "bob <[email protected]>"
Expand All @@ -108,7 +109,7 @@ authors:
- "russianguppie <[email protected]>"
- "willtome <[email protected]>"
- "yuqo2450 <[email protected]>"
version: "4.2.0"
version: "5.0.0"
license:
- "GPL-3.0-or-later"
tags:
Expand Down
5 changes: 5 additions & 0 deletions plugins/doc_fragments/foreman.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ class ModuleDocFragment(object):
- 'yaml'
- 'json'
type: str
hidden_value:
description:
- Should the value be hidden
required: false
type: bool
'''

OS_FAMILY = '''
Expand Down
Loading

0 comments on commit 501f491

Please sign in to comment.