Commit 37c6033f authored by Konstantinos Togias's avatar Konstantinos Togias
Browse files

ci: use downstream source identity without requiring Git in the slim image

parent 3f677b42
Loading
Loading
Loading
Loading
Loading
+8 −2
Changes for ci/sdk_consumer.py: 8 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -21,7 +21,10 @@ def digest(path):
def main():
    OUT.mkdir(parents=True, exist_ok=True)
    expected_srm = os.getenv("EXPECTED_SRM_SHA")
    revision = subprocess.check_output(["git", "rev-parse", "HEAD"], text=True).strip()
    revision = (
        os.getenv("CI_COMMIT_SHA")
        or subprocess.check_output(["git", "rev-parse", "HEAD"], text=True).strip()
    )
    if expected_srm and revision != expected_srm:
        raise ValueError("Consumer checkout differs from the requested SRM revision")
    sha = os.environ["SDK_SOURCE_SHA"]
@@ -72,7 +75,10 @@ def main():
    suites = ElementTree.parse(report).getroot()
    if any(int(s.get("skipped", "0")) for s in suites.iter("testsuite")):
        raise ValueError("Skipped consumer tests cannot qualify the candidate")
    revision = subprocess.check_output(["git", "rev-parse", "HEAD"], text=True).strip()
    revision = (
        os.getenv("CI_COMMIT_SHA")
        or subprocess.check_output(["git", "rev-parse", "HEAD"], text=True).strip()
    )
    (OUT / "qualification.json").write_text(
        json.dumps(
            {