Skip to content

Commit 4619da5

Browse files
committed
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 <[email protected]>
1 parent a6ae770 commit 4619da5

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

ci/fih-tests_install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616

1717
set -e
1818

19+
source $(dirname "$0")/fih-tests_version.sh
20+
1921
DOCKER_DIR=docker
2022

21-
IMAGE=fih-test:0.0.2
23+
IMAGE=fih-test:$FIH_IMAGE_VERSION
2224

2325
CACHED_IMAGE=$DOCKER_DIR/$IMAGE
2426

ci/fih-tests_run.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
set -e
1818

19+
source $(dirname "$0")/fih-tests_version.sh
20+
1921
pushd .. &&\
2022
git clone https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git &&\
2123
pushd trusted-firmware-m &&\
@@ -45,7 +47,7 @@ if [[ $GITHUB_ACTIONS == true ]]; then
4547
fi
4648

4749
if test -z "$FIH_LEVEL"; then
48-
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
50+
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
4951
else
50-
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
52+
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
5153
fi

ci/fih-tests_version.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FIH_IMAGE_VERSION=0.0.3

0 commit comments

Comments
 (0)