canonical-hw-cert team mailing list archive
-
canonical-hw-cert team
-
Mailing list archive
-
Message #11169
[Merge] ~pwlars/hwcert-jenkins-jobs:use-snaps-for-testflinger-and-trello-scripts into hwcert-jenkins-jobs:master
Paul Larson has proposed merging ~pwlars/hwcert-jenkins-jobs:use-snaps-for-testflinger-and-trello-scripts 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/427983
I've installed testflinger-cli and certification-dashboard-manager snaps on jenkins, and tested one of the jobs here: http://10.102.156.15:8080/job/cert-rpiz2-arm64-uc22-snapd-beta/20/console after making these changes. The job was able to run testflinger just fine, and also update the trello card status using the snap versions of these tools instead.
--
Your team hwcert-jenkins is requested to review the proposed merge of ~pwlars/hwcert-jenkins-jobs:use-snaps-for-testflinger-and-trello-scripts into hwcert-jenkins-jobs:master.
diff --git a/jobs/advocacy-snaps/advocacy-template.yaml b/jobs/advocacy-snaps/advocacy-template.yaml
index c2294a0..07fa783 100644
--- a/jobs/advocacy-snaps/advocacy-template.yaml
+++ b/jobs/advocacy-snaps/advocacy-template.yaml
@@ -43,8 +43,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "version_signature: Ubuntu (.*)-generic"
regexp-for-failed: "version_signature: Ubuntu (.*)-generic"
@@ -175,8 +174,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "version_signature: Ubuntu (.*)-generic"
regexp-for-failed: "version_signature: Ubuntu (.*)-generic"
diff --git a/jobs/advocacy-snaps/run-advocacy-snaps.sh b/jobs/advocacy-snaps/run-advocacy-snaps.sh
index 1d049de..a8343a2 100644
--- a/jobs/advocacy-snaps/run-advocacy-snaps.sh
+++ b/jobs/advocacy-snaps/run-advocacy-snaps.sh
@@ -137,7 +137,7 @@ cat > job.yaml <<EOF
_run DISPLAY=:0 XDG_SESSION_TYPE=x11 /snap/bin/{checkbox_snap}.{launcher}
EXITCODE=\$?
# find needed reports and put them into artifacts which
- # will be downloaded over testflinger-cli artifacts later
+ # will be downloaded over testflinger artifacts later
_run "find /home/ubuntu/.local/share/checkbox-ng/ -name 'submission_*.junit.xml' -exec mv {{{{}}}} junit.xml \;"
_run "find /home/ubuntu/.local/share/checkbox-ng/ -name 'submission_*.html' -exec mv {{{{}}}} submission.html \;"
_run "find /home/ubuntu/.local/share/checkbox-ng/ -name 'submission_*.tar.xz' -exec mv {{{{}}}} submission.tar.xz \;"
@@ -161,31 +161,28 @@ cat <<EOF >build-env.sh
{build_env}
EOF
. build-env.sh
-rm -rf hwcert-jenkins-tools
-git clone https://git.launchpad.net/hwcert-jenkins-tools
-rm -rf testflinger-cli
-git clone https://git.launchpad.net/testflinger-cli
+git -C hwcert-jenkins-tools pull -q || (rm -rf hwcert-jenkins-tools && git clone -q https://git.launchpad.net/hwcert-jenkins-tools)
+# We still need a virtualenv on this project because of influxdb
virtualenv -q -p python3 env
. env/bin/activate
-(cd testflinger-cli && ./setup.py install)
pip install pyyaml
pip install influxdb
pip install requests
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
cp artifacts/submission.json submission.json.previous.$DISTRO_IMAGE || /bin/true
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
set +x
-export C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep certification.canonical.com)
+export C3LINK=$(testflinger results ${{JOB_ID}} |jq -r .test_output|grep certification.canonical.com)
echo $C3LINK > c3link
set -x
@@ -198,8 +195,8 @@ if [ -f artifacts/submission.html ]; then
else
# If there was no submission html, we probably didn't complete
# Send some output from testflinger to provide some useful feedback
- testflinger-cli results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
- testflinger-cli results ${{JOB_ID}} | jq -r .test_output > test-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .test_output > test-output.txt
hwcert-jenkins-tools/mailtool -t "{email}" -s "[TESTFLINGER] {name}" -a provision-output.txt -a test-output.txt artifacts/summary
fi
if [ -f artifacts/submission.json ]; then
diff --git a/jobs/chromium/chromium-template.yaml b/jobs/chromium/chromium-template.yaml
index f3f7c75..81d1c5a 100644
--- a/jobs/chromium/chromium-template.yaml
+++ b/jobs/chromium/chromium-template.yaml
@@ -23,8 +23,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "^Chromium Version: (.*)"
regexp-for-failed: "^Chromium Version: (.*)"
diff --git a/jobs/chromium/run-chromium.sh b/jobs/chromium/run-chromium.sh
index 6e28db4..8f44bc1 100644
--- a/jobs/chromium/run-chromium.sh
+++ b/jobs/chromium/run-chromium.sh
@@ -43,22 +43,18 @@ cat <<EOF >build-env.sh
{build_env}
EOF
. build-env.sh
-git -C testflinger-cli pull -q || git clone -q https://git.launchpad.net/testflinger-cli
-virtualenv -q -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py -q install)
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
[[ -z $TEST_STATUS ]] && TEST_STATUS=1
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
mkdir -p artifacts
diff --git a/jobs/desktop-snaps/desktop-snaps-template.yaml b/jobs/desktop-snaps/desktop-snaps-template.yaml
index bef009f..d39b0a0 100644
--- a/jobs/desktop-snaps/desktop-snaps-template.yaml
+++ b/jobs/desktop-snaps/desktop-snaps-template.yaml
@@ -41,8 +41,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "version_signature: Ubuntu (.*)-generic"
regexp-for-failed: "version_signature: Ubuntu (.*)-generic"
diff --git a/jobs/desktop-snaps/run-desktop-snaps.sh b/jobs/desktop-snaps/run-desktop-snaps.sh
index 3dc204f..d0cbd2a 100644
--- a/jobs/desktop-snaps/run-desktop-snaps.sh
+++ b/jobs/desktop-snaps/run-desktop-snaps.sh
@@ -96,7 +96,7 @@ cat > job.yaml <<EOF
_run DISPLAY=:0 /snap/bin/{checkbox_snap}.{launcher}
EXITCODE=\$?
# find needed reports and put them into artifacts which
- # will be downloaded over testflinger-cli artifacts later
+ # will be downloaded over testflinger artifacts later
_run "find /home/ubuntu/.local/share/checkbox-ng/ -name 'submission_*.junit.xml' -exec mv {{{{}}}} junit.xml \;"
_run "find /home/ubuntu/.local/share/checkbox-ng/ -name 'submission_*.html' -exec mv {{{{}}}} submission.html \;"
_run "find /home/ubuntu/.local/share/checkbox-ng/ -name 'submission_*.tar.xz' -exec mv {{{{}}}} submission.tar.xz \;"
@@ -117,28 +117,22 @@ cat <<EOF >build-env.sh
{build_env}
EOF
. build-env.sh
-rm -rf hwcert-jenkins-tools
-git clone https://git.launchpad.net/hwcert-jenkins-tools
-rm -rf testflinger-cli
-git clone https://git.launchpad.net/testflinger-cli
-virtualenv -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py install)
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+git -C hwcert-jenkins-tools pull -q || (rm -rf hwcert-jenkins-tools && git clone -q https://git.launchpad.net/hwcert-jenkins-tools)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
cp artifacts/submission.json submission.json.previous.$DISTRO_IMAGE || /bin/true
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
set +x
-export C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep certification.canonical.com)
+export C3LINK=$(testflinger results ${{JOB_ID}} |jq -r .test_output|grep certification.canonical.com)
echo $C3LINK > c3link
set -x
@@ -151,8 +145,8 @@ if [ -f artifacts/submission.html ]; then
else
# If there was no submission html, we probably didn't complete
# Send some output from testflinger to provide some useful feedback
- testflinger-cli results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
- testflinger-cli results ${{JOB_ID}} | jq -r .test_output > test-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .test_output > test-output.txt
hwcert-jenkins-tools/mailtool -t "{email}" -s "[TESTFLINGER] {name}" -a provision-output.txt -a test-output.txt artifacts/summary
fi
if [ -f artifacts/submission.json ]; then
diff --git a/jobs/dgx/dgx-template.yaml b/jobs/dgx/dgx-template.yaml
index 670ea53..2e0f2ea 100644
--- a/jobs/dgx/dgx-template.yaml
+++ b/jobs/dgx/dgx-template.yaml
@@ -60,8 +60,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "version_signature: Ubuntu (.*)-generic"
regexp-for-failed: "version_signature: Ubuntu (.*)-generic"
diff --git a/jobs/dgx/run-dgx.sh b/jobs/dgx/run-dgx.sh
index 0902c6f..de49412 100644
--- a/jobs/dgx/run-dgx.sh
+++ b/jobs/dgx/run-dgx.sh
@@ -79,7 +79,7 @@ cat > job.yaml <<EOF
EXITCODE=\$?
# find needed reports and put them into artifacts which
- # will be downloaded over testflinger-cli artifacts later
+ # will be downloaded over testflinger artifacts later
_run "find /home/ubuntu/.local/share/checkbox-ng/ -name 'submission_*.junit.xml' -exec mv {{{{}}}} junit.xml \;"
_run "find /home/ubuntu/.local/share/checkbox-ng/ -name 'submission_*.tar.xz' -exec mv {{{{}}}} submission.tar.xz \;"
_run tar -xf submission.tar.xz submission.json
@@ -101,29 +101,21 @@ EOF
rm -rf hwcert-jenkins-tools
git clone https://git.launchpad.net/hwcert-jenkins-tools
git -C hwcert-data pull -q || git clone -q git+ssh://ce-certification-qa@xxxxxxxxxxxxxxxxx/~canonical-hw-cert/hwcert-jenkins-jobs/+git/hwcert-data
-git -C py-trello pull -q || git clone -q --branch fix-empty-completed-checklist --depth 1 https://github.com/plars/py-trello
-rm -rf testflinger-cli
-git -C testflinger-cli pull -q || git clone -q https://git.launchpad.net/testflinger-cli
-virtualenv -q -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py install)
-(cd py-trello && ./setup.py -q install)
-
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
set +x
-export C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep certification.canonical.com)
+export C3LINK=$(testflinger results ${{JOB_ID}} |jq -r .test_output|grep certification.canonical.com)
echo $C3LINK > c3link
set -x
@@ -137,14 +129,14 @@ if [ -f artifacts/submission.html ]; then
else
# If there was no submission html, we probably didn't complete
# Send some output from testflinger to provide some useful feedback
- testflinger-cli results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
- testflinger-cli results ${{JOB_ID}} | jq -r .test_output > test-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .test_output > test-output.txt
hwcert-jenkins-tools/mailtool -t "{email}" -s "[TESTFLINGER] {name}" -a provision-output.txt -a test-output.txt artifacts/summary
fi
if [ -f artifacts/submission.json ]; then
cat artifacts/submission.json |jq -r '. | {{results: .results}}' > results.json
curl "https://testflinger-revcache.canonical.com/v1/results/$JOB_NAME" -X POST --header "Content-Type: application/json" --data @results.json
fi
-flock /tmp/TRELLO-UPDATE.LOCK hwcert-jenkins-tools/trello-board-updater-desktop.py --config hwcert-data/debs.yaml -a {arch} -n {name} -k {kernel-to-check} -s {series} -t {srutype} -q {queue} artifacts/raw_summary
+flock /tmp/TRELLO-UPDATE.LOCK certification-dashboard-manager.deb-board-updater --config hwcert-data/debs.yaml -a {arch} -n {name} -k {kernel-to-check} -s {series} -t {srutype} -q {queue} artifacts/raw_summary
echo "Test exit status: ${{TEST_STATUS}}"
exit $EXITCODE
diff --git a/jobs/image-testing/image-testing-desktop.yaml b/jobs/image-testing/image-testing-desktop.yaml
index 98d3aac..7be2808 100644
--- a/jobs/image-testing/image-testing-desktop.yaml
+++ b/jobs/image-testing/image-testing-desktop.yaml
@@ -64,8 +64,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "IMAGE_BUILD_ID: (.*)"
regexp-for-failed: "IMAGE_BUILD_ID: (.*)"
diff --git a/jobs/image-testing/image-testing-server.yaml b/jobs/image-testing/image-testing-server.yaml
index 0397b22..59aad57 100644
--- a/jobs/image-testing/image-testing-server.yaml
+++ b/jobs/image-testing/image-testing-server.yaml
@@ -68,8 +68,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "IMAGE_BUILD_ID: (.*)"
regexp-for-failed: "IMAGE_BUILD_ID: (.*)"
diff --git a/jobs/image-testing/image-testing.yaml b/jobs/image-testing/image-testing.yaml
index 1fca1dd..d690899 100644
--- a/jobs/image-testing/image-testing.yaml
+++ b/jobs/image-testing/image-testing.yaml
@@ -66,8 +66,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "IMAGE_BUILD_ID: (.*)"
regexp-for-failed: "IMAGE_BUILD_ID: (.*)"
diff --git a/jobs/image-testing/run-image-testing-server.sh b/jobs/image-testing/run-image-testing-server.sh
index a19e79e..a230be8 100644
--- a/jobs/image-testing/run-image-testing-server.sh
+++ b/jobs/image-testing/run-image-testing-server.sh
@@ -148,13 +148,7 @@ cat <<EOF >build-env.sh
EOF
. build-env.sh
git -C hwcert-jenkins-tools pull -q || (rm -rf hwcert-jenkins-tools && git clone -q https://git.launchpad.net/hwcert-jenkins-tools)
-git -C testflinger-cli pull -q || git clone -q https://git.launchpad.net/testflinger-cli
-git -C py-trello pull -q || git clone -q --branch fix-empty-completed-checklist --depth 1 https://github.com/plars/py-trello
git -C hwcert-data pull -q || git clone -q git+ssh://ce-certification-qa@xxxxxxxxxxxxxxxxx/~canonical-hw-cert/hwcert-jenkins-jobs/+git/hwcert-data
-virtualenv -q -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py -q install)
-(cd py-trello && ./setup.py -q install)
BUILD_ID=$(curl -s {image_base_url}/.publish_info |grep {image_file} |cut -d' ' -f 2)
if [ -z "$BUILD_ID" ]; then
@@ -162,20 +156,20 @@ if [ -z "$BUILD_ID" ]; then
fi
echo IMAGE_BUILD_ID: $BUILD_ID
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
set +x
-if C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep -a certification.canonical.com/submissions/status); then
+if C3LINK=$(testflinger 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"
@@ -195,14 +189,14 @@ if [ -f artifacts/submission.html ]; then
else
# If there was no submission html, we probably didn't complete
# Send some output from testflinger to provide some useful feedback
- testflinger-cli results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
- testflinger-cli results ${{JOB_ID}} | jq -r .test_output > test-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .test_output > test-output.txt
hwcert-jenkins-tools/mailtool -t {email} -s "[TESTFLINGER] {name} image test results -a provision-output.txt -a test-output.txt artifacts/summary
fi
if [ -f artifacts/submission.json ]; then
cat artifacts/submission.json |jq -r '. | {{results: .results}}' > results.json
curl -s "https://testflinger-revcache.canonical.com/v1/results/$JOB_NAME" -X POST --header "Content-Type: application/json" --data @results.json
fi
-flock /tmp/TRELLO-IMAGE-UPDATE.LOCK hwcert-jenkins-tools/trello-board-updater-image-testing.py -n {name} -i {image_file} -c {image_channel} -v $BUILD_ID artifacts/summary
+flock /tmp/TRELLO-IMAGE-UPDATE.LOCK certification-dashboard-manager.image-board-updater -n {name} -i {image_file} -c {image_channel} -v $BUILD_ID artifacts/summary
echo "Test exit status: ${{TEST_STATUS}}"
exit $EXITCODE
diff --git a/jobs/image-testing/run-image-testing.sh b/jobs/image-testing/run-image-testing.sh
index 945aa18..6661d04 100644
--- a/jobs/image-testing/run-image-testing.sh
+++ b/jobs/image-testing/run-image-testing.sh
@@ -192,13 +192,7 @@ cat <<EOF >build-env.sh
EOF
. build-env.sh
git -C hwcert-jenkins-tools pull -q || (rm -rf hwcert-jenkins-tools && git clone -q https://git.launchpad.net/hwcert-jenkins-tools)
-git -C testflinger-cli pull -q || git clone -q https://git.launchpad.net/testflinger-cli
-git -C py-trello pull -q || git clone -q --branch fix-empty-completed-checklist --depth 1 https://github.com/plars/py-trello
git -C hwcert-data pull -q || git clone -q git+ssh://ce-certification-qa@xxxxxxxxxxxxxxxxx/~canonical-hw-cert/hwcert-jenkins-jobs/+git/hwcert-data
-virtualenv -q -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py -q install)
-(cd py-trello && ./setup.py -q install)
BUILD_ID=$(curl -s {image_base_url}/.publish_info |grep {image_file} |cut -d' ' -f 2)
if [ -z "$BUILD_ID" ]; then
@@ -206,20 +200,20 @@ if [ -z "$BUILD_ID" ]; then
fi
echo IMAGE_BUILD_ID: $BUILD_ID
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
set +x
-if C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep -a certification.canonical.com/submissions/status); then
+if C3LINK=$(testflinger 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"
@@ -239,14 +233,14 @@ if [ -f artifacts/submission.html ]; then
else
# If there was no submission html, we probably didn't complete
# Send some output from testflinger to provide some useful feedback
- testflinger-cli results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
- testflinger-cli results ${{JOB_ID}} | jq -r .test_output > test-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .test_output > test-output.txt
hwcert-jenkins-tools/mailtool -t {email} -s "[TF_IMAGE] {device}-{image-type} ($BUILD_ID) image test results" -a provision-output.txt -a test-output.txt artifacts/summary
fi
if [ -f artifacts/submission.json ]; then
cat artifacts/submission.json |jq -r '. | {{results: .results}}' > results.json
curl -s "https://testflinger-revcache.canonical.com/v1/results/$JOB_NAME" -X POST --header "Content-Type: application/json" --data @results.json
fi
-flock /tmp/TRELLO-IMAGE-UPDATE.LOCK hwcert-jenkins-tools/trello-board-updater-image-testing.py -n {device}-{image-type} -i {image_file} -c {image_channel} -v $BUILD_ID artifacts/summary
+flock /tmp/TRELLO-IMAGE-UPDATE.LOCK certification-dashboard-manager.image-board-updater -n {device}-{image-type} -i {image_file} -c {image_channel} -v $BUILD_ID artifacts/summary
echo "Test exit status: ${{TEST_STATUS}}"
exit $EXITCODE
diff --git a/jobs/infrastructure/trello/trello-manager.sh b/jobs/infrastructure/trello/trello-manager.sh
index d2ce4c8..278c0b0 100644
--- a/jobs/infrastructure/trello/trello-manager.sh
+++ b/jobs/infrastructure/trello/trello-manager.sh
@@ -24,21 +24,15 @@ EOF
. build-env.sh
git -C hwcert-jenkins-tools pull || (rm -rf hwcert-jenkins-tools && git clone https://git.launchpad.net/hwcert-jenkins-tools)
git -C hwcert-data pull || git clone git+ssh://ce-certification-qa@xxxxxxxxxxxxxxxxx/~canonical-hw-cert/hwcert-jenkins-jobs/+git/hwcert-data
-git -C py-trello pull || git clone --branch fix-empty-completed-checklist --depth 1 https://github.com/plars/py-trello
-virtualenv -p python3 --system-site-packages env
-. env/bin/activate
-(cd py-trello && ./setup.py install)
-pip install pyyaml
-pip install requests
# This marks kernel sru bugs complete for snaps that are marked complete in trello
-hwcert-jenkins-tools/trello-sru-bug-manager.py --project kernel-sru-workflow
+certification-dashboard-manager.sru-bug-manager --project kernel-sru-workflow
# This migrates trello cards to the appropriate lane based on snap status
-hwcert-jenkins-tools/trello-board-manager.py hwcert-data/snaps.yaml
+certification-dashboard-manager.snap-board-manager hwcert-data/snaps.yaml
# This marks kernel sru bugs complete for kernel debs that are marked complete in trello
export TRELLO_BOARD="$TRELLO_BOARD_KERNEL_DEB"
-hwcert-jenkins-tools/trello-sru-bug-manager.py --project kernel-sru-workflow --deb
+certification-dashboard-manager.sru-bug-manager --project kernel-sru-workflow --deb
# This migrates trello cards to the appropriate lane based on kernel deb status
-hwcert-jenkins-tools/trello-board-manager-desktop.py hwcert-data/debs.yaml
+certification-dashboard-manager.deb-board-manager hwcert-data/debs.yaml
diff --git a/jobs/mir/mir-core-template.yaml b/jobs/mir/mir-core-template.yaml
index d96ea02..bf5dd35 100644
--- a/jobs/mir/mir-core-template.yaml
+++ b/jobs/mir/mir-core-template.yaml
@@ -30,8 +30,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "{snap} Version: (.*)"
regexp-for-failed: "{snap} Version: (.*)"
diff --git a/jobs/mir/mir-template.yaml b/jobs/mir/mir-template.yaml
index ae84a08..c92b53c 100644
--- a/jobs/mir/mir-template.yaml
+++ b/jobs/mir/mir-template.yaml
@@ -37,8 +37,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "{snap} Version: (.*)"
regexp-for-failed: "{snap} Version: (.*)"
diff --git a/jobs/mir/run-core-mir.sh b/jobs/mir/run-core-mir.sh
index b172a90..66b5c6f 100644
--- a/jobs/mir/run-core-mir.sh
+++ b/jobs/mir/run-core-mir.sh
@@ -149,20 +149,16 @@ cat <<EOF >build-env.sh
EOF
. build-env.sh
git -C hwcert-jenkins-tools pull -q || (rm -rf hwcert-jenkins-tools && git clone -q https://git.launchpad.net/hwcert-jenkins-tools)
-git -C testflinger-cli pull -q || git clone -q https://git.launchpad.net/testflinger-cli
-virtualenv -q -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py -q install)
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
mkdir -p artifacts
diff --git a/jobs/mir/run-mir.sh b/jobs/mir/run-mir.sh
index 7b1e7f4..461522e 100644
--- a/jobs/mir/run-mir.sh
+++ b/jobs/mir/run-mir.sh
@@ -172,26 +172,22 @@ cat <<EOF >build-env.sh
{build_env}
EOF
. build-env.sh
-git -C testflinger-cli pull -q || git clone -q https://git.launchpad.net/testflinger-cli
-virtualenv -q -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py -q install)
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
[ -n $TEST_STATUS ] && TEST_STATUS=1
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
set +x
-export C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep certification.canonical.com)
+export C3LINK=$(testflinger results ${{JOB_ID}} |jq -r .test_output|grep certification.canonical.com)
echo $C3LINK > c3link
set -x
diff --git a/jobs/snap-testing/generic-snappy-testflinger-candidate-snaps.yaml b/jobs/snap-testing/generic-snappy-testflinger-candidate-snaps.yaml
index 7ff2bb5..78e552c 100644
--- a/jobs/snap-testing/generic-snappy-testflinger-candidate-snaps.yaml
+++ b/jobs/snap-testing/generic-snappy-testflinger-candidate-snaps.yaml
@@ -87,8 +87,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "{snap} Version: (.*)"
regexp-for-failed: "{snap} Version: (.*)"
diff --git a/jobs/snap-testing/list-bootstrapped-templates.yaml b/jobs/snap-testing/list-bootstrapped-templates.yaml
index 225d120..27a50e9 100644
--- a/jobs/snap-testing/list-bootstrapped-templates.yaml
+++ b/jobs/snap-testing/list-bootstrapped-templates.yaml
@@ -47,8 +47,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "{snap} Version: (.*)"
regexp-for-failed: "{snap} Version: (.*)"
diff --git a/jobs/snap-testing/run-cdts-list-bootstrapped.sh b/jobs/snap-testing/run-cdts-list-bootstrapped.sh
index 2464d89..2320853 100644
--- a/jobs/snap-testing/run-cdts-list-bootstrapped.sh
+++ b/jobs/snap-testing/run-cdts-list-bootstrapped.sh
@@ -180,28 +180,22 @@ EOF
. build-env.sh
git -C hwcert-jenkins-tools pull -q || (rm -rf hwcert-jenkins-tools && git clone -q https://git.launchpad.net/hwcert-jenkins-tools)
-git -C testflinger-cli pull -q || git clone -q https://git.launchpad.net/testflinger-cli
-git -C py-trello pull -q || git clone -q --branch fix-empty-completed-checklist --depth 1 https://github.com/plars/py-trello
git -C hwcert-data pull -q || git clone -q git+ssh://ce-certification-qa@xxxxxxxxxxxxxxxxx/~canonical-hw-cert/hwcert-jenkins-jobs/+git/hwcert-data
-virtualenv -q -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py -q develop)
-(cd py-trello && ./setup.py -q develop)
-flock /tmp/TRELLO-UPDATE.LOCK hwcert-jenkins-tools/trello-board-updater.py --config hwcert-data/snaps.yaml -a {arch} -b {store} -n {name} -s {snap} -v ${{VERSION}} -r ${{REV}} -t __track__{track} -c {channel} --cardonly /dev/null
+flock certification-dashboard-manager.snap-board-updater --config hwcert-data/snaps.yaml -a {arch} -b {store} -n {name} -s {snap} -v ${{VERSION}} -r ${{REV}} -t __track__{track} -c {channel} --cardonly /dev/null
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} | jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} | jq -r .test_status)
rm -rf artifacts*
# Get artifacts with a retry after a delay if first attempt fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
mkdir -p artifacts
@@ -226,7 +220,7 @@ cat artifacts/snaplist.txt >> artifacts/summary
hwcert-jenkins-tools/mailtool -t {email} -s "[TESTFLINGER] {name} {snap} (${{REV}}) {track}/{channel}" artifacts/summary
-flock /tmp/TRELLO-UPDATE.LOCK hwcert-jenkins-tools/trello-board-updater.py --config hwcert-data/snaps.yaml -a {arch} -b {store} -n {name} -s {snap} -v ${{VERSION}} -r ${{REV}} -t __track__{track} -c {channel} artifacts/raw_summary
+flock certification-dashboard-manager.snap-board-updater --config hwcert-data/snaps.yaml -a {arch} -b {store} -n {name} -s {snap} -v ${{VERSION}} -r ${{REV}} -t __track__{track} -c {channel} artifacts/raw_summary
echo "Test exit status: ${{TEST_STATUS}}"
exit $TEST_STATUS
diff --git a/jobs/snap-testing/run-checkbox-snappy.sh b/jobs/snap-testing/run-checkbox-snappy.sh
index f6e06cc..2c0f776 100644
--- a/jobs/snap-testing/run-checkbox-snappy.sh
+++ b/jobs/snap-testing/run-checkbox-snappy.sh
@@ -339,28 +339,22 @@ cat <<EOF >build-env.sh
EOF
. build-env.sh
git -C hwcert-jenkins-tools pull -q || (rm -rf hwcert-jenkins-tools && git clone -q https://git.launchpad.net/hwcert-jenkins-tools)
-git -C testflinger-cli pull -q || git clone -q https://git.launchpad.net/testflinger-cli
-git -C py-trello pull -q || git clone -q --branch fix-empty-completed-checklist --depth 1 https://github.com/plars/py-trello
git -C hwcert-data pull -q || git clone -q git+ssh://ce-certification-qa@xxxxxxxxxxxxxxxxx/~canonical-hw-cert/hwcert-jenkins-jobs/+git/hwcert-data
-virtualenv -q -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py -q develop)
-(cd py-trello && ./setup.py -q develop)
-flock /tmp/TRELLO-UPDATE.LOCK hwcert-jenkins-tools/trello-board-updater.py --config hwcert-data/snaps.yaml -a {arch} -b {store} -n {name} -s {snap} -v ${{VERSION}} -r ${{REV}} -t __track__{track} -c {channel} -e {card_email} --cardonly /dev/null
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+flock /tmp/TRELLO-UPDATE.LOCK certification-dashboard-manager.snap-board-updater --config hwcert-data/snaps.yaml -a {arch} -b {store} -n {name} -s {snap} -v ${{VERSION}} -r ${{REV}} -t __track__{track} -c {channel} --cardonly /dev/null
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
set +x
-if C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep -a certification.canonical.com/submissions/status); then
+if C3LINK=$(testflinger 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"
@@ -380,15 +374,15 @@ if [ -f artifacts/submission.html ]; then
else
# If there was no submission html, we probably didn't complete
# Send some output from testflinger to provide some useful feedback
- testflinger-cli results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
- testflinger-cli results ${{JOB_ID}} | jq -r .test_output > test-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .test_output > test-output.txt
hwcert-jenkins-tools/mailtool -t {email} -s "[TESTFLINGER] {name} {snap} (${{REV}}) {track}/{channel}" -a provision-output.txt -a test-output.txt artifacts/summary
fi
if [ -f artifacts/submission.json ]; then
cat artifacts/submission.json |jq -r '. | {{results: .results}}' > results.json
curl -s "https://testflinger-revcache.canonical.com/v1/results/$JOB_NAME" -X POST --header "Content-Type: application/json" --data @results.json
fi
-flock /tmp/TRELLO-UPDATE.LOCK hwcert-jenkins-tools/trello-board-updater.py --config hwcert-data/snaps.yaml -a {arch} -b {store} -n {name} -s {snap} -v ${{VERSION}} -r ${{REV}} -t __track__{track} -c {channel} -e {card_email} artifacts/raw_summary
+flock /tmp/TRELLO-UPDATE.LOCK certification-dashboard-manager.snap-board-updater --config hwcert-data/snaps.yaml -a {arch} -b {store} -n {name} -s {snap} -v ${{VERSION}} -r ${{REV}} -t __track__{track} -c {channel} artifacts/raw_summary
if [ "{influx_reporting}" == "True" ]; then
pip3 install influxdb
diff --git a/jobs/spread/run-spread.sh b/jobs/spread/run-spread.sh
index c6b0cf0..0c1b379 100644
--- a/jobs/spread/run-spread.sh
+++ b/jobs/spread/run-spread.sh
@@ -121,24 +121,18 @@ EOF
rm -rf env
git -C hwcert-jenkins-tools pull || (rm -rf hwcert-jenkins-tools && git clone https://git.launchpad.net/hwcert-jenkins-tools)
-git -C testflinger-cli pull || git clone https://git.launchpad.net/testflinger-cli
-git -C py-trello pull || git clone --branch fix-empty-completed-checklist --depth 1 https://github.com/plars/py-trello
git -C hwcert-data pull || git clone git+ssh://ce-certification-qa@xxxxxxxxxxxxxxxxx/~canonical-hw-cert/hwcert-jenkins-jobs/+git/hwcert-data
-virtualenv -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py install)
-(cd py-trello && ./setup.py install)
pip install junit-xml
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
hwcert-jenkins-tools/convert-spread-junit -j artifacts/spread.json artifacts/spread.output > artifacts/spread.xml
echo Jenkins build details: ${{BUILD_URL}} > artifacts/summary
@@ -151,6 +145,6 @@ hwcert-jenkins-tools/mailtool -t {email} -s "[TESTFLINGER-SPREAD] {name} {snap}
if [ -f artifacts/spread.json ]; then
curl -s "https://testflinger-revcache.canonical.com/v1/results/$JOB_NAME" -X POST --header "Content-Type: application/json" --data @artifacts/spread.json
fi
-flock /tmp/TRELLO-UPDATE.LOCK hwcert-jenkins-tools/trello-board-updater.py --config hwcert-data/snaps.yaml -a {arch} -b {store} -n {name} -s {snap} -v ${{VERSION}} -r ${{REV}} -t __track__{track} -c {channel} -e {card_email} artifacts/raw_summary
+flock /tmp/TRELLO-UPDATE.LOCK certification-dashboard-manager.snap-board-updater --config hwcert-data/snaps.yaml -a {arch} -b {store} -n {name} -s {snap} -v ${{VERSION}} -r ${{REV}} -t __track__{track} -c {channel} artifacts/raw_summary
exit $EXITCODE
diff --git a/jobs/spread/spread-test-template.yaml b/jobs/spread/spread-test-template.yaml
index 6546ca7..9684a82 100644
--- a/jobs/spread/spread-test-template.yaml
+++ b/jobs/spread/spread-test-template.yaml
@@ -47,8 +47,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "{snap} Version: (.*)"
regexp-for-failed: "{snap} Version: (.*)"
diff --git a/jobs/sru/run-sru.sh b/jobs/sru/run-sru.sh
index 31da338..e6c8a22 100644
--- a/jobs/sru/run-sru.sh
+++ b/jobs/sru/run-sru.sh
@@ -251,17 +251,8 @@ cat <<EOF >build-env.sh
EOF
. build-env.sh
-rm -rf hwcert-jenkins-tools
-git clone https://git.launchpad.net/hwcert-jenkins-tools
+git -C hwcert-jenkins-tools pull -q || (rm -rf hwcert-jenkins-tools && git clone -q https://git.launchpad.net/hwcert-jenkins-tools)
git -C hwcert-data pull -q || git clone -q git+ssh://ce-certification-qa@xxxxxxxxxxxxxxxxx/~canonical-hw-cert/hwcert-jenkins-jobs/+git/hwcert-data
-git -C py-trello pull -q || git clone -q --branch fix-empty-completed-checklist --depth 1 https://github.com/plars/py-trello
-rm -rf testflinger-cli
-git -C testflinger-cli pull -q || git clone -q https://git.launchpad.net/testflinger-cli
-
-virtualenv -q -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py -q install)
-(cd py-trello && ./setup.py -q install)
# Create a card if this is a proper SRU run
if [ "{trello_reporting}" == "True" ]; then
@@ -272,20 +263,20 @@ if [[ "{srutype}" =~ "raspi" ]] || [[ "{series}" == "impish" ]] || [[ "{series}"
fi
fi
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
set +x
-if C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep -a certification.canonical.com/submissions/status); then
+if C3LINK=$(testflinger 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"
@@ -304,7 +295,7 @@ if [ "{results_email}" == "True" ]; then
if [ -f artifacts/submission.html ]; then
hwcert-jenkins-tools/mailtool -t {email} -s "[{results_email_tag}] {system-id} {kernel-to-check} {series}" -a artifacts/submission.html artifacts/summary
else
- testflinger-cli results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
+ testflinger results ${{JOB_ID}} | jq -r .provision_output > provision-output.txt
hwcert-jenkins-tools/mailtool -t {email} -s "[{results_email_tag}] {system-id} {kernel-to-check} {series}" -a provision-output.txt artifacts/summary
fi
fi
@@ -317,9 +308,9 @@ fi
# Add a result to the card if this is proper sru run
if [ "{trello_reporting}" == "True" ]; then
if [[ "{srutype}" =~ "raspi" ]] || [[ "{series}" == "impish" ]] || [[ "{series}" == "jammy" ]]; then
- flock /tmp/TRELLO-UPDATE.LOCK hwcert-jenkins-tools/trello-board-updater-desktop.py --config hwcert-data/debs.yaml -a {arch} -n {system-id} -k {kernel-to-check} -s {series} -t {srutype} artifacts/raw_summary
+ flock certification-dashboard-manager.deb-board-updater --config hwcert-data/debs.yaml -a {arch} -n {system-id} -k {kernel-to-check} -s {series} -t {srutype} artifacts/raw_summary
else
- flock /tmp/TRELLO-UPDATE.LOCK hwcert-jenkins-tools/trello-board-updater-desktop.py --config hwcert-data/debs.yaml -a {arch} -n {name} -k {kernel-to-check} -s {series} -t {srutype} artifacts/raw_summary
+ flock certification-dashboard-manager.deb-board-updater --config hwcert-data/debs.yaml -a {arch} -n {name} -k {kernel-to-check} -s {series} -t {srutype} artifacts/raw_summary
fi
fi
diff --git a/jobs/sru/sru-template.yaml b/jobs/sru/sru-template.yaml
index 19e3b92..8e13c0e 100644
--- a/jobs/sru/sru-template.yaml
+++ b/jobs/sru/sru-template.yaml
@@ -134,8 +134,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "version_signature: Ubuntu (.*-.*) "
regexp-for-failed: "version_signature: Ubuntu (.*-.*) "
diff --git a/jobs/upgrade-testing/run-upgrade-testing.sh b/jobs/upgrade-testing/run-upgrade-testing.sh
index 1b19bbc..6f9d05e 100644
--- a/jobs/upgrade-testing/run-upgrade-testing.sh
+++ b/jobs/upgrade-testing/run-upgrade-testing.sh
@@ -151,7 +151,7 @@ cat > job.yaml <<EOF
_run sudo chown ubuntu -R /home/ubuntu/.local/share/checkbox-ng/
# find needed reports and put them into artifacts which
- # will be downloaded over testflinger-cli artifacts later
+ # will be downloaded over testflinger artifacts later
find /home/ubuntu/ -name 'submission_*.junit.xml' -exec mv {{{{}}}} artifacts/junit.xml \;
find /home/ubuntu/ -name 'submission_*.tar.xz' -exec mv {{{{}}}} artifacts/submission.tar.xz \;
tar -xf artifacts/submission.tar.xz submission.json
@@ -165,34 +165,28 @@ cat <<EOF >build-env.sh
{build_env}
EOF
. build-env.sh
-rm -rf hwcert-jenkins-tools
-git clone https://git.launchpad.net/hwcert-jenkins-tools
-rm -rf testflinger-cli
-git clone https://git.launchpad.net/testflinger-cli
-virtualenv -p python3 env
-. env/bin/activate
-(cd testflinger-cli && ./setup.py install)
+git -C hwcert-jenkins-tools pull -q || (rm -rf hwcert-jenkins-tools && git clone -q https://git.launchpad.net/hwcert-jenkins-tools)
# we often test different desktop images on the same platform
# so we need an identifier to find the correct associated previous submission
DISTRO_IMAGE=`grep distro job.yaml | awk -F : {{'print $2'}} | sed 's/^ *//g'`
echo "Testing image: $DISTRO_IMAGE"
-JOB_ID=$(testflinger-cli submit -q job.yaml)
+JOB_ID=$(testflinger submit -q job.yaml)
echo "JOB_ID: ${{JOB_ID}}"
echo "${{JOB_ID}}" > JOB_ID
-testflinger-cli poll ${{JOB_ID}}
+testflinger poll ${{JOB_ID}}
-TEST_STATUS=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_status)
+TEST_STATUS=$(testflinger results ${{JOB_ID}} |jq -r .test_status)
cp artifacts/submission.json submission.json.previous.$DISTRO_IMAGE || /bin/true
rm -rf artifacts*
#retry getting the artifacts after a delay if it fails
-testflinger-cli artifacts ${{JOB_ID}} || (sleep 30 && testflinger-cli artifacts ${{JOB_ID}})
+testflinger artifacts ${{JOB_ID}} || (sleep 30 && testflinger artifacts ${{JOB_ID}})
tar -xzf artifacts.tgz
set +x
-export C3LINK=$(testflinger-cli results ${{JOB_ID}} |jq -r .test_output|grep certification.canonical.com)
+export C3LINK=$(testflinger results ${{JOB_ID}} |jq -r .test_output|grep certification.canonical.com)
echo $C3LINK > c3link
set -x
diff --git a/jobs/upgrade-testing/upgrade-testing-template.yaml b/jobs/upgrade-testing/upgrade-testing-template.yaml
index 8405cce..10a7074 100644
--- a/jobs/upgrade-testing/upgrade-testing-template.yaml
+++ b/jobs/upgrade-testing/upgrade-testing-template.yaml
@@ -35,8 +35,7 @@
- log-text: "Build was aborted"
operator: OR
script: |
- . env/bin/activate
- testflinger-cli cancel $(cat JOB_ID)
+ testflinger cancel $(cat JOB_ID)
- description-setter:
regexp: "version_signature: Ubuntu (.*)-generic"
regexp-for-failed: "version_signature: Ubuntu (.*)-generic"
Follow ups