12 Commits

Author SHA1 Message Date
Aleksa Svitlica
04dc74a8cf feat(cloud): Add new cloud package set
The new cloud package set is a JSON file which has proper mapping of
source packages that Britney has to the binary packages that
cloud-test-framework expects.
2023-04-05 09:25:09 -04:00
Aleksa Svitlica
b0a569d303 feat(cloud): Add reporting
Add optional reporting of cloud tests. Cloud reporting includes the
package name, version, series and whether the test result was
pass/fail/error.

Cloud reporting requested by partners to be able to determine the amount
of packages tested.
2023-03-24 08:56:22 -04:00
Aleksa Svitlica
22f865d7ae feat(cloud): Add verdict info for passed tests
Additional verdict info is being provided by the CloudPolicy to improve
clarity on the state of cloud tests. When tests pass this will be marked
in the verdict. Also when a package is skipped because it is not in the
cloud package set this will be made clear in the verdict.
2023-03-23 16:06:44 -04:00
Łukasz 'sil2100' Zemczak
a1c4b0a78b Merge branch 'feat/cloud-policy/handle-test-errors' of git+ssh://git.launchpad.net/~aleksa-svitlica/cloudware/+git/britney2-ubuntu into sil2100/security-britney 2023-02-16 09:59:50 +01:00
Aleksa Svitlica
9246a3d583 fix(cloud): Replace PurePath with os.path.join
In Python 3.5 open does not work correctly with PurePath. Switching to
os.path.join to resolve this.
2023-02-15 12:41:14 -05:00
Łukasz 'sil2100' Zemczak
721fff7918 cloud: Add some unit tests for testing verdict store and the re-runs when only errors encountered. 2023-02-15 13:35:21 +01:00
Łukasz 'sil2100' Zemczak
85c6716af6 Set the verdict correctly too. 2023-02-14 14:49:46 +01:00
Łukasz 'sil2100' Zemczak
340b41afe1 Save state file in-between runs to mark which packages have already been tested on the given clouds. 2023-02-14 14:22:43 +01:00
Aleksa Svitlica
f21d94d3b2 CloudPolicy: Support public PPAs with fingerprints
Updates the _parse_ppas function to also allow public PPAs with
fingerprints to be provided (team/name:fingerprint).
2023-02-10 13:21:01 -05:00
Aleksa Svitlica
2bd1584c84 CloudPolicy: Refactor to use adt_ppas
Cloud policy now uses the ADT_PPAS field as the source but will only
take private PPAS due to requiring a fingerprint. If ADT_PPAS is empty
then the 'proposed' archive is used.

Adds logic to try and retrieve the install source of a package from the
logs. This is useful if multiple PPAs are defined since the policy won't
explicitly know when contains the package under test.
2023-02-01 21:23:59 -05:00
Aleksa Svitlica
c6e4e18a23 CloudPolicy: Move hardcoded values to config
Changes made
- Multiple hardcoded fields moved to config
- Series is now retrieved from options
- Pocket is now called source and retrieved from config
- Adds source type config which can be either archive or ppa
- Returns REJECTED_PERMANENTLY policy verdict when test failures or
  errors occur. Adds verdict info the the excuse.
2023-01-23 17:02:12 -05:00
Aleksa Svitlica
436626145b Add Cloud Policy
The cloud policy is currently used to test whether the proposed
migration will break networking for an image in the Azure cloud. Cloud
testing will likely increase in scope in the future.
2023-01-08 10:48:53 -05:00