Add additional support for additional private test retry capabilities.

sil2100/private-runs
Łukasz 'sil2100' Zemczak 4 years ago
parent 090ccdff9e
commit 738cac82cf

@ -113,6 +113,7 @@ ADT_SWIFT_REGION =
# result logs # result logs
ADT_PRIVATE_SHARED = ADT_PRIVATE_SHARED =
ADT_PRIVATE_URL = https://autopkgtest.ubuntu.com/private-results/ ADT_PRIVATE_URL = https://autopkgtest.ubuntu.com/private-results/
ADT_PRIVATE_RETRY =
# Base URL for autopkgtest site, used for links in the excuses # Base URL for autopkgtest site, used for links in the excuses
ADT_CI_URL = https://autopkgtest.ubuntu.com/ ADT_CI_URL = https://autopkgtest.ubuntu.com/
ADT_HUGE = 20 ADT_HUGE = 20

@ -135,6 +135,7 @@ ADT_SWIFT_REGION =
# result logs # result logs
ADT_PRIVATE_SHARED = ADT_PRIVATE_SHARED =
ADT_PRIVATE_URL = ADT_PRIVATE_URL =
ADT_PRIVATE_RETRY =
# Base URL for autopkgtest site, used for links in the excuses # Base URL for autopkgtest site, used for links in the excuses
ADT_CI_URL = https://example.com/ ADT_CI_URL = https://example.com/
# Enable the huge queue for packages that trigger vast amounts of tests to not # Enable the huge queue for packages that trigger vast amounts of tests to not

@ -492,10 +492,22 @@ class AutopkgtestPolicy(BasePolicy):
if status == 'REGRESSION': if status == 'REGRESSION':
if self.options.adt_retry_url_mech == 'run_id': if self.options.adt_retry_url_mech == 'run_id':
retry_url = self.options.adt_ci_url + 'api/v1/retry/' + run_id retry_url = self.options.adt_ci_url + 'api/v1/retry/' + run_id
elif self.options.adt_private_retry:
# if a custom retry url mechanism has been given,
# use that - but instead of passing PPAs with
# sensitive credentials, we pass additional context
# that will help the backend identify what env
# needs to be used
retry_url = self.options.adt_private_retry + \
urllib.parse.urlencode([('release', self.options.series),
('arch', arch),
('package', testsrc),
('trigger', trigger),
('context', self.swift_container)])
elif not any('@' in ppa for ppa in self.options.adt_ppas): elif not any('@' in ppa for ppa in self.options.adt_ppas):
# private PPAs currently should not display a retry # otherwise private PPAs currently should not
# button until we can guarantee that the secrets # display a retry button as we can not guarantee
# will not leak # that the secrets will not leak
retry_url = self.options.adt_ci_url + 'request.cgi?' + \ retry_url = self.options.adt_ci_url + 'request.cgi?' + \
urllib.parse.urlencode([('release', self.options.series), urllib.parse.urlencode([('release', self.options.series),
('arch', arch), ('arch', arch),

@ -401,7 +401,8 @@ ADT_SWIFT_AUTH_URL =
ADT_SWIFT_TENANT = ADT_SWIFT_TENANT =
ADT_SWIFT_REGION = ADT_SWIFT_REGION =
ADT_PRIVATE_SHARED = ADT_PRIVATE_SHARED =
ADT_PRIVATE_URL = ADT_PRIVATE_URL =
ADT_PRIVATE_RETRY =
ADT_CI_URL = https://autopkgtest.ubuntu.com/ ADT_CI_URL = https://autopkgtest.ubuntu.com/
ADT_HUGE = 20 ADT_HUGE = 20
ADT_SHOW_IRRELEVANT = no ADT_SHOW_IRRELEVANT = no

Loading…
Cancel
Save