Skip to content

Commit

Permalink
Merge branch 'devel' into bump-ansible-2.18
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbuchmann authored Nov 15, 2024
2 parents da11259 + b3d1b16 commit f1bbccf
Show file tree
Hide file tree
Showing 17 changed files with 184 additions and 108 deletions.
89 changes: 63 additions & 26 deletions .github/workflows/pull-request-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
docs: ${{ steps.filter.outputs.docs }}
python: ${{ steps.filter.outputs.python }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
Expand Down Expand Up @@ -63,6 +63,7 @@ jobs:
- 'mkdocs.yml'
- 'ansible_collections/arista/cvp/docs/**'
- 'ansible_collections/arista/cvp/roles/**/README.md'
- 'ansible_collections/arista/cvp/index.md'
- '.github/workflows/*'
python:
- 'ansible_collections/arista/cvp/plugins/**/*.py'
Expand All @@ -82,11 +83,11 @@ jobs:
steps:
# Removed as gh action is marked as deprecated
# - uses: pre-commit/action@v2.0.2
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install requirements
Expand All @@ -111,9 +112,9 @@ jobs:
run: |
echo "PY_COLORS=1" >> $GITHUB_ENV
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Test code compatibility
Expand All @@ -136,9 +137,9 @@ jobs:
run: |
echo "PY_COLORS=1" >> $GITHUB_ENV
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Install requirements
Expand All @@ -150,7 +151,7 @@ jobs:
run: |
cd tests/
make unit-tests
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: pytest-report
path: |
Expand All @@ -163,8 +164,9 @@ jobs:
strategy:
fail-fast: true
matrix:
ansible_version: ['ansible-core==2.11.3', 'ansible-core>=2.11.3']
avd_scenario:
ansible_version:
- 'ansible-core>=2.15.0,<2.18.0 --upgrade'
cvp_scenario:
- cv_configlet_loose
- cv_configlet_strict
- cv_device
Expand All @@ -175,32 +177,31 @@ jobs:
run: |
echo "PY_COLORS=1" >> $GITHUB_ENV
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run molecule action
uses: arista-netdevops-community/action-molecule-avd@v1.1
uses: arista-netdevops-community/action-molecule-avd@v1.8.1
with:
molecule_parentdir: 'ansible_collections/arista/cvp'
molecule_command: 'test'
molecule_args: '--scenario-name ${{ matrix.avd_scenario }}'
molecule_args: '--scenario-name ${{ matrix.cvp_scenario }}'
pip_file: ansible_collections/arista/cvp/requirements.txt
galaxy_file: "ansible_collections/arista/cvp/collections.yml"
ansible: "${{ matrix.ansible_version }}"
check_git: true
check_git_enforced: false
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: molecule-${{ matrix.avd_scenario }}-artifacts
path: ansible_collections/arista/cvp/molecule/${{ matrix.avd_scenario }}
name: molecule-${{ matrix.cvp_scenario }}-artifacts
path: ansible_collections/arista/cvp/molecule/${{ matrix.cvp_scenario }}

molecule_dhcp:
name: Validate Roles for DHCP management
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
# ansible_version: ['ansible-core==2.11.3', 'ansible-core>=2.11.3']
# XXX:
ansible_version: ['ansible-core==2.15.0', 'ansible-core>=2.17.0']
avd_scenario:
ansible_version: ['ansible-core==2.15.0', 'ansible-core<2.18.0']
cvp_scenario:
- dhcp_management_mac
- dhcp_management_offline
- dhcp_system_mac
Expand All @@ -211,14 +212,15 @@ jobs:
run: |
echo "PY_COLORS=1" >> $GITHUB_ENV
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run molecule action
uses: arista-netdevops-community/action-molecule-avd@v1.1
uses: arista-netdevops-community/action-molecule-avd@v1.8.1
with:
molecule_parentdir: 'ansible_collections/arista/cvp'
molecule_command: 'test'
molecule_args: '--scenario-name ${{ matrix.avd_scenario }}'
molecule_args: '--scenario-name ${{ matrix.cvp_scenario }}'
pip_file: ansible_collections/arista/cvp/requirements.txt
galaxy_file: "ansible_collections/arista/cvp/collections.yml"
ansible: "${{ matrix.ansible_version }}"
check_git: true
check_git_enforced: false
Expand Down Expand Up @@ -276,9 +278,9 @@ jobs:
run: |
echo "PY_COLORS=1" >> $GITHUB_ENV
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python 3
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: 'Install Python requirements'
Expand Down Expand Up @@ -309,3 +311,38 @@ jobs:
run: |
cd ansible_collections/arista/cvp/
ansible-lint --force-color --strict -v
# ----------------------------------- #
# Galaxy Importer
# ----------------------------------- #
galaxy_importer:
name: Test galaxy-importer
runs-on: ubuntu-20.04 # Older version to be compatible with old python
env:
PY_COLORS: 1 # allows molecule colors to be passed to GitHub Actions
ANSIBLE_FORCE_COLOR: 1 # allows ansible colors to be passed to GitHub Actions
GALAXY_IMPORTER_CONFIG: galaxy-importer/galaxy-importer.cfg
steps:
- uses: actions/setup-python@v5
with:
python-version: |
3.10
- uses: actions/checkout@v4
- name: 'Install Python & Ansible requirements'
run: |
pip install -r ansible_collections/arista/cvp/requirements.txt -r ansible_collections/arista/cvp/requirements-dev.txt --upgrade
ansible-galaxy collection install -r ansible_collections/arista/cvp/collections.yml
- name: Install galaxy-importer
# Install the specific version of galaxy-importer used on galaxy.ansible.com
# The version conflicts with our requirements,
# so we let the galaxy-importer version resolve remaining requirements.
run: |
pip install "galaxy-importer==0.4.20"
- name: 'Build ansible package'
run: make collection-build
- name: 'Run galaxy-importer checks'
run: python -m galaxy_importer.main *.tar.gz
- uses: actions/upload-artifact@v3
with:
name: importer-logs
path: ./importer_result.json
50 changes: 25 additions & 25 deletions .github/workflows/pull-request-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ jobs:
cd ansible_collections/arista/avd/
ansible-test sanity -v --requirements --docker --skip-test yamllint --exclude docs/
galaxy_importer:
name: Test galaxy-importer
runs-on: ubuntu-latest
container: avdteam/base:3.8-v2.0
needs: [ molecule_eos_designs ]
if: needs.cloudvision.status != 'failed' && needs.molecule_eos_designs.status != 'failed' && needs.file-changes.outputs.plugins == 'true'
env:
PY_COLORS: 1 # allows molecule colors to be passed to GitHub Actions
ANSIBLE_FORCE_COLOR: 1 # allows ansible colors to be passed to GitHub Actions
steps:
- name: 'set environment variables'
run: |
echo "PY_COLORS=1" >> $GITHUB_ENV
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: install requirements
run: make install-requirements
- name: 'build ansible package'
run: make collection-build
- name: 'run ansible-importer checks'
run: python -m galaxy_importer.main *.tar.gz
- uses: actions/upload-artifact@v2
with:
name: importer-logs
path: ./importer_result.json
# galaxy_importer:
# name: Test galaxy-importer
# runs-on: ubuntu-latest
# container: avdteam/base:3.8-v2.0
# needs: [ molecule_eos_designs ]
# if: needs.cloudvision.status != 'failed' && needs.molecule_eos_designs.status != 'failed' && needs.file-changes.outputs.plugins == 'true'
# env:
# PY_COLORS: 1 # allows molecule colors to be passed to GitHub Actions
# ANSIBLE_FORCE_COLOR: 1 # allows ansible colors to be passed to GitHub Actions
# steps:
# - name: 'set environment variables'
# run: |
# echo "PY_COLORS=1" >> $GITHUB_ENV
# echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
# - uses: actions/checkout@v2
# - name: install requirements
# run: make install-requirements
# - name: 'build ansible package'
# run: make collection-build
# - name: 'run ansible-importer checks'
# run: python -m galaxy_importer.main *.tar.gz
# - uses: actions/upload-artifact@v2
# with:
# name: importer-logs
# path: ./importer_result.json
17 changes: 17 additions & 0 deletions ansible_collections/arista/cvp/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ Arista.Cvp Release Notes
.. contents:: Topics


v3.11.0
=======

Release Summary
---------------

Release 3.11.0 - See documentation on cvp.avd.sh for details.


Bugfixes
--------

- Allow cv_device_v3 to handle SN-based decomms
- Cv_validate_v3 broken with cvprac 1.4.0 due to argument keyword change
- Device decommissioning fails if a device is not streaming and not provisioned
- Update Readme with correct ansible-core version

v3.10.1
=======

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ plugins:
strategy: {}
test: {}
vars: {}
version: 3.10.1
version: 3.11.0
13 changes: 13 additions & 0 deletions ansible_collections/arista/cvp/changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ releases:
fragments:
- v3.10.1.yml
release_date: '2023-12-06'
3.11.0:
changes:
bugfixes:
- Allow cv_device_v3 to handle SN-based decomms
- Cv_validate_v3 broken with cvprac 1.4.0 due to argument keyword change
- Device decommissioning fails if a device is not streaming and not provisioned
- Update Readme with correct ansible-core version
release_summary: 'Release 3.11.0 - See documentation on cvp.avd.sh for details.
'
fragments:
- v3.11.0.yml
release_date: '2024-08-13'
3.4.0:
changes:
bugfixes:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
release_summary: |
Release 3.11.0 - See documentation on cvp.avd.sh for details.
bugfixes:
- Cv_validate_v3 broken with cvprac 1.4.0 due to argument keyword change
- Update Readme with correct ansible-core version
- Allow cv_device_v3 to handle SN-based decomms
- Device decommissioning fails if a device is not streaming and not provisioned
7 changes: 7 additions & 0 deletions ansible_collections/arista/cvp/collections.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# collection requirements leveraged by molecule
collections:
- arista.eos
- ansible.netcommon
- community.general
- community.docker
- ansible.posix
26 changes: 26 additions & 0 deletions ansible_collections/arista/cvp/docs/release-notes/v3.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@
- On premise version higher than 2021.3.0
- CloudVision as a Service

## Release 3.11.0

Full release note available on [github](https://github.com/aristanetworks/ansible-cvp/releases/tag/v3.11.0)

### Deprecations

- The `dhcp_configuration` role has been deprecated and will be removed in version 4.0.0.

### Bug fixes

- `cv_validate_v3` Fix broken module with cvprac 1.4.0 due to argument keyword change(#694)
- `cv_device_v3` Fix device decommissioning fail when a device is not streaming and not provisioned(#700)
- `cv_device_v3` Allow cv_device_v3 to handle SN-based decomms(#705)

### Documentation

- Add actions documentation
- Readme updates to align with new Red Hat template

### Requirements

- Ansible-cvp now requires a newer minimum and maximum version of the Python package `ansible-core>=2.15.0,<2.18.0`
The latest version can be installed with `pip install "ansible-core>=2.15.0" --upgrade`
- Ansible-cvp now requires a newer minimum but no maximum version of the Python package `cvprac>=1.4.0`
The latest version can be installed with `pip install "cvprac>=1.4.0" --upgrade`

## Release 3.10.1

Full release note available on [github](https://github.com/aristanetworks/ansible-cvp/releases/tag/v3.10.1)
Expand Down
2 changes: 1 addition & 1 deletion ansible_collections/arista/cvp/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace: arista
name: cvp

# The version of the collection. Must be compatible with semantic versioning
version: 3.10.1
version: 3.11.0

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: README.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ scenario:
- destroy
test_sequence:
# - dependency
- lint
# - lint
# - cleanup
- destroy
- syntax
Expand All @@ -42,24 +42,8 @@ dependency:
driver:
name: docker
platforms:
- name: centos7-systemd
image: centos:7
command: /sbin/init
tmpfs:
- /run
- /tmp
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: centos8-systemd
image: centos:8
command: /sbin/init
tmpfs:
- /run
- /tmp
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- name: ubuntu
image: ubuntu:18.04
- name: ubuntu-22.04
image: ubuntu:22.04
provisioner:
log: true
name: ansible
Expand Down
Loading

0 comments on commit f1bbccf

Please sign in to comment.