347 Commits
Author SHA1 Message Date
Matt ClayandGitHub fd47c68c2d [stable-2.18] release.py - Remove email announcement support (#85060) (#85139)
Also add missing git and run overloads.

(cherry picked from commit 93aa611435)
2025-05-12 10:39:40 -07:00
Matt ClayandGitHub 326fbcdcb3 [stable-2.18] Use separate venvs for each release command (#84641) (#84643)
This avoids requirements conflicts between different commands invoked by the release tool.

(cherry picked from commit 4cc47307ef)
2025-01-30 16:42:26 +00:00
Matt ClayandGitHub cd342f76b4 release.py - Use changelog requirements (#83920)
Use the changelog sanity test requirements instead of the package-data sanity test requirements.

This enables removal of most package-data sanity test requirements, as they are no longer used by the test itself.
The additional requirements were being maintained only to provide pinned requirements for building the changelog during a release.
2024-09-09 10:49:04 -07:00
Matt ClayandGitHub e3ccdaaa2e release.py - Include pyproject.toml in git add (#83892) 2024-09-03 21:27:50 -07:00
Matt ClayandGitHub b544ac13ec release.py - Add missing setuptools arg to prepare (#83887)
* release.py - Add missing setuptools arg to prepare

This allows the prepare command to accept the `--no-setuptools` argument.

It also fixes a traceback when using the `prepare` command.

* Use a more accurate type hint
2024-09-03 15:05:26 -05:00
Matt ClayandGitHub 4e69d83fac release.py - Auto-update setuptools upper bound (#83713)
When releases are prepared, the upper bound on setuptools in pyproject.toml will be automatically updated
to the latest version available on PyPI. This version will then be tested by the package-data sanity test
during the release process and will be used to build the release.

This change ensures that a released version of ansible-core can be built in the future if a new setuptools
release includes breaking changes that would prevent building a functional package. If a downstream package
maintainer requires a newer setuptools version than the upper bound permits, they can patch pyproject.toml
as needed. Since ansible-core releases support specific Python versions, lack of support for new setuptools
releases will have no effect on support for future Python versions.
2024-08-05 16:59:26 -05:00
Matt ClayandGitHub 20a815b03f Quality-of-life improvements for release tool (#83551)
* Quality-of-life improvements for release tool

- Default devel releases to b1
- Default non-devel releases to rc1
- Default to release announcement to console
- Avoid auto-links in GH release annoucements for file sizes
2024-07-09 10:17:28 -07:00
Martin KrizekandGitHub b2a289dcbb Remove Python 3.10 support for the controller (#83221)
Fixes #83094
2024-06-17 09:03:41 +02:00
Matt Clay 8bc0d809a6 Update sdist path in release tool
The latest setuptools package uses a normalized package name for the sdist.
2024-04-16 10:13:40 -07:00
1cc5efa77b tarfile: Handle deprecation warning for extract and extractall (#81545)
* Python 3.11.4 introduces a new parameter 'filter' in extract and
extractall in tarfile. Handle deprecation warning message emitted
in Python 3.12.
* added probing mechanism in ansible-galaxy code to detect broken
data filter implementation in tarfile.

Fixes: #80832

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Co-authored-by: Matt Clay <matt@mystile.com>
2023-08-31 12:02:48 -07:00
Matt ClayandGitHub 9afaf2216b Remove obsolete text from release.py PR template (#81526) 2023-08-16 10:52:20 -07:00
Matt ClayandGitHub 47ab59753c Clean up release script (#81488)
* Enable mypy for the entire packaging directory

* Return CompletedProcess only when capturing output

This allows stdout/stderr on CompletedProcess to be `str` instead of `str | None`.
The unused args on CompletedProcess have been removed.
Overload type hints have been added to reflect these changes.

* Relax return type on ensure_venv

This improves consistency with its usage, since `run` accepts `env` of `dict[str, t.Any]`.
Also removed unnecssary `str()` usage when updating `env`.

* Fix type hint on suppress_when

* Fix callable annotation

* Add type hint for command_parser

PyCharm complains about using a protected member, and also that it can't find the type in the type stubs.
However, mypy properly recognizes the type.

* Avoid unnecessary TypeVar usage
2023-08-10 13:39:37 -07:00
Matt ClayandGitHub 85d3305889 Fix f-string whitespace in release script (#81477) 2023-08-09 09:35:38 -07:00
Matt ClayandGitHub 691c8e8603 Omit pre-built man pages from sdist (#81395)
Since man pages aren't accessible to users after a `pip install`, there's no need to include them in the sdist.
This change makes it trivial to build man pages from source, which makes them much easier to iterate on.
It also simplifies creation and testing of the sdist, since it no longer requires building man pages.

The new `packaging/cli-doc/build.py` script can generate both man pages and RST documentation.
This supports inclusion on the docs site without a dependency on `ansible-core` internals.
Having a single implementation for both simplifies keeping the two formats in sync.
2023-08-01 12:48:01 -07:00
Matt ClayandGitHub 081c60b9d3 Include subcommands in generated man pages (#81378)
Sub commands of `ansible-galaxy role` and `ansible-galaxy collection` are now documented.
2023-07-31 13:04:17 -07:00
Matt ClayandGitHub f9d674fcfd Fix command doc lookup in man page generation (#81365) 2023-07-28 16:24:04 -07:00
Matt ClayandGitHub fead654671 Exclude internal options from man pages and docs (#81360) 2023-07-28 14:58:18 -07:00
Matt ClayandGitHub cf4d4577ac Remove hacking dir dependency from build backend (#81021)
* Copy man generation files into build backend

* Use copied files in build backend
2023-06-09 16:56:48 -07:00
Matt ClayandGitHub b3f1290bcd Remove docs dir dependency from man page build (#81003) 2023-06-08 12:41:45 -07:00
Matt ClayandGitHub 54576cd794 pep517 backend - Copy symlinks when copying source (#80690) 2023-05-02 14:35:59 -07:00
Matt ClayandGitHub d37678c5ff Release tool improvements (#80641)
* Provide reproducible sdist builds.
* Use reproducible wheel builds.
* Add PyPI artifact checks.
2023-05-01 09:30:19 -07:00
Matt ClayandGitHub e87802cf2c pep517 backend - Use correct import_module import (#80480) 2023-04-12 10:00:09 -07:00
Matt ClayandGitHub 6a66761e0e Remove obsolete release bits (#80347)
Releases are now built using the `packaging/release.py` tool.
This makes the `Makefile` and associated files in `packaging/release/` and `packaging/sdist/` obsolete.
2023-03-29 10:14:39 -07:00
Matt ClayandGitHub a6bfa82bd0 New upstream release tool (#80179) 2023-03-27 12:40:35 -07:00
7097df3eed 📦 Switch sdist build-system to pure setuptools (#80255)
This patch modifies the in-tree build backend to build sdists that swap
out pointers to it in the `pyproject.toml`'s `[build-system]` section.

The effect of this is that the first build from source (for example,
from a Git checkout) uses our PEP 517 in-tree build backend. But the
produced tarball has `build-backend` set to `setuptools.build_meta`
which is the native build backend of `setuptools`. So any following
builds from that sdist will skip using the in-tree build backend,
calling the setuptools' one.
The good news is that if the first build generated the manpages, they
will be included and won't go anywhere even though, a different build
system is in place.

Combined with #80253, this will make sure not to modify the current
source checkout on that first build.

Co-authored-by: Matt Clay <matt@mystile.com>
2023-03-20 12:01:16 -07:00
Sviatoslav SydorenkoandGitHub 888abf5d6e Make isolated source changes @ PEP 517 backend (#80253) 2023-03-20 11:26:53 -07:00
67bafafbc0 🎨 Convert RST to manpage in-memory @ PEP 517 (#80098)
* Add _convert_rst_in_template_to_manpage arg types

* 📦 Make manpage build dependencies conditional

Previously, said dependencies were declared as unconditionally
required even when manpages not needed to be built. This patch
Makes it so they are only required when needed.

* Correct _generate_rst_in_templates returned type

It was marked as Path before this patch but in fact, it's iterable of
paths.

* 🎨 Convert RST to manpage in-memory @ PEP 517

Previously, the automation was writing a temporary templated RST on
disk and calling a helper CLI script on that. But with this change, it
happens with less unnecessary I/O.

Co-Authored-By: Matt Davis <6775756+nitzmahone@users.noreply.github.com>

* 📦Expose sdist manpage build deps unconditionally

Due to a bug in pypa/build, the `get_requires_for_build_sdist()` hook
is always invoked with `config_settings=None`. This means that we
cannot conditionally extend build requirements in said hook.

As a workaround, this patch makes hook pretend that `--built-manpages`
is always passed.

Ref: https://github.com/pypa/build/issues/559.

---------

Co-authored-by: Matt Davis <6775756+nitzmahone@users.noreply.github.com>
2023-02-28 16:13:41 +01:00
Matt ClayandGitHub f587856beb Remove straight.plugin dependency (#80084) 2023-02-23 15:37:12 -08:00
56036013cd 📦 Integrate manpage builds into PEP 517 build backend
This patch creates a thin wrapper around the `setuptools`' PEP 517
build backend in-tree. It features an ability to request generating
the manpage files in the process of building a source distribution.
This toggle is implemented using the `config_settings` mechanism of
PEP 517.
One must explicitly pass it a CLI option to the build front-end to
trigger said behavior. The packagers are expected to use the
following call:

    python -m build --config-setting=--build-manpages

This option has no effect on building wheels.

🧪 The change includes integration tests

This test runs building and re-building sdists and wheels with and
without the `--build-manpages` config setting under the
oldest-supported and new `setuptools` pinned.

It is intended to preserve the interoperability of the packaging setup
across Python runtimes.

An extra smoke test also verifies that non PEP 517 interfaces remain functional.

PR #79606


Co-authored-by: Matt Clay <matt@mystile.com>
2023-02-23 21:37:02 +01:00
Matt Clay fae0cf4c51 Remove unofficial packaging.
Unofficial packaging should be maintained externally since
it is not tested in CI or used in the official release process.

Maintainers of unofficial packages are better equipped with the necessary
expertise and testing resources to support alternative packaging.
2021-10-14 09:52:26 -07:00
Sam DoranandGitHub c0cb353ce1 Remove PyCrypto (#74699)
* Remove PyCrypto from setup.py and packaging script
* Remove mention of pycrpto from installation docs
* Remove PyCrypto from vault
* Remove pycryto constraint and unit test requirement
* Remove PyCrypto tests from unit tests
* Add docs and fix warning message
* Remove section about cryptography library in Ansible Vault docs
2021-05-18 16:12:32 -04:00
Deric CragoandGitHub 653a96dcea renamed: ansible-base.{dirs,install} -> ansible-core.{dirs,install} (#74159) 2021-04-06 11:51:52 -05:00
Rick ElrodandGitHub 6894ae7d1d Rename to ansible-core (#72594)
Change:
- Initial set of changes for renaming to ansible-core
- Includes changelog fragment changes from base -> core
- Does NOT include docs changes
- Modifies detection stuff in setup.py to support ansible<2.9 and ansible-base

Test Plan:
- ci_complete
2020-11-13 15:42:10 -06:00
Felix FonteinandGitHub a114da80ee Use antsibull-changelog instead of packaged changelog generator (#69313)
Replace the ansible-base changelog linting and generation tool with antsibull-changelog and make it available for linting collections. Previously changelog linting was limited to ansible-base.
2020-06-11 11:21:21 -07:00
Rick ElrodandGitHub 341a6be78d fix debian control file copypaste fail (#69715)
Signed-off-by: Rick Elrod <rick@elrod.me>
2020-05-26 18:42:40 -05:00
Rick ElrodandGitHub 1ed5b587c8 More fixes for debian ansible-base builds (#69714)
Change:
Fix files that got missed in 04ec72160

Test Plan:
Local Ubuntu 20.04 VM

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-05-26 18:13:33 -05:00
Rick ElrodandGitHub 04ec72160a Fixes for building ansible-base .debs, using py3 (#69534)
Change:
- Changes for ansible -> ansible base
- Bump to py3 for 2.10 PPA release

Test Plan:
- Local VM; Jenkins after merge.

Tickets:
- Refs #57342

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-05-15 20:30:08 -05:00
Rick ElrodandGitHub 3dedf95dbd Remove RPM packaging infrastructure (#69554)
Change:
- Nuke `make rpm` and friends from Makefile
- Nuke packaging/rpm

We are no longer going to be pushing RPMs to releases.ansible.com
post-2.10, so this is no longer necessary for us, and users should
prefer RPMs from their distro instead.

Test Plan:
Grepped the Makefile for all of: /rpm/i, /mock/i, /fedora/i

Tickets:
Refs #69539

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-05-15 20:29:05 -05:00
ed9de94ad9 remove azure extras and extras_require support (#67822)
* remove azure extras and extras_require support

* Since Azure will be collectionized, the requirements will float more frequently than Ansible releases; the Azure collection needs to host the requirements now.
* Removed the dynamic extras support as well, since Azure was the only thing using it. If we need it again, it's easy to pull back from history.

* Mark azure-requirements as orhpaned.

This keeps the docs around so that existing links from old test runs remain valid.

Co-authored-by: Matt Clay <matt@mystile.com>
2020-03-23 13:07:33 -07:00
haiyuan_zhangandZim Kalinowski bc37ea96d5 Vmss scale in policy (#66512)
* azure_rm_virtualmachinescaleset: add scale_in_policy and terminate_event_notification

* azure_rm_virtualmachinescalesetinstance: add vmss instance protection policy support
2020-01-16 09:24:39 +08:00
MartinandSandra McCann eab385e006 Update and cleanup Arch packaging (#64747) 2020-01-15 16:01:33 -05:00
Gonéri Le BouderandBrian Coca 519e4f4223 debian: install lib in dist-packages (#64412)
On Ubuntu Precise and Trusty, the build was failing because the Ansible
libs were installed in /usr/lib/python2.7/site-packages.

According to the Debian Policy (2.5), they should actually be install in
/usr/lib/python2.7/dist-packages This is also CDBS default behaviour since
0.4.131.

See: https://www.debian.org/doc/packaging-manuals/python-policy/ch-python.html

Closes: #64160
2019-11-05 10:45:05 -05:00
Toshio KuratomiandSam Doran 87de146038 Exclude the ansible-test script from the main rpm package (#64277)
We want the script to live in the ansible-test rpm subpackage alongside
of its libraries

Fixes #64275
2019-11-01 12:14:36 -04:00
Toshio Kuratomi 2b6ee572ee CentOS8/RHEL8 base don't have all the deps we were specifying
We used a few packages for tests which don't exist in RHEL8 base.  Don't
dep on those so those tests will simply skip
2019-10-04 20:52:22 -07:00
Toshio Kuratomi 593d639160 Fixes to the rpm dependencies
* Remove duplicate bundled provides line in the rpm spec file
* Remove jmespath and passlib on RHEL7 as these are optional dependencies
  which aren't shipped with RHEL7
2019-09-30 20:51:16 -07:00
Toshio Kuratomi bebb11b918 Disable setting of -s in shebang
RPM builds on Fedora and RHEL create a python shebang line with -s

This is not good for ansible since ansible has a lot of optional
features which need extra dependencies installed.  If the user installs
those extra dependencies to their home directory or to /usr/local then
the -s will keep them from being used.
2019-09-18 20:27:56 -07:00
Toshio Kuratomi 59afffa334 Fix rpm dependencies for ansible-test
Needs to require ansible = version rather than ansible-version
2019-09-05 15:03:50 -07:00
Gonéri Le BouderandToshio Kuratomi 3f9316bca2 debian: prepare the ansible-test package
- Generate an extra package for `ansible-test`.
- Manually install the files because CDBS get confused by our two
  Python packages
- Refresh the package descriptions to match what is done with the RPM
2019-09-03 22:00:24 -07:00
Toshio Kuratomi 9be8a98aa2 Update the rpm spec file to include ansible-test
* Include ansible-test in a subpackage
* Sync with the ansible engine spec file
* Addresses https://github.com/ansible/ansible/issues/60380 to the
  extent that we're likely to fix that.
2019-09-03 13:41:41 -07:00
Toshio Kuratomi 68fa03138c Revert "New Module: NetApp Account (#59939)"
This reverts commit 6a8dcb8fcb.

Reverting this as it breaks CI for azure (more permissions would be
needed for our account)
2019-08-29 09:04:48 -07:00