This collection uses antsibull-changelog for changelog management, following Ansible community standards.
- Changelog files:
CHANGELOG.mdandCHANGELOG.rst(auto-generated) - Fragment directory:
changelogs/fragments/ - Configuration:
changelogs/config.yaml - Release data:
changelogs/changelog.yaml
When making changes that should be noted in the changelog, create a fragment file:
# Create a new fragment file
cat > changelogs/fragments/your-change-description.yml << EOF
---
# Choose appropriate sections:
major_changes:
- Description of major change
minor_changes:
- Description of minor change
breaking_changes:
- Description of breaking change
deprecated_features:
- Description of deprecated feature
removed_features:
- Description of removed feature
security_fixes:
- Description of security fix
bugfixes:
- Description of bug fix
known_issues:
- Description of known issue
EOFUse descriptive names for fragment files:
add-new-module.ymlfix-authentication-bug.ymldeprecate-old-parameter.ymlbreaking-change-api.yml
---
# Release summary (only for major releases)
release_summary: |
Brief description of the release.
# Major changes (new features, significant improvements)
major_changes:
- Added support for new DME API endpoints
- Implemented advanced authentication methods
# Minor changes (small features, improvements)
minor_changes:
- Improved error messages for better debugging
- Added validation for configuration parameters
# Bug fixes
bugfixes:
- Fixed issue with connection timeout handling
- Resolved authentication token refresh problem
# Breaking changes
breaking_changes:
- Changed default timeout from 30s to 60s
- Removed deprecated 'old_parameter' option
# Security fixes
security_fixes:
- Fixed potential credential exposure in debug logs
# Deprecated features
deprecated_features:
- The 'legacy_mode' parameter is deprecated and will be removed in v2.0.0
# Known issues
known_issues:
- SSL verification may fail with older Python versions-
Ensure all fragments are ready:
ls changelogs/fragments/
-
Create the release:
# Install dependencies if needed pip install antsibull-changelog ansible-core # Create release (replace X.Y.Z with actual version) export PATH="$HOME/.local/bin:$PATH" python3 -m antsibull_changelog release --version X.Y.Z
-
Review generated files:
CHANGELOG.md- Markdown format for GitHubCHANGELOG.rst- ReStructuredText format for docschangelogs/changelog.yaml- Machine-readable changelog data
-
Update galaxy.yml version:
version: X.Y.Z
-
Commit and tag:
git add . git commit -m "Release v X.Y.Z" git tag v X.Y.Z git push origin main --tags
Test changelog generation without creating a release:
# Generate preview
python3 -m antsibull_changelog generate --reload-pluginsThe changelog behavior is configured in changelogs/config.yaml:
# Key configuration options:
title: Cisco.Dme # Collection name in changelog
use_fqcn: true # Use fully qualified collection names
keep_fragments: false # Remove fragments after release
changelog_nice_yaml: false # YAML formatting style
sanitize_changelog: true # Clean up formatting
# Output formats
output:
- file: CHANGELOG.rst
format: rst
- file: CHANGELOG.md
format: md
# Change categories
sections:
- [major_changes, Major Changes]
- [minor_changes, Minor Changes]
- [breaking_changes, Breaking Changes / Porting Guide]
- [deprecated_features, Deprecated Features]
- [removed_features, Removed Features (previously deprecated)]
- [security_fixes, Security Fixes]
- [bugfixes, Bugfixes]
- [known_issues, Known Issues]- Be descriptive: Clearly explain what changed and why
- User-focused: Write for end users, not developers
- Action-oriented: Use active voice ("Added", "Fixed", "Changed")
- Categorize correctly: Choose the most appropriate section
- One change per fragment: Keep fragments focused on single changes
Good:
bugfixes:
- Fixed authentication failure when using special characters in passwordsBad:
bugfixes:
- Fixed bug in authGood:
major_changes:
- Added support for DME v2.0 API with enhanced security featuresBad:
minor_changes:
- Updated APIFollow Semantic Versioning:
- Major (X.0.0): Breaking changes, major new features
- Minor (X.Y.0): New features, backwards compatible
- Patch (X.Y.Z): Bug fixes, backwards compatible
- Patch releases: As needed for critical bug fixes
- Minor releases: Monthly or when significant features are ready
- Major releases: Quarterly or when breaking changes are necessary
- Command not found: Ensure
antsibull-changelogandansible-coreare installed - Path issues: Add
$HOME/.local/binto your PATH - Permission errors: Use
pip install --userfor user installations - Invalid YAML: Validate fragment files with
yamllint
# Check fragment syntax
yamllint changelogs/fragments/*.yml
# Test changelog generation
python3 -m antsibull_changelog generate --reload-pluginsConsider adding changelog validation to your CI pipeline:
# Example GitHub Actions step
- name: Validate changelog fragments
run: |
pip install antsibull-changelog yamllint
yamllint changelogs/fragments/
python3 -m antsibull_changelog generate --reload-plugins