aboutsummaryrefslogtreecommitdiffstats
path: root/.cirrus.yml
Commit message (Collapse)AuthorAgeFilesLines
* [avocado] Upgrade avocado to 103.X LTSArif Ali2024-04-151-11/+5
| | | | | | | | | | | | | | * Extra changes required due to module and function changes in new avocado * CentOS Stream is now seen as centos-stream in avocado instead of centos * Fine tune tox for stage tests Closes: #3588 Resolves: #3594 Co-authored-by: Jake Hunsaker <jacob.r.hunsaker@gmail.com> Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [testing] Add most testing via tox.iniArif Ali2024-04-121-1/+15
| | | | | | | | | | | | | | | | | Consolidate testing, so that things can be run from CLI, CI and various other means in a consistent way by using tox. * Updated all the flake8 tests in the tests folder. * Added pylint as a neutral test so that we can work on this in stages and have some collaboration on what we test and don't * The tox tests for unit, stageone, stagetwo testing makes is easier for users to know how to run tests, and not have to do things manually * Using tox for CI doesn't make sense, as that will create virtual envs and will disregard system/snap based python modules so may not work Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [cirrus] Run tests on latest daily builds for ubuntuArif Ali2024-04-091-3/+52
| | | | | | | | | | | | Fix the issues reported by the tests on the new version of ubuntu Resolves: #3587 Closes: #3588 Related: SET-594,SET-595 Co-authored-by: David Negreira <david.negreira@canonical.com> Signed-off-by: Arif Ali <arif.ali@canonical.com> Signed-off-by: David Negreira <david.negreira@canonical.com>
* [cirrus] Run foreman tests on foreman_setup.sh changePavel Moravec2024-03-071-1/+1
| | | | | | | | | Automatically run foreman integration tests when their install script is updated. Relevant: #3555 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [deb][pkg] Update control for downstream buildArif Ali2023-11-261-1/+2
| | | | | | | | | | | | | | | | | * python3-setuptools is still required for building the package * python3-yaml is required for build for tests with the conformance_tests * Add the same ignores as dowstream build, so that we don't have to keep changing these. Once the avocado is packaged, we can take this out * Update image for the deb creation, so that it can be minimal * Fix lxd runtime, so that if the root device is not available, it will not look at the storage pools Downstream build machines are much more minimal compared to gce instances, so we require more dependencies to be added. Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [debian] Packaging and testing for debian pkgsArif Ali2023-11-121-9/+50
| | | | | | | | | | | | | | | | Initial start of building and testing the deb package This will improve the overall testing of sos over the Ubuntu releases, and also helps with the basis of thenadding further stagetwo testing in the future. This will help to pick up issues automatically rather than the manual testing. Add ubuntu-latest for deb CI build and testing. Update the GCE images for all ubuntu images for CI testing Co-authored-by: Nikhil Kshirsagar <nikhil.kshirsagar@canonical.com> Signed-off-by: Nikhil Kshirsagar <nikhil.kshirsagar@canonical.com> Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [cirrus] bump foreman versionsPavel Moravec2023-10-101-4/+4
| | | | | | | | | Bump tested foreman versions - use current latest (3.7) on Ubuntu and CentOS and previous 3.5 and 3.3 to match supported Satellite versions. This requires enabling proper module streams for foreman-3.3 as well. Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
* [cirrus] Update gce imagesArif Ali2023-08-131-7/+7
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [specfile] new fedora guidelinesSandro Bonazzola2023-05-311-0/+1
| | | | | | adapt the specfile to new fedora packaging guidelines. Signed-off-by: Sandro Bonazzola <sbonazzo@redhat.com>
* [cirrus] Move F38 image from Beta to GAJake Hunsaker2023-05-011-2/+2
| | | | | | F38 has been GA, so we should move off the Beta image for our testing. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Update CI testing imagesJake Hunsaker2023-03-301-10/+10
| | | | | | Routine update of the images used by our CI testing in GCP Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [testing] Grab snap build logs on failureArif Ali2023-03-011-0/+5
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [snap][testing] Fix bionic snap runtimeArif Ali2023-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | When the snap is being packaged via core22, it used python3.10 but bionic used python3.6 and seems have runtime issues there. Added the sos alias for testing, to ensure that when the stage one testing is done, that sos is correctly tested within the snap This alternative ensures that the packaging module is packaged in the snap, and can use this if the pkg_resources version does not work Add a wrapper function in utlities, so that the parse_version can be used in a consistent way across the sos project Closes: #3126 Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [cirrus] Update GCP imagesJake Hunsaker2023-01-161-11/+11
| | | | | | | | | | Update most of the GCE images we use for CI testing to their latest releases for their respective versions. This commit also replaces F35 testing with F37 beta. F35 is now EOL and as such no future sos releases would be included there. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Increase stagetwo timeoutJake Hunsaker2022-10-111-0/+1
| | | | | | | | | | | | | | The stagetwo tests are getting closer to consistent 30 minutes timeouts, with centos 8 generally hitting the timeout most often among the stagetwo tests. This is mostly due to the inefficient way in which we dump 100MB into the system journal in order to test journal size limiting. As a stopgap measure until we can figure out a better/more reliable way to artificially increase the journal size, increase the timeout of these tests to avoid unnecessary re-runs which would otherwise pass. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Update CentOS image versionsJake Hunsaker2022-09-291-2/+2
| | | | | | Updates the images used for CentOS Stream 8/9. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [testing] Fine tune the testing for ubuntuArif Ali2022-09-291-4/+11
| | | | | | | | | | | | | There was no testing for ubuntu 18.04, and previous manual testing found issues, and this is still supported. Add envs similar to fedora and centos testing. This change also ensures that ubuntu 22.04 is the one that is used for snap builds. We don't need python3-magic on the OS, as this should now come in-built within the snap, which will have the right version for binary checks. Update images to the latest ones available for Ubuntu Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [snapcraft] Update base to core22Arif Ali2022-09-271-2/+2
| | | | | | | | | | | | | | core20 has python3-magic 0.4.15, and hence the binary detection will not work by default. Moving to core22 goes to 0.4.24-2 which would mean this would work nevertheless. This also means migrating to using craftctl instead of snapcraftctl. Snap build now needs to be done on 22.04, as it core22, so chaging the snap build for cirrus to the corresponding image. The version cannot be set now if adopt-info is not there, so removing this for the cirrus tests. Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [cirrus|foreman] Expand Foreman testing matrix, automate installJake Hunsaker2022-09-261-13/+19
| | | | | | | | | | | | | | | Foreman has since made several releases since we initially added integration testing for it. Rebuilding the images is maintenance overhead we can reduce by automating the installation of foreman on images. Provide this scripted installation, and expand our testing matrix to additional versions of Foreman. As of this commit, we will be testing versions 2.5 and 3.1 on CentOS Stream 8 to cover Red Hat Satellite features, as well as Foreman version 3.4 (the latest current upstream) for CentOS 8 and Debian 11. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Update Fedora images used in CI testsJake Hunsaker2022-08-311-9/+5
| | | | | | | | The Fedora 36 image is now available on GCP, so update our testing matrix to use it. Accordingly, this means we no longer need to build or maintain our own Fedora images going forward. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Use built packages for testing tasksJake Hunsaker2022-08-291-59/+74
| | | | | | | Updates our testing posture with Cirrus to use the generated sos packages from early tasks in the later stageone and stagetwo tasks. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [testing] Test building of snapArif Ali2022-08-171-0/+19
| | | | Signed-off-by: Arif Ali <arif.ali@canonical.com>
* [cirrus] Update GCE testing imagesJake Hunsaker2022-07-191-9/+12
| | | | | | | | Updates the images for Fedora to use the stock images on GCE, the CentOS Stream images to their latest release, and the Ubuntu images to test on the latest 22.04 LTS release. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [collect] Add cluster profile for RHOSPJake Hunsaker2022-05-091-1/+1
| | | | | | | | | | | | Adds a cluster profile for Red Hat OpenStack Platform to identify controller and (optionally) compute nodes to collect sos reports from. Note that this adds a dependency on pyyaml to sos. This should be considered a weak dependency by downstreams. As such, it is added as a 'Recommends' in `sos.spec`. pip does not have the concept of 'weak dependencies', and so is added as a regular requirement in `setup.py`. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [utilities] Better detect binary files with python3-magicJake Hunsaker2022-04-121-2/+3
| | | | | | | | | | Adds a new `file_is_binary()` method to `sos.utilities` to serve as a single point to determine if a file is binary or not, relying on the python3-magic module. Closes: #2839 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Update CentOS Stream 8 image, add Stream 9 testingJake Hunsaker2022-04-121-6/+16
| | | | | | | Updates the CentOS Stream 8 image used to run the CI tests, and adds testing on CentOS Stream 9 now that those images are available. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [avocado] Pin avocado test suite to version 94Jake Hunsaker2022-02-111-1/+1
| | | | | | | | | | | The latest release of avocado-framework, 95.0, makes several changes that will require us to investigate moving to the newer nrunner test-runner. For the moment, pin our CI tests to a previous version so that the changes in newer avocado versions don't block current development. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus,tests] Update testing matrix to Fedora 35Jake Hunsaker2022-01-061-2/+3
| | | | | | | | | | | | | | F35 has been out for a bit, we should update our testing matrix accordingly. New images have been pushed to GCP, so this change updates Cirrus to use those new images. Note this adds installation of pip to Fedora test VMs as well rather than baking that into the images. Ethtool is now also explicitly installed. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Run unit tests under avocado instead of noseJake Hunsaker2021-10-111-10/+4
| | | | | | | | | | | | | | | | | | | | | | | `nose` is no longer maintained, and as of python-3.10 is functionally broken. As such, instead transition to running those tests via avocado, like we do with our integration test suite. The tests themselves do not need much modification, however due to the isolation provided for executing the tests we do need to explicitly set a new PYTHONPATH env var for those executions. This means we still need to run the unit tests as a separate step from the stageone tests. The changes needed are mostly around file paths relative to the pwd where the tests are executed from originally. Additionally, remove the sosreport_pexpect unit test as it is no longer useful in its own right, would need more significant changes to run properly with avocado, and the integration test suite provides better coverage for what it was testing. Closes: #2716 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Upload logs from failed tests to GCE storage bucketJake Hunsaker2021-09-091-0/+13
| | | | | | | | | | | Adds failure handling to cirrus tasks that actually run sos so that if an error is encountered in the test suite, the logs from the tests are uploaded to the GCE cloud storage bucket associated with the GCE sos project. This will also make those logs available from the cirrus task page. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Pin avocado test runner to known working versionCleber Rosa2021-08-311-3/+3
| | | | | | | | | | | | | | | | Avocado has been developing a new test runner (dubbed nrunner) and the upcoming release 91.0 will activate the new runner as the default one. While most of the tests and jobs should work under the new runner, there are a few caveats, and possibly unknown issues. To avoid regressions in the test execution and CI status, let's pin the test runner to the known working version. A switch to use the new runner may be done as a separate future change after compatibility is fully investigated and validated. Reference: https://avocado-framework.readthedocs.io/en/90.0/releases/90_0.html#important-announcement Signed-off-by: Cleber Rosa <crosa@redhat.com>
* [collect,docs] Drop `--master` and update internal referencesJake Hunsaker2021-08-231-1/+1
| | | | | | | | | | | | | | | | This commit follows up on the previous changes from #2555 by fully dropping the `--master` option in favor of `--primary`, `--manager`, and `--controller`. Internal references have been updated as well, using the term `primary` across all instances. Note that within OCP cluster profile, 'primary' labeling and option setting still relies on the 'master' label/role reported by the environment, as that remains the term used to identify such nodes. Resolves: #2329 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Update Cirrus testing for Foreman 2.5Jake Hunsaker2021-08-231-7/+5
| | | | | | | | | | | | | Updates the Foreman tests to use new images created for Foreman 2.5. Additionally, adds an option to the prep script to prevent new Debian release suite changes from causing the prep scripts to abort the tests. For out purposes, suite changes are not important during test runs as these images are built on known versions. Resolves: #2656 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [build,tests] Include .po files for manual builds, add cirrus testJake Hunsaker2021-07-291-0/+14
| | | | | | | | | | | First, adds a MANIFEST.in file for distutils to reference, so that we can easily ensure that the .po files are included in any manual build from the git checkout. Second, add a cirrus task to ensure that basic rpm builds from the git checkout can be done by the user. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Re-order execution of component testsJake Hunsaker2021-06-301-2/+2
| | | | | | | | Re-orders the execution of component tests to have `report` tests run last so that potential system changes made during those tests do not influence other component tests. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Update CentOS Stream 8 image in GCE testingJake Hunsaker2021-06-301-1/+1
| | | | | | | Updates the image used for CentOS Stream 8 testing to the latest release for that distro. Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Update avocado commands with new test directoriesJake Hunsaker2021-06-221-2/+9
| | | | | | | | | | | | | | | | With the addition of the `cleaner_tests/` and `collect_tests/` subdirs, update the CirrusCI config to include these directories, while still avoiding the `product_tests/` directory for the "base" stageone and stagetwo tasks. Additionally, install python3-pexpect for the stagetwo tests. Currently, this is only utilized to test the use of the placeholder component for `collect`. However, in the future we'll be doing actual `collect` tests which would require this to be installed anyways. Resolves: #2573 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Update Fedora testing for F34Jake Hunsaker2021-06-071-2/+2
| | | | | | | | Updates the testing matrix for F34, dropping F32. Resolves: #2574 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Make auto_cancellation global instead of environmentalJake Hunsaker2021-05-141-4/+4
| | | | | | | | Moves auto_cancellation to a global setting, instead of environmental. Related: #2541 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Enable auto-cancellation of jobs and specify type for GCEJake Hunsaker2021-05-141-3/+6
| | | | | | | | | | | | | | | | | | | | | | Modifies the cirrus configuration to enable auto-cancellation of jobs for the master branch (it is already enabled for PR branches by default). This will prevent batch merges from kicking off a test job for each merge. While it may arise that two or more independent commits that pass testing on their own branches combine to form an unexpected failure, this possibility seems remote for sos. This is a cost saving decision - currently for each commit to master we are spinning up a minimum of 13 VMs, which can very quickly snowball if we do multiple merges in a short amount of time (which is historically how the project does merges). Second, modify the `gce_instance` fields in the cirrus config to use pre-defined machine types, as these match our current "custom" specifications already, and are cheaper to run. Resolves: #2541 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [tests] Add integration testing for ForemanJake Hunsaker2021-05-131-4/+27
| | | | | | | | | | | | | | | Adds an integration test for the upstream Foreman project. After stageone tests have passed, and if the PR has changes relevant to the Foreman plugins (or the cirrus config), launch a pre-built GCE image that has a Foreman deployment on it. Per request of the Foreman devel team, these tests will be run against both a CentOS and Debian based Foreman image. Currently, testing is performed against Foreman 2.4. Resolves: #2531 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Add testing on CentOS Stream 8Jake Hunsaker2021-05-051-10/+17
| | | | | | | | | | | | | | | As CentOS Stream now runs ahead of RHEL, instead of behind, using it as a testing distribution on GCE allows us to have more confidence on those distributions than testing on Fedora alone. As CentOS Stream does not have version locks, there is only one version to test on, rather than two as is the case with Fedora and Ubuntu. The image we build from will need to be updated more regularly however as new versions are released following RHEL minor version releases. Resolves: #2499 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Add StageTwo test taskJake Hunsaker2021-04-151-4/+25
| | | | | | | | | | Adds a new CirrusCI task to run our StageTwo tests, iff the stageone task completed successfully. Note that for this task we will only execute against the latest supported version of each distro we test. Related: #2431 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [cirrus] Update cirrus config to run avocadoJake Hunsaker2021-04-151-6/+9
| | | | | | | | Use avocado to run our test suite instead of the removed simple.sh. Related: #2365 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
* [Cirrus] Add testing via Cirrus CIJake Hunsaker2020-11-191-0/+101
Adds functional CI testing via Cirrus in conjunction with GCE. Tests can now be run on Fedora as well as Ubuntu hosts, and minor tasks can be run in containers. This will allow us to easily expand our testing base across more distributions provided those distributions can be run on GCP instances. As new releases of supported distributions are made available, the maintainers will need to build and push updated Fedora (or more generally, RH-family) images to the GCP project. Ubuntu has cloud images on GCE already, so when new releases of Ubuntu are pushed we will simply need to update .cirrus.yml to point to the new public images. Note that at the moment testing on RHEL is not enabled, though it should follow the same framework as the Fedora tests and should hopefully be coming before too long. Closes: #1885 Resolves: #2305 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>