summaryrefslogtreecommitdiff
path: root/hacking
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Rename hacking/shippable to hacking/azp.Matt Clay2021-05-056-203/+12
| | | | | | References to Shippable were changed to Azure Pipelines. Also remove rebalance.py as it does not work with Azure Pipelines due to the required data not being present.
* Retrofit shippable scripts to work with AZPAlexander Sowitzki2021-04-285-415/+205
| | | | Co-authored-by: Matt Clay <matt@mystile.com>
* Update default containers to 3.4.0. (#74415)Matt Clay2021-04-251-1/+1
| | | | | | | | | | | * Update default containers to 3.4.0. The 3.4.0 containers use Python 3.6 (the system Python) for `/usr/bin/python3`. Python 3.9 continues to be the default Python version selected by `ansible-test` for these containers. * Fix shebang on build-ansible.py. Using `python` instead of `python3` allows `ansible-test` python interception and requirements install to function.
* Fix typo in incidental.py (#73737)Ikko Ashimine2021-03-011-1/+1
| | | successfull -> successful
* 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
* [facts] Differentiate CentOS vs CentOS Stream (#73034)Rick Elrod2021-01-131-0/+1
| | | | | | | | | | | | | | | | | | | Change: - On CentOS Stream, make distribution_release be "Stream" - On CentOS Core, it continues to be "Core" - Implement custom distribution file parser for CentOS, so we can look for "CentOS Linux" and "CentOS Stream" - Two new fixtures introduced (CentOS Linux 8.1 and CentOS Stream 8) - Removed two dicts from `Distribution` class that were seemingly not used anywhere. Test Plan: - ci_complete - New test fixtures Tickets: - Fixes #73027 Signed-off-by: Rick Elrod <rick@elrod.me>
* hacking: replace use of "which" with "command -v" (#71278)Vincent Bernat2020-08-181-1/+2
| | | | | | | | | | | | "command -v" is the POSIX compliant way to get the path to a command. It returns the path to the command if it exists and exits with a non-zero status when it does not, without any output. "which" is not POSIX and it can have various different effects. With Zsh, it says "python not found" on stdout. See: - https://pubs.opengroup.org/onlinepubs/009695399/utilities/command.html Signed-off-by: Vincent Bernat <vincent@bernat.ch>
* 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>
* distribution: Add support for DragonFly (#70748)Abhijeet Kasurde2020-07-211-1/+10
| | | | | partially fixes #43739 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* 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-176-918/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Update hacking/shippable docs.Matt Clay2020-07-071-1/+1
| | | | The `--all` option downloads more than is needed for analyzing code coverage.
* More boilerplate fixes. (#70224)Matt Clay2020-06-226-2/+16
| | | | | | | * Fix boilerplate in hacking dir. * Fix boilerplate in docs dir. * Fix boilerplate in integration tests. * Fix boilerplate in examples.
* Get test data file directly in rebalance script (#70107)Sam Doran2020-06-191-17/+26
| | | | Rather than looking through tests.json to find the data file, look for it explicitly within a given target to avoid problems processing data in tests.json.
* Avoid unnecessary comprehensions.Matt Clay2020-06-181-1/+1
|
* 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.
* starting metadata sunset (#69454)Brian Coca2020-06-042-560/+0
| | | | | | | | | | | | | * starting metadata sunset - purged metadata from any requirements - fix indent in generic handler for yaml content (whey metadata display was off) - make more resilient against bad formed docs - removed all metadata from docs template - remove metadata from schemas - removed mdata tests and from unrelated tests Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Rick Elrod <rick@elrod.me>
* 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>
* Discover Flatcar Linux properly for hostname (#69627)Dongsu Park2020-06-021-0/+1
| | | | | | | To avoid issues with Flatcar Container Linux being unable to be found, detect Flatcar distro name especially for hostname, just like CoreOS Container Linux was supported. See also https://github.com/ansible/ansible/issues/69516
* 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
|
* Add a script for adding backport referencesRick Elrod2020-05-073-0/+309
| | | | | | | | | | | Change: - Add a place for adding backport-related scripts in the future - Add a script for adding backport references Test Plan: - Used it for this latest batch of PR reference-adding. Signed-off-by: Rick Elrod <rick@elrod.me>
* 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.
* Remove cgroup_perf_recap_graph.py, since that callback no longer exists here ↵Matt Martz2020-04-081-130/+0
| | | | (#68779)
* Fix references to old egg-info directory.Matt Clay2020-03-301-2/+5
|
* Add a custom policy for hackers using ansible-test (#68535)Rick Elrod2020-03-283-0/+48
| | | Signed-off-by: Rick Elrod <rick@elrod.me>
* Remove hacking/aws_configJill Rouleau2020-03-259-1307/+0
| | | | | | AWS hacking config has been moved to the AWS CI terminator repo, and is no longer required in base. https://github.com/mattclay/aws-terminator/pull/91
* hacking - Add script to easily rebalance Shippable groups (#67976)Jordan Borean2020-03-241-0/+181
| | | | | | | * hacking - Add script to easily rebalance Shippable groups * Fix py26 compile issue * Add option to automatically change test target aliases
* Update Shippable hacking scripts default branch.Matt Clay2020-03-232-2/+2
|
* Add new options to `hacking/shippable/incidental.py` (#68384)Matt Clay2020-03-232-37/+132
| | | | | | | * Add `--plugin-path` option to `incidental.py`. * Report on plugins with no test target. * Add `--verbose` option to script.
* Fix coverage script to handle ongoing runs (#68380)Rick Elrod2020-03-231-3/+25
| | | | | | | | | | | | | * Fix get_recent_coverage_runs.py to handle ongoing runs Signed-off-by: Rick Elrod <rick@elrod.me> * Color code test status to make it easier to see at a glance Signed-off-by: Rick Elrod <rick@elrod.me> * fix lint Signed-off-by: Rick Elrod <rick@elrod.me>
* Fix hacking/shippable/incidental.py source search.Matt Clay2020-03-231-1/+1
|
* Add script for getting URLs of coverage runsRick Elrod2020-03-232-0/+74
| | | | Signed-off-by: Rick Elrod <rick@elrod.me>
* Add hacking/shippable/incidental.py script. (#68182)Matt Clay2020-03-232-0/+500
| | | | | * Add hacking/shippable/incidental.py script. * Add README.md.
* First attempt at making the shippable downloader recurse to pull parent ↵Rick Elrod2020-03-231-8/+47
| | | | | | | | | | | results of reruns (#68154) * First attempt at making the shippable downloader recurse to pull parent results of reruns Signed-off-by: Rick Elrod <rick@elrod.me> * Update message for previous run download. Co-authored-by: Matt Clay <matt@mystile.com>
* sqs_queue - Move to boto3 and add support for various extra features (#66795)Mark Chappell2020-02-271-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * reworked sqs_queue * Switch default purge_tags behaviour to false. This matches the behaviour of ec2_tag and ecs_tag. * Minor lint / review fixups * Add missing AWS IAM policy for SQS tests * Move integration tests to using module_defaults: group/aws:... * add changelog * Break out the 'compatability' map from our spec definition (gets flagged by the schema validation) * Tweaks based on review * add basic examples * Lint fixups * Switch out NonExistentQueue logic so it's easier to follow * Reorder name argument options for consistency Co-authored-by: Dennis Podkovyrin <dennis.podkovyrin@gmail.com>
* add module cloudformation_exports (#67349)mmoyle2020-02-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add module cloudformation_exports * add RETURN, add aliases group, clean up yaml * update return value. uncomment security_token. remove cloudformation shortcut * fix typo * try to delete test stack * rename stack * add cleanup and assert. try to set stack name with variable * create s3 bucket instead * set bucket name * add tests, remove unsed key and import, add iam role, add to module_defaults * import exceptions, fix assert syntax * fix assert * Update test/integration/targets/cloudformation_exports/tasks/main.yml Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com> * fix export name * renamed module Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
* elb_target / elb_target_info : Integration test fixups (#61256)Mark Chappell2020-02-201-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update AWS policy to enable management of TargetGroups * elb_target: (integration tests) migrate to using module_defaults * elb_target: (integration tests) lookup the AMI by name rather than hard coding AMI IDs * elb_target_info: (integration tests) finish rename of integration test role * elb_target: (integration tests) rename various resources to consistently use {{ resource_prefix }} * elb_target_info: (integration tests) Migrate to using module_defaults * elb_target_info: (integration tests) Lookup AMI by name rather than hard coding AMI IDs * Apply suggestions from code review Co-Authored-By: Jill R <4121322+jillr@users.noreply.github.com> * elb_target: (integration tests) Remove the 'unsupported' alias * Try bumping up the timeout * Rules don't permit 'shippable' (resource_prefix uses this when run in shippable) * Try bumping up more timeouts :/ * Avoid double evaluation of target_health assertion * Simplify target_type usage a little (rather than constantly performing a lookup) * mark elb_target tests 'unstable' for now, they're slow Co-authored-by: Jill R <4121322+jillr@users.noreply.github.com>
* Relocate Shippable tools. (#67556)Matt Clay2020-02-192-0/+497
| | | | | | | | | | * Move Shippable tools to hacking directory. These limits the `test/utils/shippable/` directory to scripts required for CI. * Fix `test/utils/shippable/` file classification. * Update package-data sanity test.
* Fix hacking policy (#67579)Mark Chappell2020-02-191-1/+1
|
* Refactor iam_role to bring down the complexity score (#66027)Mark Chappell2020-02-151-0/+3
| | | | | | | | | | | | * Simplify BotoCore- / Client- Error try/except loops where we don't need different behaviour * Refactor IAM Role manipulation to reduce complexity scores * Missing permissions * Add retry decorator by default * compare_attached_role_policies is dead code, remove it