|
10 | 10 | from ogr.abstract import GitProject, PullRequest |
11 | 11 | from ogr.utils import RequestResponse |
12 | 12 | from packit.config import JobConfig, PackageConfig |
13 | | -from packit.exceptions import PackitConfigException, PackitException |
14 | | -from packit.utils import commands, nested_get |
| 13 | +from packit.exceptions import PackitConfigException |
| 14 | +from packit.utils import nested_get |
15 | 15 | from packit.utils.koji_helper import KojiHelper |
16 | 16 |
|
17 | 17 | from packit_service.config import Deployment, ServiceConfig |
@@ -1525,49 +1525,15 @@ def prepare_and_send_tf_request( |
1525 | 1525 | ) |
1526 | 1526 | def _payload_installability(self, distro: str, compose: str) -> dict: |
1527 | 1527 | git_repo = "https://github.com/fedora-ci/installability-pipeline.git" |
1528 | | - git_ref = ( |
1529 | | - commands.run_command(["git", "ls-remote", git_repo, "HEAD"], output=True) |
1530 | | - .stdout.strip() |
1531 | | - .split()[0] |
1532 | | - ) |
1533 | | - |
1534 | | - if distro == "fedora-rawhide": |
1535 | | - # profile names are in "fedora-N" format |
1536 | | - # extract current rawhide version number from its candidate tag |
1537 | | - if not (candidate_tag := self.koji_helper.get_candidate_tag("rawhide")): |
1538 | | - raise PackitException(f"Failed to get test profile for {distro}") |
1539 | | - profile = re.sub(r"f(\d+)(-.*)?", r"fedora-\1", candidate_tag) |
1540 | | - else: |
1541 | | - profile = distro |
1542 | | - |
1543 | | - # installability test requires a Koji build |
1544 | | - # (it should be guaranteed by the `HasEventSuccessfulScratchBuild` checker) |
1545 | | - assert self.koji_build |
1546 | | - |
1547 | | - return { |
1548 | | - "test": { |
1549 | | - "tmt": { |
1550 | | - "url": git_repo, |
1551 | | - "ref": git_ref, |
1552 | | - }, |
1553 | | - }, |
1554 | | - "environments": [ |
1555 | | - { |
1556 | | - "arch": "x86_64", |
1557 | | - "os": {"compose": compose}, |
1558 | | - "variables": { |
1559 | | - "PROFILE_NAME": profile, |
1560 | | - "TASK_ID": self.koji_build.task_id, |
1561 | | - }, |
1562 | | - }, |
1563 | | - ], |
1564 | | - "notification": { |
1565 | | - "webhook": { |
1566 | | - "url": f"{self.api_url}/testing-farm/results", |
1567 | | - "token": self.service_config.testing_farm_secret, |
1568 | | - }, |
| 1528 | + git_ref = "master" |
| 1529 | + payload = self._get_tf_base_payload(distro, compose) |
| 1530 | + payload["test"] = { |
| 1531 | + "tmt": { |
| 1532 | + "url": git_repo, |
| 1533 | + "ref": git_ref, |
1569 | 1534 | }, |
1570 | 1535 | } |
| 1536 | + return payload |
1571 | 1537 |
|
1572 | 1538 | @implements_fedora_ci_test( |
1573 | 1539 | "rpminspect", |
|
0 commit comments