← Back to team overview

canonical-hw-cert team mailing list archive

[Merge] ~pwlars/hwcert-jenkins-jobs:fix-image-test-c3link into hwcert-jenkins-jobs:master

 

Paul Larson has proposed merging ~pwlars/hwcert-jenkins-jobs:fix-image-test-c3link into hwcert-jenkins-jobs:master.

Requested reviews:
  hwcert-jenkins (hwcert-jenkins)

For more details, see:
https://code.launchpad.net/~pwlars/hwcert-jenkins-jobs/+git/hwcert-jenkins-jobs/+merge/427114

I noticed this was failing and making spammy trello cards on image testing, fixed pretty much the same way we did for sru/snap testing
-- 
Your team hwcert-jenkins is requested to review the proposed merge of ~pwlars/hwcert-jenkins-jobs:fix-image-test-c3link into hwcert-jenkins-jobs:master.
diff --git a/jobs/image-testing/run-image-testing-server.sh b/jobs/image-testing/run-image-testing-server.sh
index cfd7b83..a19e79e 100644
--- a/jobs/image-testing/run-image-testing-server.sh
+++ b/jobs/image-testing/run-image-testing-server.sh
@@ -175,8 +175,13 @@ testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts 
 tar -xzf artifacts.tgz
 
 set +x
-export C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep -a certification.canonical.com)
-echo $C3LINK > c3link
+if C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep -a certification.canonical.com/submissions/status); then
+   echo "Found successful C3 submision link"
+else
+   C3LINK="Failed to find C3 submission link"
+fi
+export C3LINK
+echo "$C3LINK" > c3link
 set -x
 
 mkdir -p artifacts
diff --git a/jobs/image-testing/run-image-testing.sh b/jobs/image-testing/run-image-testing.sh
index 8fc5af9..945aa18 100644
--- a/jobs/image-testing/run-image-testing.sh
+++ b/jobs/image-testing/run-image-testing.sh
@@ -219,8 +219,13 @@ testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts 
 tar -xzf artifacts.tgz
 
 set +x
-export C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep -a certification.canonical.com)
-echo $C3LINK > c3link
+if C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep -a certification.canonical.com/submissions/status); then
+   echo "Found successful C3 submision link"
+else
+   C3LINK="Failed to find C3 submission link"
+fi
+export C3LINK
+echo "$C3LINK" > c3link
 set -x
 
 mkdir -p artifacts

Follow ups