Commit Graph

241 Commits (930c2137d3266832109751c3a0ff966f90577b3f)

Author SHA1 Message Date
Gonéri Le Bouder cc758ea574 Revert "shippable: temporary bump the timeout for Azure jobs"
The Azure timeout should not accure anymore since
173d47d1f4.

This reverts commit aaa8835311.
5 years ago
Sam Doran c9e7a2122d
Increase unit test timeout to account for long image download times (#61717) 5 years ago
Gonéri Le Bouder aaa8835311 shippable: temporary bump the timeout for Azure jobs 5 years ago
Matt Clay e4e5005640
Fix ansible-test coverage path handling. (#61528)
* Fix ansible-test coverage path handling.
* Split CI unit tests into two groups.
5 years ago
Sam Doran e5b24a68cc Add additional group for sanity tests
Put validate-modules in its own group
5 years ago
Matt Clay 20d9c34862 Fix CI test result placement. 5 years ago
Matt Clay f5d829392a
Overhaul ansible-test test path handling. (#61416)
* Remove .keep files from test/results/ dirs.

* Remove classification of test/results/ dir.

* Add results_relative to data context.

* Use variables in delegation paths.

* Standardize file writing and results paths.

* Fix issues reported by PyCharm.

* Clean up invocation of coverage command.

It now runs through the injector.

* Hack to allow intercept_command in cover.py.

* Simplify git ignore for test results.

* Use test result tmp dir instead of cache dir.

* Remove old .pytest_cache reference.

* Fix unit test docker delegation.

* Show HTML report link.

* Clean up more results references.

* Move import sanity test output to .tmp dir.

* Exclude test results dir from coverage.

* Fix import sanity test lib paths.

* Fix hard-coded import test paths.

* Fix most hard-coded integration test paths.

* Fix PyCharm warnings.

* Fix import placement.

* Fix integration test dir path.

* Fix Shippable scripts.

* Fix Shippable matrix check.

* Overhaul key pair management.
5 years ago
Jordan Borean faaa669764
PowerShell - Added coverage collector (#59009)
* Added coverage collection for PowerShell - ci_complete ci_coverage

* uncomment out coverage uploader call

* Generate XML for PowerShell coverage

* Use whitelist to exclude coverage run on non content plugins

* Remove uneeded ignore entry

* Try to reduce diff in cover.py

* Fix up coverage report package - ci_complete ci_coverage
5 years ago
Matt Clay 4d424d0830 Only run package-data sanity once in CI. 5 years ago
Jordan Borean 3a3727d200
Remove Python 2.6 from Windows tests (#60235) 5 years ago
Matt Clay b446ca100f
Prepare ansible-test code for relocation. (#60110)
* Fix imports in cli.py.

* Fix imports in executor.py.

* Remove old test/runner/ansible-test entry point.

Use the official bin/ansible-test entry point instead, which has been around since Ansible 2.5.

* Use bin/ansible-test on Shippable.
5 years ago
Matt Clay d3da8e4a5b
Replace old shippable.py with new check_matrix.py. (#60022)
This new script does not depend on ansible-test and provides much more robust job matrix testing.

It is also run on every job in the matrix now, to detect issues with jobs being re-run after matrix changes are made.
5 years ago
Matt Clay f944bd2358 Update ansible-test to properly skip unit tests.
Unit tests will no longer run on "remote only" Python versions (2.6) for tests which are not "remote" (modules and module_utils).
5 years ago
Matt Martz 95f4282c42
Verify package data in setup.py installs all files (#59537)
* Add sanity test to ensure all non-py files are installed

* Fix mode and regex

* Fix role skel inventory package_data

* Add docs

* Update package_data for inventory files

* Address pylint concerns

* Another tweak to package_data

* Address review feedback

* Change index to 1

* add to ansible-only.txt
5 years ago
Matt Clay 13bbfacb04 Show ansible-test --explain errors in CI. 5 years ago
Matt Clay 3f2b766d10 Add future and metaclass boilerplate to test code.
Continue to ignore:

- test/integration/
- test/legacy/
- test/units/
5 years ago
Matt Clay 79685a4a2d
Use Python 3.7 to run ansible-test coverage in CI. (#57555)
Generating XML for coverage reports on Python 3.7 uses far less
memory than on Python 2.7. This change should avoid the MemoryError
we've been seeing in the nightly coverage runs.
5 years ago
Matt Clay b1e6ad9754
Limit Python 2.6 units to modules & module_utils. (#57377) 5 years ago
Matt Clay 85ae8f5258 Add Hetzner Cloud to CI integration tests. 5 years ago
Matt Clay c846501829 Increase unit test timeout for --coverage. 5 years ago
Matt Clay 2a8252ceb9 Slightly increase non-coverage unit test timeout. 5 years ago
Matt Clay 8fa294a33a
Fix ansible-test coverage stub memory usage. (#53652)
Split coverage stub files into multiple parts based on the number
of lines in files included in each stub. This will keep memory usage
down to avoid hanging on Shippable.
5 years ago
Matt Clay 887ab35656
Add support for ansible-test --coverage-check. (#53573) 5 years ago
Matt Clay 9546761407 Fix coverage stub generation in CI. 5 years ago
Matt Clay a8d829d9c3
Add timeout support to ansible-test. (#53302)
* Add timeout support to ansible-test.
* Fix ansible-test tar filename filter bug.
* Update timeouts used on Shippable.
* Kill subprocesses when parent process terminates.
* Require explicit use of env --show option.
5 years ago
Matt Clay b2f354ce29 Ignore errors during container cleanup in CI. 5 years ago
Matt Clay a1fec259c1
Reduce console noise at start of CI session. (#52387)
* Reduce console noise at start of CI session.
* Use allowed shebang.
5 years ago
Matt Clay 6a82827ddd Add Python 3.8 to ansible-test and CI. 5 years ago
Matt Clay d2a9b16f7e Make Shippable timing script more resilient.
This will permit the script to pass through content which could
not be previously decoded or encoded. This could occur when running
some tests on macOS using file paths with non-ASCII characters.
6 years ago
John R Barker 721a28202e
Revert Debug: Size of coverage file #50380 (#50945) 6 years ago
Matt Clay 31c1bdd6a8 Fix run.py --branch argument.
The API docs state that both `branch` and `branchName` are valid,
but only `branchName` appears to work.
6 years ago
John R Barker e6ced9c73f
Debug: Size of coverage file (#50380) 6 years ago
John R Barker 7ec82cdfc9
Revert TEMP HACK: Upload all to codecov (#50279)
Codecov.io have made some improvements to results processing.
Upload all the coverage data to see is codecov can process this.

Reverts https://github.com/ansible/ansible/pull/47515
6 years ago
Matt Clay 01833b6fb1
Add `env` command to ansible-test and run in CI. (#50176)
* Add `env` command to ansible-test and run in CI.
* Avoid unnecessary docker pull.
6 years ago
Matt Clay 9979a32e5c Fix passing of env vars to Shippable. 6 years ago
John R Barker fb2e838a42
TEMP HACK: Avoid overloading codecov.io (#47515)
Without this patch we are overloading codecov.io by uploading 90+ tests.

As a workaround limit uploading to only "Group 1"

Will be removed/updated based on codecov.io's support team
6 years ago
Matt Clay 6a51b5ed26 Use 4 nodes for sanity tests in CI. 6 years ago
Matt Clay 2761fe8272 Revert "Use 4 nodes for sanity tests in CI."
This reverts commit b887333029.
6 years ago
Matt Clay b887333029 Use 4 nodes for sanity tests in CI. 6 years ago
Jordan Borean 25c627d256
shippable: fix py3 issues with downloader (#46522) 6 years ago
Matt Clay e53390b3b1
Fix ansible-test multi-group smoke test handling. (#46363)
* Fix ansible-test smoke tests across groups.
* Fix ansible-test list arg defaults.
* Fix ansible-test require and exclude delegation.
* Fix detection of Windows specific changes.
* Add minimal Windows testing for Python 3.7.
6 years ago
Matt Clay ac492476e5
Bug fixes and cleanup for ansible-test. (#45991)
* Remove unused imports.
* Clean up ConfigParser usage in ansible-test.
* Fix bare except statements in ansible-test.
* Miscellaneous cleanup from PyCharm inspections.
* Enable pylint no-self-use for ansible-test.
* Remove obsolete pylint ignores for Python 3.7.
* Fix shellcheck issuers under newer shellcheck.
* Use newer path for ansible-test.
* Fix issues in code-smell tests.
6 years ago
Matt Clay 771768966f Flush output from timing script. 6 years ago
Matt Clay a96a51b0c6 List quay.io images during Shippable run. 6 years ago
Matt Clay 5461bfbf31 Split sanity tests into 3 groups. 6 years ago
Matt Clay 31a5b874a1 Use runtime instead of datetime for test output. 6 years ago
Matt Clay 4e489d1be8
Update Shippable integration test groups. (#43118)
* Update Shippable integration test groups.
* Update integration test group aliases.
* Rebalance AWS and Azure tests with extra group.
* Rebalance Windows tests with another group.
6 years ago
Matt Clay 528de5b82f Remove unwanted containers at CI job start. 6 years ago
Matt Clay a7d7df1450 Make docs-build sanity test disabled by default. 6 years ago
Matt Clay 8a223009ca
Improve handling of integration test aliases. (#38698)
* Include change classification data in metadata.
* Add support for disabled tests.
* Add support for unstable tests.
* Add support for unsupported tests.
* Overhaul integration aliases sanity test.
* Update Shippable scripts to handle unstable tests.
* Mark unstable Azure tests.
* Mark unstable Windows tests.
* Mark disabled tests.
6 years ago
Matt Clay 11ad559010
Terminate Tower instances after CI ends. (#37265)
* Remove obsolete Tower support from manage_ci.
* Add missing remote settings to cloud tests.
6 years ago
Matt Clay 1d419c737d Run each Windows version independently in CI. 6 years ago
Matt Clay 7abdab6c9e Convert ansible-test compile into a sanity test. 7 years ago
Matt Clay eae23d2dbd Skip coverage on routine CI runs. 7 years ago
Matt Clay 20824b8f3d Simplify Windows versions in ansible-test. 7 years ago
Matt Clay d8673ed72a Preserve `test/results/data/` in Shippable jobs. 7 years ago
Matt Davis fbce62795d enable Windows Server 2016 in CI (#34127)
* enable Windows Server 2016 in CI
* avoid use of Write-Host in config script
7 years ago
Matt Clay 82b5a6a0c9
Fix ansible-test network-integration command. (#34661)
* Fix ansible-test network platform init filter.
* Fix ansible-test network inventory generation.
* Remove ios/csr1000v from CI.
* Run network tests on Python 2.7 and 3.6.
7 years ago
Matt Clay 1b5c4b72bd Add Azure provider support to ansible-test and CI.
ci_complete
7 years ago
Matt Clay 887f227994 Use vyos/1.1.8 in CI. 7 years ago
Matt Clay 6472723ba8
Add missing ansible-test --remote-terminate support. (#32918)
* Expand ansible-test --remote-terminate support:

- windows-integration
- network-integration

These commands previously accepted the option, but did not support it.

* Terminate windows and network instances when done.
7 years ago
Matt Clay cf1337ca9a Update ansible-test sanity command. (#31958)
* Use correct pip version in ansible-test.
* Add git fallback for validate-modules.
* Run sanity tests in a docker container.
* Use correct python version for sanity tests.
* Pin docker completion images and add default.
* Split pylint execution into multiple contexts.
* Only test .py files in use-argspec-type-path test.
* Accept identical python interpeter name or binary.
* Switch cloud tests to default container.
* Remove unused extras from pip install.
* Filter out empty pip commands.
* Don't force running of pip list.
* Support delegation for windows and network tests.
* Fix ansible-test python version usage.
* Fix ansible-test python version skipping.
* Use absolute path for log in ansible-test.
* Run vyos_command test on python 3.
* Fix windows/network instance persistence.
* Add `test/cache` dir to classification.
* Enable more python versions for network tests.
* Fix cs_router test.
7 years ago
Matt Clay 03e18aa52e Remove cryptography install from CI other test. 7 years ago
Matt Clay 5a91ed0a3b Switch CI for OS X back to a single job. (#31265)
* Update Shippable scripts for group/non-group use.
* Switch CI for OS X back to a single job.
7 years ago
Matt Clay 72237b63e7 Run OS X and FreeBSD CI tests using groups. (#31254)
* Run OS X and FreeBSD CI tests using groups.
* Improve readability of Shippable jobs.
7 years ago
Matt Clay 765718bed2 Run all Windows tests if change detection disabled (#30320)
* Run all Windows tests if change detection disabled
* Run all Windows versions if change detection disabled
7 years ago
Matt Clay 8f4c8844c4 Divide Windows integration tests into 2 groups. (#29029)
* Divide Windows integration tests into 2 groups.
* Support `none` for `--changed-all-target`.
* Run 2 separate Windows groups on Shippable.
* Only run smoketest and minimal for the group1 job.
7 years ago
Matt Clay 55fb18b85c Split cloud tests into two CI groups. 7 years ago
Matt Clay e513ec10da Add safety check for Shippable "Rebuild with SSH" (#28857)
* Add safety check for Shippable "Rebuild with SSH".
* Run shippable.py for the `other` test.
7 years ago
Matt Clay 1a98962e19 Switch default cloud tests to smoketest. 7 years ago
Matt Clay e0e5b4cf64 Optimize running of CI cloud integration tests. 7 years ago
Matt Clay 7931e11437 Use subset of Windows tests for "all" tests. (#26830) 7 years ago
Matt Clay 0b784c65b1 Add sanity import test to ansible-test. (#26730)
* Add sanity import test to ansible-test.
* Run sanity import test on all python versions.
7 years ago
Matt Clay 4a013d6d69 Add RHEL 7.3 to ansible-test and CI. (#26550)
* Add support for RHEL to ansible-test.
* Enable RHEL 7.3 on Shippable.
7 years ago
Toshio Kuratomi e238ae999b Cyptography pr 20566 rebase (#25560)
Make pyca/cryptography the preferred backend for cryptographic needs (mainly vault) falling back to pycrypto

pyca/cryptography is already implicitly a dependency in many cases
through paramiko (2.0+) as well as the new openssl_publickey module,
which requires pyOpenSSL 16.0+. Additionally, pyca/cryptography is
an optional dep for better performance with vault already.

This commit leverages cryptography's padding, constant time comparisons,
and CBC/CTR modes to reduce the amount of code ansible needs to
maintain.

* Handle wrong password given for VaultAES format

* Do not display deprecation warning for cryptography on python-2.6

* Namespace all of the pycrypto imports and always import them

  Makes unittests better and the code less likely to get stupid mistakes
  (like using HMAC from cryptogrpahy when the one from pycrypto is needed)

* Add back in atfork since we need pycrypto to reinitialize its RNG just in case we're being used with old paramiko

* contrib/inventory/gce: Remove spurious require on pycrypto

(cherry picked from commit 9e16b9db275263b3ea8d1b124966fdebfc9ab271)

* Add cryptography to ec2_win_password module requirements
  * Fix python3 bug which would pass text strings to a function which
    requires byte strings.

* Attempt to add pycrypto version to setup deps

* Change hacking README for dual pycrypto/cryptography

* update dependencies for various CI scripts

* additional CI dockerfile/script updates

* add paramiko to the windows and sanity requirement set

  This is needed because ansible lists it as a requirement. Previously
  the missing dep wasn't enforced, but cryptography imports pkg_resources
  so you can't ignore a requirement any more

* Add integration test cases for old vault and for wrong passwords

* helper script for manual testing of pycrypto/cryptography

* Skip the pycrypto tests so that users without it installed can still run the unittests

* Run unittests for vault with both cryptography and pycrypto backend
7 years ago
Matt Clay 5babe2daea Increase python version coverage for tests. (#24762)
* Improve ansible-test inventory handling.
* Fix python 3 re-raise of exception from thread.
* Fix python 3 encoding for windows-integration.
* Run network tests on multiple python versions.
* Run windows tests on multiple python versions.
* Support Shippable delegation using --tox.
* Skip vyos_command on python 3 tests until fixed.
* Add python 3 filtering to local and tox.
* Fix tests to support back to back runs.
* Temporarily test networking with python 2.7 only.

Running the tests back to back causes intermittent test failures
which need to be addressed before we can test multiple versions
in a single test run.
7 years ago
Matt Clay 036ba7eeec Clean up Shippable tools and update job handling.
- Tools are now in a tools subdirectory.
- Removed obsolete ansible-core-ci tool.
- Added run.py for starting new CI runs.
- Improved handling of run IDs and URLs.
- General code cleanup and docs updates.
- Nightly CI runs use complete coverage.
7 years ago
Matt Clay 6e160650e9 Fix run filter on Shippable downloader. 7 years ago
Matt Clay 4daa16f9ce Add --all and --stub coverage options.
ci_coverage
ci_complete
7 years ago
Matt Clay 6a2a7a2392 Enable codecov.io and add coverage grouping. 7 years ago
Matt Clay fdcad0f44d Improve on-demand coverage for Shippable. 7 years ago
Matt Clay 5cb5228cde Implement on-demand coverage on Shippable. (#24535) 7 years ago
Matt Clay af5db3e4a9 Revert "Add support for on-demand coverage on Shippable."
This reverts commit 7b3f0b8870.
7 years ago
Matt Clay 7b3f0b8870 Add support for on-demand coverage on Shippable.
Triggered by setting the COVERAGE environment var to a non-empty value.
Alternatively the string `ci_coverage` can be added to a commit message.
7 years ago
Matt Clay fb9efd3c7e Add `--remote-terminate` option to ansible-test.
Set `--remote-terminate success` for osx tests.
7 years ago
Matt Clay 17e07a27b2 Enable cloud tests for use with ansible-test. 7 years ago
Matt Clay 0587d59266 Use Shippable image: drydock/u16pytall:master (#23997)
* Use Shippable image: drydock/u16pytall:master
* Do not install python 3.6 on Shippable.
7 years ago
Matt Clay e7bb508ad6 Fix var precedence check to support python 3. (#23552)
* Fix var precedence check to support python 3.
* Run CI sanity tests using python 3.5.
* Disable pylint non-iterator-returned test to pass on python 3.5.
7 years ago
Matt Clay eec01e2137 Set IO encoding for ansible-test on Shippable. 7 years ago
Matt Clay dfe8eca3d2 Update Shippable downloader to support new API.
- Download run/jobs by URL (old or new).
- Download run metadata.
- Download job metadata.
- Format downloaded JSON.
- Handle and save coverage/testresults download errors.
7 years ago
Matt Clay 12f6beaebd Remove python2.4 package install from other test. 7 years ago
Matt Clay 869449e288 Add test verification to ansible-test. (#22636)
* Add unified git diff parser.
* Add metadata and diff handling.
* Add test confidence/verification to bot output.
7 years ago
Matt Clay 89559f78de Add `--failure-ok` option to `ansible-test`. (#22623) 7 years ago
Matt Clay a64665ae91 Fix error handling in CI other script. 7 years ago
Matt Clay 3ab344e8bd Use lint/junit output for compile test. (#22395)
* Refactor sanity classes for use in all tests.
* Use lint/junit output for compile test.
* Add missing options for compile test.
* Fix early bailout on requirements install.
7 years ago
Matt Clay 9acf551674 Run all `other` tests on Shippable before failing. 7 years ago
Matt Clay 8f463fcdd2 Create bot friendly sanity output. (#22381) 7 years ago
Matt Clay 72c96b3ac3 Fix encoding issue in shippable downloader. 7 years ago
Matt Clay d66ce40ecb Overhaul `ansible-test sanity` implementation. (#22177)
- Tests are run to completion instead of stopping on first failure.
- Test results are now parsed instead of passing through to the console.
- Test results can be saved in junit xml format.
- Test results will show up on the Shippable "Tests" result tab.
- Added an experimental --lint option for easier integration with other tools.
- Code smell tests are now usable with the --list-tests, --test and --skip-test options.
- Code split out from executor.py into sanity.py.
- Rename download-logs to download.py and add support for test and coverage results.
- Miscellaneous improvements.
7 years ago
Matt Clay ae2d2860f5 Reduce CI output processing code coverage. 7 years ago