From 0fe7ffd80396cfa9d352748d3e3ce88f6864114b Mon Sep 17 00:00:00 2001 From: Fabio Utzig Date: Wed, 4 Sep 2024 17:17:50 -0300 Subject: [PATCH] ci: Fix FIH Docker image release usage The scripts for fih tests install and run where running different versions of the docker images, since the install specified a version and not version was specified for run, defaulting to `latest`. This commits adds a new file for specifying the docker image to be used. Signed-off-by: Fabio Utzig (cherry picked from commit 4619da56601d072b6f1fc19c807f0a5c748d88c2) --- ci/fih-tests_install.sh | 4 +++- ci/fih-tests_run.sh | 6 ++++-- ci/fih-tests_version.sh | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 ci/fih-tests_version.sh diff --git a/ci/fih-tests_install.sh b/ci/fih-tests_install.sh index d69308a6..1e78aafd 100755 --- a/ci/fih-tests_install.sh +++ b/ci/fih-tests_install.sh @@ -16,9 +16,11 @@ set -e +source $(dirname "$0")/fih-tests_version.sh + DOCKER_DIR=docker -IMAGE=fih-test:0.0.2 +IMAGE=fih-test:$FIH_IMAGE_VERSION CACHED_IMAGE=$DOCKER_DIR/$IMAGE diff --git a/ci/fih-tests_run.sh b/ci/fih-tests_run.sh index 02373068..c65d2182 100755 --- a/ci/fih-tests_run.sh +++ b/ci/fih-tests_run.sh @@ -16,6 +16,8 @@ set -e +source $(dirname "$0")/fih-tests_version.sh + pushd .. &&\ git clone https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git &&\ pushd trusted-firmware-m &&\ @@ -45,7 +47,7 @@ if [[ $GITHUB_ACTIONS == true ]]; then fi if test -z "$FIH_LEVEL"; then - docker run --rm -v $(pwd):/root/work/tfm:rw,z mcuboot/fih-test /bin/sh -c '/root/work/tfm/mcuboot/ci/fih_test_docker/execute_test.sh $0 $1 $2' $SKIP_SIZE $BUILD_TYPE $DAMAGE_TYPE + docker run --rm -v $(pwd):/root/work/tfm:rw,z mcuboot/fih-test:$FIH_IMAGE_VERSION /bin/sh -c '/root/work/tfm/mcuboot/ci/fih_test_docker/execute_test.sh $0 $1 $2' $SKIP_SIZE $BUILD_TYPE $DAMAGE_TYPE else - docker run --rm -v $(pwd):/root/work/tfm:rw,z mcuboot/fih-test /bin/sh -c '/root/work/tfm/mcuboot/ci/fih_test_docker/execute_test.sh $0 $1 $2 $3' $SKIP_SIZE $BUILD_TYPE $DAMAGE_TYPE $FIH_LEVEL + docker run --rm -v $(pwd):/root/work/tfm:rw,z mcuboot/fih-test:$FIH_IMAGE_VERSION /bin/sh -c '/root/work/tfm/mcuboot/ci/fih_test_docker/execute_test.sh $0 $1 $2 $3' $SKIP_SIZE $BUILD_TYPE $DAMAGE_TYPE $FIH_LEVEL fi diff --git a/ci/fih-tests_version.sh b/ci/fih-tests_version.sh new file mode 100644 index 00000000..a46aae3c --- /dev/null +++ b/ci/fih-tests_version.sh @@ -0,0 +1 @@ +FIH_IMAGE_VERSION=0.0.3