summaryrefslogtreecommitdiff
path: root/hacking/build_library
Commit message (Collapse)AuthorAgeFilesLines
* stable docs build: do not use YAML parsing/serialization for .deps files ↵Felix Fontein2022-10-261-6/+22
| | | | | | | (#79233) * Do not use YAML parsing/serialization for .deps files. * Prevent crash.
* `FieldAttribute`s as descriptors (#73908)Martin Krizek2022-06-291-2/+2
|
* Stop making core docs build talk of (ansible-)'base' when meaning ↵Felix Fontein2022-05-111-16/+16
| | | | (ansible-)'core'. (#77728)
* shift to ansible_core_versionsamccann2022-05-031-2/+2
|
* Fix use of deprecated antsibull-docs option.Matt Clay2022-04-251-2/+2
|
* Replace antsibull with antsibull-docs (#77504)Felix Fontein2022-04-222-3/+3
|
* Update core porting guide generation.Matt Clay2022-03-281-6/+6
|
* Porting guide fixes. (#77376)Matt Clay2022-03-281-2/+2
| | | | * Update porting guide generation. * Fix 2.13 porting guide link.
* Allow docs-build to use a local ansible-build-data checkout.Toshio Kuratomi2021-07-081-0/+6
| | | | | | | This is useful for testing the effects on docs of changing what collections are in a version of ansible. ansible-build-data can be cloned locally, modified, and then build-ansible.py docs-build can be told to use the local checkout instead of the canonical one on github.
* Use antsibull-docs devel for devel docs (#74988)Felix Fontein2021-06-231-17/+17
| | | | | | | | | * Require antsibull 0.34.0. * Remove Makefile comment about the devel docs building only the core (formerly base) docs; the behavior was updated in ccbfdec334a7b0443f2daecf9f96ac5c5a33fd45 Currently 'make coredocs' builds core-only docs; 'make webdocs' builds the full docs even on the devel branch Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
* Only consider directories which do have .deps files other than ↵Felix Fontein2021-06-151-0/+7
| | | | ancestor.deps. (#74987)
* Vendor `distutils.version` (#74644)Matt Martz2021-05-112-2/+2
| | | | | | | | | | | | | | | * Vendor distutils.version * Fix import order. ci_complete * remove distutils warning filter * Don't remove warnings filter from importer * ci_complete * Add pylint config for preventing distutils.version * Add changelog fragment
* Split Ansible docs from core docs (#73616)Sandra McCann2021-02-171-27/+85
| | | | | | | | | | | | | | | | | | | * excludes scenario guides from core docs, splits porting guides and roadmaps, symlinks indices to create index.html pages, and adds .gitignore entries for conf.py and the toplevel index.rst files generated by the docs build This solution builds three types of docs: * ansible-2.10 and earlier: all the docs. Handle this via `make webdocs ANSIBLE_VERSION=2.10` * ansible-3 and later: a subset of the docs for the ansible package. Handle this via `make webdocs ANSIBLE_VERSION=3` (change the ANSIBLE_VERSION to match the version being built for. * ansible-core: a subset of the docs for the ansible-core package. Handle this via `make coredocs`. * `make webdocs` now always builds all the collection docs * Use `make coredocs` to limit it to core plugins only * The user specifies the desired version. If no ANSIBLE_VERSION is specified, build plugins for the latest release of ansible Co-authored-by: Toshio Kuratomi <a.badger@gmail.com> Co-authored-by: Matt Clay <matt@mystile.com>
* Allow restricting config values to enumerated list (#73162)Brian Coca2021-01-141-1/+7
| | | | | | | * Allow restricting config values to enumerated list * dont document internal entries * also ignore private defs for ansible-config * remove invalid value from tests * added porting entry
* Updates to docs build for new antsibull CLIToshio Kuratomi2020-08-141-4/+4
| | | | | * --ansible-base-cache renamed to --ansible-base-source * _acd_version in the .deps file has been renamed to _ansible_version
* Fix version comparison for determining what ansible to build againstToshio Kuratomi2020-08-071-1/+5
| | | | | | | | * The version comparison for determining what ansible package to build docs against was comparing the version number for ansible-base but it needed to check the version number for ansible instead * add a comment about some bad logic than needs to be fixed after 2.10.0
* hacking: fix announce script version parsing (#71008)Rick Elrod2020-07-301-2/+5
| | | | | | | | | | Change: - Fix a bug where rc/beta versions throw off the "is this an ansible-base release"? check. Test Plan: - Used it for 2.10.0rc4 Signed-off-by: Rick Elrod <rick@elrod.me>
* Add ansible-releases@redhat.com to announce template (#70812)Rick Elrod2020-07-221-1/+1
| | | Signed-off-by: Rick Elrod <rick@elrod.me>
* Need to return any error code from running antsibull-docs (#70763)Toshio Kuratomi2020-07-201-6/+6
| | | This way we fail early if there's a problem
* Collections docs generation (#59761)Toshio Kuratomi2020-07-175-915/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Build documentation for Ansible-2.10 (formerly known as ACD). Builds plugin docs from collections whose source is on galaxy The new command downloads collections from galaxy, then finds the plugins inside of them to get the documentation for those plugins. * Update the python syntax checks * docs builds can now require python 3.6+. * Move plugin formatter code out to an external tool, antsibull-docs. Collection owners want to be able to extract docs for their own websites as well. * The jinja2 filters, tests, and other support code have moved to antsibull * Remove document_plugins as that has now been integrated into antsibull-docs * Cleanup and bugfix to other build script code: * The Commands class needed to have its metaclass set for abstractmethod to work correctly * Fix lint issues in some command plugins * Add the docs/docsite/rst/collections to .gitignore as everything in that directory will be generated so we don't want any of it saved in the git repository * gitignore the build dir and remove edit docs link on module pages * Add docs/rst/collections as a directory to remove on make clean * Split the collections docs from the main docs * remove version and edit on github * remove version banner for just collections * clarify examples need collection keyword defined * Remove references to plugin documentation locations that no longer exist. * Perhaps the pages in plugins/*.rst should be deprecated altogether and their content moved? * If not, perhaps we want to rephrase and link into the collection documentation? * Or perhaps we want to link to the plugins which are present in collections/ansible/builtin? * Remove PYTHONPATH from the build-ansible calls One of the design goals of the build-ansible.py script was for it to automatically set its library path to include the checkout of ansible and the library of code to implement itself. Because it automatically includes the checkout of ansible, we don't need to set PYTHONPATH in the Makefile any longer. * Create a command to only build ansible-base plugin docs * When building docs for devel, only build the ansible-base docs for now. This is because antsibull needs support for building a "devel tree" of docs. This can be changed once that is implemented * When building docs for the sanity tests, only build the ansible-base plugin docs for now. Those are the docs which are in this repo so that seems appropriate for now.
* Plugin/module docs: parse return values, add collection names in them ↵Felix Fontein2020-06-111-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (version_added_collection), and format them nicely in ansible-doc (#69796) * Tag return value docs if they are a dict (and not str/None). * Try to parse return docs as YAML. * Properly dump return values in ansible-doc. * Adjust plugin formatter. * Add changelog fragment. * Don't add 'default' for return values. * Fix plugin_formatter. * Only try to parse return docs if they are still a string. * Add tests. * Warn if RETURN cannot be parsed. * Adjust tests. Also test for warning. * if -> elif (otherwise EXAMPLE will be parsed too). * Always parse return documentation, and fail if it is invalid YAML. * Polishing. * Mostly re-enable ansible-doc tests. Listing from the local collection seems to be somewhat broken. I assume this is why the test was disabled. * Lint and make tests work with Python 2. * Keep FQCNs in plugins (not modules), i.e. restore previous state.
* Update plugin_formatter to understand tagged version_added (#69797)Felix Fontein2020-06-021-4/+25
| | | | | | | | | * Update version_added handling for plugin_formatter w.r.t. #69680. * Update hacking/build_library/build_ansible/command_plugins/plugin_formatter.py Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com> Co-authored-by: Abhijeet Kasurde <akasurde@redhat.com>
* Allow announce script to work for base and older (#69768)Rick Elrod2020-05-291-20/+66
| | | | | | | | | | | | Change: - Generalize the announce script changes from 4dd0f4127 Test Plan: Harcoded 'hashes' to [] and then: - Ran with --version 2.9.9 --version 2.10.0.dev1 - Ran with --version 2.9.9 - Ran with --version 2.10.1 Signed-off-by: Rick Elrod <rick@elrod.me>
* Update announce script for ansible-base (#69735)Rick Elrod2020-05-271-11/+11
| | | | | | | | | | | | Change: - s/Ansible/ansible-base/ - Update URLs Test Plan: - Hope for the best. (No real way to test this until release day because there are no files on releases.a.c for it to hash right now. A staging releng environment would fix this.) Signed-off-by: Rick Elrod <rick@elrod.me>
* Remove unused imports in the porting_guide command pluginToshio Kuratomi2020-05-141-4/+0
|
* Turn pathlib paths into strsToshio Kuratomi2020-05-142-2/+2
| | | | | | Some APIs do not take a pathlib. They need to have a string representation of a path. Transform the default path to a str so those APIs will work with the default value.
* Fix the command plugin to use the ABCMeta metaclassToshio Kuratomi2020-05-141-4/+4
| | | | | The abstract* decorators don't have any effect unless the class has an ABCMeta metaclass.
* Remove outdated docs and unneeded import from change_detection build fileToshio Kuratomi2020-05-141-10/+2
|
* plugin_formatter: sys.exit does not take a file argument (#68016)Evgeni Golov2020-05-051-2/+2
| | | | | Cleanup of leftover from bcdfdc0cc33155598edfd4752db85c6358b17864. sys.exit does not take any named argument.
* Add anchor to each parameter row (#66895)Dick Visser2020-02-031-3/+29
| | | | | | | | | | | | | | * Add anchor to each paramater row * Update docs/templates/plugin.rst.j2 Co-Authored-By: Felix Fontein <felix@fontein.de> * Insert full keys into plugin docs. * Added visible links. Co-authored-by: Felix Fontein <felix@fontein.de>
* Add a script to update the intersphinx inventory (#66646)Toshio Kuratomi2020-01-221-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | * Add a script to update the intersphinx inventory files * We're about to add intersphinx inventories for separate ansible docs so we need an easy way to update them. Also, we should be updating these cache files for other upstreams occassionally as well. With a script, we can add updating them to a release process. * Now that we don't know what the version of the cache is, change the filenames to not contain versions. * Update the intersphinx cache files with the latest upstream versions Results of running: hacking/build-ansible.py update-intersphinx-cache -o docs/docsite -c docs/docsite/rst/conf.py * Add a comment to the configuration file which says how to structure the intersphinx mapping and why. * Update docs/docsite/rst/conf.py Co-Authored-By: Sandra McCann <samccann@redhat.com> Co-authored-by: Sandra McCann <samccann@redhat.com>
* update too old version to 2.4 (#64167)Sandra McCann2019-10-311-1/+1
|
* Docs formatting: recursively preprocess suboptions (#61900)Felix Fontein2019-09-111-32/+42
| | | | * Simplify code, move option massaging code into own function. * Process suboptions recursively.
* create-deprecated-issues script can now add to a specified project (#61901)Toshio Kuratomi2019-09-092-2/+162
| | | | | | | | * create-deprecated-issues script can now add to a specified project * Migrate the create deprecated issues script into a subcommand of build-ansible * Remove deprecated-issue script from ignore list
* [WIP] Cleanups and version bumping for 2.10 (#61572)Toshio Kuratomi2019-08-301-2/+2
| | | | | | | | * Cleanups and version bumping for 2.10 * Fix changelog url now that stable has been branched * Fix the lenth of the porting guide title now that the version is two digits
* Galaxy meta docs table (#60171)Toshio Kuratomi2019-08-133-8/+31
| | | | | | | | | | * Use an rst table instead of a raw html table * Rst is easier to read so we want to use it wherever possible * Fix the jinja2 filters which create links so that they do not include extraneous whitespace in the URL * Normalize description data before sending them to the templates
* Fix build-ansible.py release-announcementToshio Kuratomi2019-07-261-0/+244
| | | | | | | | * When the release scripts were changed, this file to implement release announcements was left out * Add announce.py to the compile skip lists as only the release engineers run this during package build.
* Generate galaxy.yml based on single source of truth (#59170)Jordan Borean2019-07-234-79/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | * Generate galaxy.yml based on single source of truth * Fix up tests and align file names * Minor Makefile tweak * Remove link in galaxy.yml file and make it a template file * Moved collections docs to dev_guide * change Makefile clean path * Added readme to example meta file * review fixes * Use newer style for doc generation script * Fix mistake in dev_guide index * removed uneeded file, fixed links and added preview banner * Moved banner for sanity test
* Docs scripts cleanup (#59169)Toshio Kuratomi2019-07-172-15/+7
| | | | | | | | | * Fix dump_keywords to require attribute docs * Change the documentation commands to make definition files positional Since the definition files are mandatory, make them positional parameters instead of options.
* Move common build code from _build_helpers (#55986)Toshio Kuratomi2019-07-168-243/+1394
| | | | | | | | | | | | | | | | | | | | | | | | We have some common code used by several docs scripts. Migrate that into the build-only shared code repository. * Move lib/ansible/utils/_build_helpers.py to the directory for common build code * Migrate docs/bin/dump_config.py to a build-ansible subcommand * Migrate dump_keywords to the build-ansible framework * Make the script more maintainable by using functions and good variable names * Port to Python3 idioms * Fix bug so that private attributes will be undocumented * Move generate_man to a build-ansible subcommand * Port plugin_formatter to a build-ansible subcommand * Rework command_plugins so that docs scripts can target Python-3.4+ and releng-only subcommands can use more recent versions of Python. The architecture is now that command_plugins/* need to be importable on Python-3.4. The init_parsers() method needs to run on Python-3.4. But the main() method can utilize features of more recent Python as long as it fits within those parameters. * Update docs build requirements Port the plugin_formatter to build-ansible framework
* Rename python files in hacking/ directory to have .py suffixToshio Kuratomi2019-07-101-2/+2
| | | | | | | | | | | | | ansible-test only passes files which have the .py suffix for sanity tests on python files. This change will allow sanity tests to run on the Python files in hacking/ * Rename test-module to test-module.py * Symlink test-module for backwards compat since end users may be using test-module * Fix test-module sanity errors that are now triggered * Rename ansible_profile to ansible-profile.py * Rename build-ansible
* Implement a framework for having common code for release scripts (#55893)Toshio Kuratomi2019-05-015-0/+498
* Implement a framework for having common code for release scripts * Release scripts will go through hacking/build-ansible. build-ansible is a pluggable script which will set a directory that has common code for non-enduser scripts. It will then invoke the plugin which implements that subcommand. Uses straight.plugin for loading each sub-command. * We're going to add tools which are needed to test ansible (the changelog generation, for instance) so we need to include the pieces relevant to that in the tarball. * Add straight.plugin to the sanity test requirements for the same reason * Skip compile test just for build-ansible plugins which won't be run as part of sanity tests.