diff --git a/README.md b/README.md index 451cc52..eed6600 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,18 @@ Ansible Collection: hetzner.hcloud ================================================= Ansible Hetzner Cloud Collection for controlling your Hetzner Cloud Resources. + +## Release notes + +See [here](https://github.com/ansible-collections/hetzner.hcloud/tree/master/CHANGELOG.rst). + + +## Publishing New Version + + +TBD Basic instructions without release branches: + +1. Create `changelogs/fragments/.yml` with `release_summary:` section (which must be a string, not a list). +2. Run `antsibull-changelog release --collection-flatmap yes` +3. Make sure `CHANGELOG.rst` and `changelogs/changelog.yaml` are added to git, and the deleted fragments have been removed. +4. Tag the commit with ``. Push changes and tag to the main repository. diff --git a/changelogs/.gitignore b/changelogs/.gitignore new file mode 100644 index 0000000..6be6b53 --- /dev/null +++ b/changelogs/.gitignore @@ -0,0 +1 @@ +/.plugin-cache.yaml diff --git a/changelogs/config.yaml b/changelogs/config.yaml new file mode 100644 index 0000000..a2cb11b --- /dev/null +++ b/changelogs/config.yaml @@ -0,0 +1,28 @@ +changelog_filename_template: ../CHANGELOG.rst +changelog_filename_version_depth: 0 +changes_file: changelog.yaml +changes_format: combined +keep_fragments: false +mention_ancestor: true +new_plugins_after_name: removed_features +notesdir: fragments +prelude_section_name: release_summary +prelude_section_title: Release Summary +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 +title: Hetzner Cloud diff --git a/galaxy.yml b/galaxy.yml index 36dcf81..6850795 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -3,10 +3,13 @@ name: hcloud version: 0.1.0 readme: README.md authors: - - Lukas Kaemmerling (github.com/LKaemmerling) + - Hetzner Cloud (github.com/hetznercloud) description: A Collection for managing Hetzner Cloud resources license: GPL-3.0-or-later -tags: null +tags: + - hetzner + - cloud + - hcloud dependencies: ansible.netcommon: '>=0.0.1' repository: https://github.com:ansible-collections/hetzner.hcloud diff --git a/meta/runtime.yml b/meta/runtime.yml index 85a3e13..be8fccb 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,3 +1,4 @@ +requires_ansible: '>=2.9.10' plugin_routing: modules: hcloud_location_facts: diff --git a/shippable.yml b/shippable.yml index 6b2acc9..8da0b50 100644 --- a/shippable.yml +++ b/shippable.yml @@ -12,6 +12,7 @@ matrix: - env: T=devel/sanity/2 - env: T=devel/sanity/3 - env: T=devel/sanity/4 + - env: T=devel/sanity/extra - env: T=devel/hcloud/3.8/1 - env: T=devel/hcloud/3.8/2 @@ -21,6 +22,7 @@ matrix: - env: T=2.10/sanity/2 - env: T=2.10/sanity/3 - env: T=2.10/sanity/4 + - env: T=2.10/sanity/extra - env: T=2.10/hcloud/3.8/1 - env: T=2.10/hcloud/3.8/2 diff --git a/tests/sanity/extra/changelog.json b/tests/sanity/extra/changelog.json new file mode 100644 index 0000000..63cfa5e --- /dev/null +++ b/tests/sanity/extra/changelog.json @@ -0,0 +1,13 @@ +{ + "python": "3.8", + "output": "path-line-column-message", + "prefixes": [ + "changelogs/fragments/" + ], + "exclude_prefixes": [ + "changelogs/fragments/." + ], + "requirements": [ + "git+git://github.com/ansible-community/ansibulled.git@pip-installable#egg=ansibulled" + ] +} diff --git a/tests/sanity/extra/changelog.py b/tests/sanity/extra/changelog.py new file mode 100644 index 0000000..243ce95 --- /dev/null +++ b/tests/sanity/extra/changelog.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# Copyright (c) Ansible Project +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +from __future__ import (absolute_import, division, print_function) +__metaclass__ = type + + +import os +import sys +import subprocess + + +def main(): + paths = sys.argv[1:] or sys.stdin.read().splitlines() + + allowed_extensions = ('.yml', '.yaml') + + for path in paths: + ext = os.path.splitext(path)[1] + + if ext not in allowed_extensions: + print('%s:%d:%d: extension must be one of: %s' % (path, 0, 0, ', '.join(allowed_extensions))) + + cmd = ['ansibulled-changelog', 'lint'] + paths + subprocess.check_call(cmd) + + +if __name__ == '__main__': + main() diff --git a/tests/utils/gitlab/gitlab.sh b/tests/utils/gitlab/gitlab.sh index d5941dc..8830477 100755 --- a/tests/utils/gitlab/gitlab.sh +++ b/tests/utils/gitlab/gitlab.sh @@ -53,7 +53,8 @@ cd "${TEST_DIR}" # STAR: HACK install dependencies retry ansible-galaxy -vvv collection install community.general retry ansible-galaxy -vvv collection install ansible.netcommon - +# retry ansible-galaxy -vvv collection install community.internal_test_tools - we need git checkout until 0.2.0 has been released +retry git clone https://github.com/ansible-collections/community.internal_test_tools.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/internal_test_tools" retry pip install netaddr --disable-pip-version-check retry pip install hcloud # END: HACK diff --git a/tests/utils/gitlab/sanity.sh b/tests/utils/gitlab/sanity.sh index 5b0a68d..1418edc 100755 --- a/tests/utils/gitlab/sanity.sh +++ b/tests/utils/gitlab/sanity.sh @@ -13,6 +13,11 @@ else base_branch="" fi +if [ "${group}" == "extra" ]; then + ../internal_test_tools/tools/run.py --color + exit +fi + case "${group}" in 1) options=(--skip-test pylint --skip-test ansible-doc --skip-test validate-modules) ;; 2) options=( --test ansible-doc --test validate-modules) ;; diff --git a/tests/utils/shippable/sanity.sh b/tests/utils/shippable/sanity.sh index a52030c..6d43e68 100755 --- a/tests/utils/shippable/sanity.sh +++ b/tests/utils/shippable/sanity.sh @@ -13,6 +13,11 @@ else base_branch="" fi +if [ "${group}" == "extra" ]; then + ../internal_test_tools/tools/run.py --color + exit +fi + case "${group}" in 1) options=(--skip-test pylint --skip-test ansible-doc --skip-test validate-modules) ;; 2) options=( --test ansible-doc --test validate-modules) ;; diff --git a/tests/utils/shippable/shippable.sh b/tests/utils/shippable/shippable.sh index bd1f7ca..dd65e8c 100755 --- a/tests/utils/shippable/shippable.sh +++ b/tests/utils/shippable/shippable.sh @@ -67,6 +67,8 @@ cd "${TEST_DIR}" # STAR: HACK install dependencies retry ansible-galaxy -vvv collection install community.general retry ansible-galaxy -vvv collection install ansible.netcommon +# retry ansible-galaxy -vvv collection install community.internal_test_tools - we need git checkout until 0.2.0 has been released +retry git clone https://github.com/ansible-collections/community.internal_test_tools.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/internal_test_tools" retry pip install hcloud # END: HACK