diff --git a/ghaf-parallel-hw-test.groovy b/ghaf-parallel-hw-test.groovy index 0668c75..562b1e4 100644 --- a/ghaf-parallel-hw-test.groovy +++ b/ghaf-parallel-hw-test.groovy @@ -8,6 +8,7 @@ def REPO_URL = 'https://github.com/tiiuae/ci-test-automation/' def DEF_LABEL = 'testagent' def TMP_IMG_DIR = 'image' +def TMP_SIG_DIR = 'signature' def CONF_FILE_PATH = '/etc/jenkins/test_config.json' //////////////////////////////////////////////////////////////////////////////// @@ -49,6 +50,8 @@ def ghaf_robot_test(String testname='boot') { string(credentialsId: 'testagent-plug-pass', variable: 'PLUG_PASS'), string(credentialsId: 'testagent-switch-token', variable: 'SW_TOKEN'), string(credentialsId: 'testagent-switch-secret', variable: 'SW_SECRET'), + string(credentialsId: 'testagent-wifi-ssid', variable: 'WIFI_SSID'), + string(credentialsId: 'testagent-wifi-password', variable: 'WIFI_PSWD'), ]) { dir("Robot-Framework/test-suites") { sh 'rm -f *.png output.xml report.html log.html' @@ -69,6 +72,8 @@ def ghaf_robot_test(String testname='boot') { -v SWITCH_TOKEN:$SW_TOKEN \ -v SWITCH_SECRET:$SW_SECRET \ -v BUILD_ID:${BUILD_NUMBER} \ + -v TEST_WIFI_SSID:${WIFI_SSID} \ + -v TEST_WIFI_PSWD:${WIFI_PSWD} \ -i $INCLUDE_TEST_TAGS . ''' if (testname == 'boot') { @@ -160,6 +165,11 @@ pipeline { """ img_relpath = run_cmd("find ${TMP_IMG_DIR} -type f -print -quit | grep .") println "Downloaded image to workspace: ${img_relpath}" + // Verify signature using the tooling from: https://github.com/tiiuae/ci-yubi + sh "wget -nv -P ${TMP_SIG_DIR} ${params.IMG_URL}.sig" + sig_relpath = run_cmd("find ${TMP_SIG_DIR} -type f -print -quit | grep .") + println "Downloaded signature to workspace: ${sig_relpath}" + sh "nix run github:tiiuae/ci-yubi/bdb2dbf#verify -- --path ${img_relpath} --sigfile ${sig_relpath}" // Uncompress, keeping only the decompressed image file if(img_relpath.endsWith("zst")) { sh "zstd -dfv ${img_relpath} && rm ${img_relpath}" @@ -198,7 +208,6 @@ pipeline { unmount_cmd = "/run/wrappers/bin/sudo usbsdmux ${muxport} dut" } else { serial = get_test_conf_property(CONF_FILE_PATH, env.DEVICE_NAME, 'usbhub_serial') - //dgrep = 'PSSD' mount_cmd = "/run/wrappers/bin/sudo AcronameHubCLI -u 0 -s ${serial}; sleep 10" unmount_cmd = "/run/wrappers/bin/sudo AcronameHubCLI -u 1 -s ${serial}" }