From 6b79acbd34339969d5e213a2575af23fb36d4cfc Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Wed, 9 Aug 2023 13:19:29 +0200 Subject: [PATCH] Initial Release Workflow testing --- .../actions/ansible_release_log/action.yml | 56 +++++++++++++++++++ .../actions/ansible_release_tag/action.yml | 35 ++++++++++++ .github/workflows/release-tag.yml | 33 +++++++++++ CHANGELOG.rst | 30 ++++++++++ changelogs/changelog.yaml | 53 +++++++++++++++++- changelogs/fragments/1538-s3-null.yml | 2 - .../1548-s3_object-leading-slash.yml | 4 -- .../1551-ec2_inventory-no-region.yml | 2 - changelogs/fragments/1587-LooseVersion.yml | 4 -- ...route53_health_check-added-calculcated.yml | 5 -- .../1647-add-type-started-and-stopped.yml | 4 -- changelogs/fragments/1683-route53-wait_id.yml | 2 - ..._parameter-update-examples-to-use-fqcn.yml | 2 - ...bject-support-copy-objects-recursively.yml | 2 - changelogs/fragments/20230702-isort.yml | 2 - changelogs/fragments/7.0.0-urls.yml | 2 - changelogs/fragments/add-pytest-ansible.yml | 3 - ...c2_instance_info-support-new-attribute.yml | 3 - .../ec2_vpc_route_table_info-filter-fix.yml | 2 - 19 files changed, 205 insertions(+), 41 deletions(-) create mode 100644 .github/actions/ansible_release_log/action.yml create mode 100644 .github/actions/ansible_release_tag/action.yml create mode 100644 .github/workflows/release-tag.yml delete mode 100644 changelogs/fragments/1538-s3-null.yml delete mode 100644 changelogs/fragments/1548-s3_object-leading-slash.yml delete mode 100644 changelogs/fragments/1551-ec2_inventory-no-region.yml delete mode 100644 changelogs/fragments/1587-LooseVersion.yml delete mode 100644 changelogs/fragments/1631-route53_health_check-added-calculcated.yml delete mode 100644 changelogs/fragments/1647-add-type-started-and-stopped.yml delete mode 100644 changelogs/fragments/1683-route53-wait_id.yml delete mode 100644 changelogs/fragments/1685-ssm_parameter-update-examples-to-use-fqcn.yml delete mode 100644 changelogs/fragments/20230612-s3_object-support-copy-objects-recursively.yml delete mode 100644 changelogs/fragments/20230702-isort.yml delete mode 100644 changelogs/fragments/7.0.0-urls.yml delete mode 100644 changelogs/fragments/add-pytest-ansible.yml delete mode 100644 changelogs/fragments/ec2_instance_info-support-new-attribute.yml delete mode 100644 changelogs/fragments/ec2_vpc_route_table_info-filter-fix.yml diff --git a/.github/actions/ansible_release_log/action.yml b/.github/actions/ansible_release_log/action.yml new file mode 100644 index 00000000000..40aeef9e213 --- /dev/null +++ b/.github/actions/ansible_release_log/action.yml @@ -0,0 +1,56 @@ +name: "Ansible GitHub Release Logs" +author: "Mark Chappell (tremble)" +branding: + icon: "git-branch" + color: "gray-dark" +description: "Generate Changelog entries for a GitHub release" + +inputs: + release: + description: "The release version to publish" + required: true + +runs: + using: composite + steps: + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.11 + + - name: Prepare release environment + run: | + pip install rst-to-myst[sphinx] + #pip install antsibull-changelog + pip install git+https://github.com/felixfontein/antsibull-changelog.git@restrict + shell: bash + + - name: Checkout current ref + uses: actions/checkout@master + with: + ref: ${{ github.ref }} + + - name: Generate release log (RST) + run: | + antsibull-changelog generate -vvv --output changelog-release.rst --only-latest "${INPUT_RELEASE}" + shell: bash + env: + INPUT_RELEASE: ${{ inputs.release }} + + - name: Upload RST release log + uses: actions/upload-artifact@v3 + with: + name: changelog-rst + path: changelog-release.rst + + - name: Convert release log (MD) + run: | + rst2myst convert changelog-release.rst + sed -i 's/^#/###/' changelog-release.md + shell: bash + + - name: Upload MD release log + uses: actions/upload-artifact@v3 + with: + name: changelog-md + path: changelog-release.md diff --git a/.github/actions/ansible_release_tag/action.yml b/.github/actions/ansible_release_tag/action.yml new file mode 100644 index 00000000000..790ffc7a9c7 --- /dev/null +++ b/.github/actions/ansible_release_tag/action.yml @@ -0,0 +1,35 @@ +name: "Ansible GitHub Release" +author: "Mark Chappell (tremble)" +branding: + icon: "git-branch" + color: "gray-dark" +description: "Publish GitHub releases from an action" + +inputs: + release: + description: "The release version to publish" + required: true + + collection-name: + description: "The name of the collection" + required: true + + +runs: + using: composite + steps: + + - name: Download MD release log + uses: actions/download-artifact@v3 + with: + name: changelog-md + + - name: Create Release + run: | + ls + cat changelog-release.md + gh release create "${RELEASE}" --verify-tag -t "${COLLECTION_NAME} ${RELEASE}" -F changelog-release.md + shell: bash + env: + COLLECTION_NAME: ${{ inputs.collection-name }} + RELEASE: ${{ inputs.release }} diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml new file mode 100644 index 00000000000..ec6cd2d10d7 --- /dev/null +++ b/.github/workflows/release-tag.yml @@ -0,0 +1,33 @@ +name: Generate GitHub Release +concurrency: + group: release-${{ github.head_ref }} + cancel-in-progress: true +on: + push: + tags: + - '*' + +jobs: + generate-release-log: + permissions: + contents: read + runs-on: ubuntu-latest + steps: + - name: Generate Release Log + uses: tremble/amazon.aws/.github/actions/ansible_release_log@main + #uses: ansible-collections/amazon.aws/.github/actions/ansible_release_log.yml@main + with: + release: ${{ github.ref_name }} + + perform-release: + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Generate Release + uses: tremble/amazon.aws/.github/actions/ansible_release_tag@main + #uses: ansible-collections/amazon.aws/.github/actions/ansible_release_tag.yml@main + with: + release: ${{ github.ref_name }} + collection-name: amazon.aws + needs: generate-release-log diff --git a/CHANGELOG.rst b/CHANGELOG.rst index caa81404713..8c297d376f3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,36 @@ amazon.aws Release Notes .. contents:: Topics +v7.0.0-dev0 +=========== + +Minor Changes +------------- + +- ec2_instance_info - add new parameter `include_attributes` to describe instance attributes (https://github.com/ansible-collections/amazon.aws/pull/1577). +- module_utils.botocore - migrate from vendored copy of LooseVersion to packaging.version.Version (https://github.com/ansible-collections/amazon.aws/pull/1587). +- rds_cluster - add support for another ``state`` choice called ``started``. This starts the rds cluster (https://github.com/ansible-collections/amazon.aws/pull/1647/files). +- rds_cluster - add support for another ``state`` choice called ``stopped``. This stops the rds cluster (https://github.com/ansible-collections/amazon.aws/pull/1647/files). +- route53 - add a ``wait_id`` return value when a change is done (https://github.com/ansible-collections/amazon.aws/pull/1683). +- route53_health_check - add support for a string list parameter called ``child_health_checks`` to specify health checks that must be healthy for the calculated health check (https://github.com/ansible-collections/amazon.aws/pull/1631). +- route53_health_check - add support for an integer parameter called ``health_threshold`` to specify the minimum number of healthy child health checks that must be healthy for the calculated health check (https://github.com/ansible-collections/amazon.aws/pull/1631). +- route53_health_check - add support for another ``type`` choice called ``CALCULATED`` (https://github.com/ansible-collections/amazon.aws/pull/1631). +- s3_object - Allow recursive copy of objects in S3 bucket (https://github.com/ansible-collections/amazon.aws/issues/1379). + +Breaking Changes / Porting Guide +-------------------------------- + +- module_utils - ``module_utils.urls`` was previously deprecated and has been removed (). +- module_utils._version - vendored copy of distutils.version has been dropped (https://github.com/ansible-collections/amazon.aws/pull/1587). + +Bugfixes +-------- + +- aws_ec2 inventory plugin - fix ``NoRegionError`` when no regions are provided and region isn't specified (https://github.com/ansible-collections/amazon.aws/issues/1551). +- ec2_vpc_route_table_info - default filters to empty dictionary (https://github.com/ansible-collections/amazon.aws/issues/1668). +- s3_bucket - fixes issue when deleting a bucket with unversioned objects (https://github.com/ansible-collections/amazon.aws/issues/1533). +- s3_object - fixes regression related to objects with a leading ``/`` (https://github.com/ansible-collections/amazon.aws/issues/1548). + v6.3.0 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 8e5afa239a3..a5d6167c72b 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1903,8 +1903,9 @@ releases: - ec2_vpc_route_table - add support for Carrier Gateway entry (https://github.com/ansible-collections/amazon.aws/pull/926). - ec2_vpc_subnet - retry fetching subnet details after creation if the first attempt fails (https://github.com/ansible-collections/amazon.aws/pull/1526). - - inventory aws ec2 - add parameter ``use_ssm_inventory`` allowing to query ssm - inventory information for configured EC2 instances and populate hostvars (https://github.com/ansible-collections/amazon.aws/issues/704). + - inventory aws ec2 - add parameter ``use_ssm_inventory`` allowing to query + ssm inventory information for configured EC2 instances and populate hostvars + (https://github.com/ansible-collections/amazon.aws/issues/704). - inventory plugins - refactor cache handling (https://github.com/ansible-collections/amazon.aws/pull/1285). - inventory plugins - refactor file verification handling (https://github.com/ansible-collections/amazon.aws/pull/1285). - inventory_aws_ec2 integration tests - replace local module ``test_get_ssm_inventory`` @@ -2266,3 +2267,51 @@ releases: - ec2_vpc_route_table_info-filter-fix.yml - release_summary.yml release_date: '2023-08-03' + 7.0.0-dev11: + changes: + breaking_changes: + - module_utils - ``module_utils.urls`` was previously deprecated and has been + removed (). + - module_utils._version - vendored copy of distutils.version has been dropped + (https://github.com/ansible-collections/amazon.aws/pull/1587). + bugfixes: + - aws_ec2 inventory plugin - fix ``NoRegionError`` when no regions are provided + and region isn't specified (https://github.com/ansible-collections/amazon.aws/issues/1551). + - ec2_vpc_route_table_info - default filters to empty dictionary (https://github.com/ansible-collections/amazon.aws/issues/1668). + - s3_bucket - fixes issue when deleting a bucket with unversioned objects (https://github.com/ansible-collections/amazon.aws/issues/1533). + - s3_object - fixes regression related to objects with a leading ``/`` (https://github.com/ansible-collections/amazon.aws/issues/1548). + minor_changes: + - ec2_instance_info - add new parameter `include_attributes` to describe instance + attributes (https://github.com/ansible-collections/amazon.aws/pull/1577). + - module_utils.botocore - migrate from vendored copy of LooseVersion to packaging.version.Version + (https://github.com/ansible-collections/amazon.aws/pull/1587). + - rds_cluster - add support for another ``state`` choice called ``started``. + This starts the rds cluster (https://github.com/ansible-collections/amazon.aws/pull/1647/files). + - rds_cluster - add support for another ``state`` choice called ``stopped``. + This stops the rds cluster (https://github.com/ansible-collections/amazon.aws/pull/1647/files). + - route53 - add a ``wait_id`` return value when a change is done (https://github.com/ansible-collections/amazon.aws/pull/1683). + - route53_health_check - add support for a string list parameter called ``child_health_checks`` + to specify health checks that must be healthy for the calculated health check + (https://github.com/ansible-collections/amazon.aws/pull/1631). + - route53_health_check - add support for an integer parameter called ``health_threshold`` + to specify the minimum number of healthy child health checks that must be + healthy for the calculated health check (https://github.com/ansible-collections/amazon.aws/pull/1631). + - route53_health_check - add support for another ``type`` choice called ``CALCULATED`` + (https://github.com/ansible-collections/amazon.aws/pull/1631). + - s3_object - Allow recursive copy of objects in S3 bucket (https://github.com/ansible-collections/amazon.aws/issues/1379). + fragments: + - 1538-s3-null.yml + - 1548-s3_object-leading-slash.yml + - 1551-ec2_inventory-no-region.yml + - 1587-LooseVersion.yml + - 1631-route53_health_check-added-calculcated.yml + - 1647-add-type-started-and-stopped.yml + - 1683-route53-wait_id.yml + - 1685-ssm_parameter-update-examples-to-use-fqcn.yml + - 20230612-s3_object-support-copy-objects-recursively.yml + - 20230702-isort.yml + - 7.0.0-urls.yml + - add-pytest-ansible.yml + - ec2_instance_info-support-new-attribute.yml + - ec2_vpc_route_table_info-filter-fix.yml + release_date: '2023-08-09' diff --git a/changelogs/fragments/1538-s3-null.yml b/changelogs/fragments/1538-s3-null.yml deleted file mode 100644 index 7c2ccfa6bd8..00000000000 --- a/changelogs/fragments/1538-s3-null.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- s3_bucket - fixes issue when deleting a bucket with unversioned objects (https://github.com/ansible-collections/amazon.aws/issues/1533). diff --git a/changelogs/fragments/1548-s3_object-leading-slash.yml b/changelogs/fragments/1548-s3_object-leading-slash.yml deleted file mode 100644 index 17219af7057..00000000000 --- a/changelogs/fragments/1548-s3_object-leading-slash.yml +++ /dev/null @@ -1,4 +0,0 @@ -bugfixes: -- s3_object - fixes regression related to objects with a leading ``/`` (https://github.com/ansible-collections/amazon.aws/issues/1548). -# deprecated_features: -# - s3_object - support for passing object keys with a leading ``/`` has been deprecated and will be removed in a release after 2025-12-01 (https://github.com/ansible-collections/amazon.aws/pull/1549). diff --git a/changelogs/fragments/1551-ec2_inventory-no-region.yml b/changelogs/fragments/1551-ec2_inventory-no-region.yml deleted file mode 100644 index 5b6816e625f..00000000000 --- a/changelogs/fragments/1551-ec2_inventory-no-region.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- aws_ec2 inventory plugin - fix ``NoRegionError`` when no regions are provided and region isn't specified (https://github.com/ansible-collections/amazon.aws/issues/1551). diff --git a/changelogs/fragments/1587-LooseVersion.yml b/changelogs/fragments/1587-LooseVersion.yml deleted file mode 100644 index 4e334cc0bb2..00000000000 --- a/changelogs/fragments/1587-LooseVersion.yml +++ /dev/null @@ -1,4 +0,0 @@ -breaking_changes: -- module_utils._version - vendored copy of distutils.version has been dropped (https://github.com/ansible-collections/amazon.aws/pull/1587). -minor_changes: -- module_utils.botocore - migrate from vendored copy of LooseVersion to packaging.version.Version (https://github.com/ansible-collections/amazon.aws/pull/1587). diff --git a/changelogs/fragments/1631-route53_health_check-added-calculcated.yml b/changelogs/fragments/1631-route53_health_check-added-calculcated.yml deleted file mode 100644 index ca1cc62dcb8..00000000000 --- a/changelogs/fragments/1631-route53_health_check-added-calculcated.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -minor_changes: - - route53_health_check - add support for another ``type`` choice called ``CALCULATED`` (https://github.com/ansible-collections/amazon.aws/pull/1631). - - route53_health_check - add support for a string list parameter called ``child_health_checks`` to specify health checks that must be healthy for the calculated health check (https://github.com/ansible-collections/amazon.aws/pull/1631). - - route53_health_check - add support for an integer parameter called ``health_threshold`` to specify the minimum number of healthy child health checks that must be healthy for the calculated health check (https://github.com/ansible-collections/amazon.aws/pull/1631). \ No newline at end of file diff --git a/changelogs/fragments/1647-add-type-started-and-stopped.yml b/changelogs/fragments/1647-add-type-started-and-stopped.yml deleted file mode 100644 index 5a13a5848c1..00000000000 --- a/changelogs/fragments/1647-add-type-started-and-stopped.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -minor_changes: - - rds_cluster - add support for another ``state`` choice called ``started``. This starts the rds cluster (https://github.com/ansible-collections/amazon.aws/pull/1647/files). - - rds_cluster - add support for another ``state`` choice called ``stopped``. This stops the rds cluster (https://github.com/ansible-collections/amazon.aws/pull/1647/files). \ No newline at end of file diff --git a/changelogs/fragments/1683-route53-wait_id.yml b/changelogs/fragments/1683-route53-wait_id.yml deleted file mode 100644 index f6260985dd8..00000000000 --- a/changelogs/fragments/1683-route53-wait_id.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: - - "route53 - add a ``wait_id`` return value when a change is done (https://github.com/ansible-collections/amazon.aws/pull/1683)." diff --git a/changelogs/fragments/1685-ssm_parameter-update-examples-to-use-fqcn.yml b/changelogs/fragments/1685-ssm_parameter-update-examples-to-use-fqcn.yml deleted file mode 100644 index 2cec412afa3..00000000000 --- a/changelogs/fragments/1685-ssm_parameter-update-examples-to-use-fqcn.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: - - ssm_parameter - Update documentation examples to use FQCN (https://github.com/ansible-collections/amazon.aws/pull/1685). diff --git a/changelogs/fragments/20230612-s3_object-support-copy-objects-recursively.yml b/changelogs/fragments/20230612-s3_object-support-copy-objects-recursively.yml deleted file mode 100644 index 9157ec0d0b0..00000000000 --- a/changelogs/fragments/20230612-s3_object-support-copy-objects-recursively.yml +++ /dev/null @@ -1,2 +0,0 @@ -minor_changes: -- s3_object - Allow recursive copy of objects in S3 bucket (https://github.com/ansible-collections/amazon.aws/issues/1379). diff --git a/changelogs/fragments/20230702-isort.yml b/changelogs/fragments/20230702-isort.yml deleted file mode 100644 index 5ceaa201c0e..00000000000 --- a/changelogs/fragments/20230702-isort.yml +++ /dev/null @@ -1,2 +0,0 @@ -trivial: -- added isort configs to pyproject.toml diff --git a/changelogs/fragments/7.0.0-urls.yml b/changelogs/fragments/7.0.0-urls.yml deleted file mode 100644 index 6181c64b35e..00000000000 --- a/changelogs/fragments/7.0.0-urls.yml +++ /dev/null @@ -1,2 +0,0 @@ -breaking_changes: -- module_utils - ``module_utils.urls`` was previously deprecated and has been removed (). diff --git a/changelogs/fragments/add-pytest-ansible.yml b/changelogs/fragments/add-pytest-ansible.yml deleted file mode 100644 index 882bdb357fe..00000000000 --- a/changelogs/fragments/add-pytest-ansible.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -trivial: -- Replace pytest-ansible-units with pytest-ansible for testing unit tests (https://github.com/ansible-collections/amazon.aws/pull/1553). diff --git a/changelogs/fragments/ec2_instance_info-support-new-attribute.yml b/changelogs/fragments/ec2_instance_info-support-new-attribute.yml deleted file mode 100644 index 5025aed21e7..00000000000 --- a/changelogs/fragments/ec2_instance_info-support-new-attribute.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -minor_changes: - - ec2_instance_info - add new parameter `include_attributes` to describe instance attributes (https://github.com/ansible-collections/amazon.aws/pull/1577). diff --git a/changelogs/fragments/ec2_vpc_route_table_info-filter-fix.yml b/changelogs/fragments/ec2_vpc_route_table_info-filter-fix.yml deleted file mode 100644 index 9b3d315dcca..00000000000 --- a/changelogs/fragments/ec2_vpc_route_table_info-filter-fix.yml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: - - ec2_vpc_route_table_info - default filters to empty dictionary (https://github.com/ansible-collections/amazon.aws/issues/1668).