Skip to content

Commit 9942fe1

Browse files
committed
ci: Use fih-test container from GHCR
Change-Id: I29b308594f53562ad1a04faf280555b83dc7d903 Signed-off-by: David Vincze <david.vincze@arm.com>
1 parent 78f87cf commit 9942fe1

File tree

5 files changed

+30
-12
lines changed

5 files changed

+30
-12
lines changed

.github/workflows/fih_tests.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ jobs:
4747
if: ${{ github.event_name == 'pull_request' }}
4848
run: |
4949
./ci/check-signed-off-by.sh
50+
- name: Authenticate to GH Container Registry
51+
uses: docker/login-action@v3
52+
with:
53+
registry: ghcr.io
54+
username: ${{ github.actor }}
55+
password: ${{ secrets.GITHUB_TOKEN }}
5056
- name: FIH hardening test install
5157
run: |
5258
./ci/fih-tests_install.sh

ci/fih-tests_config.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash -x
2+
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
# Copyright (c) 2025 Arm Limited
7+
#
8+
9+
FIH_IMAGE_VERSION=0.0.3
10+
11+
FIH_IMAGE_NAME=mcuboot-fih-test
12+
13+
FIH_IMAGE=$FIH_IMAGE_NAME:$FIH_IMAGE_VERSION
14+
15+
CONTAINER_REGISTRY=ghcr.io/mcu-tools

ci/fih-tests_install.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -x
22

3-
# Copyright (c) 2020 Arm Limited
3+
# Copyright (c) 2020-2025 Arm Limited
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -16,19 +16,17 @@
1616

1717
set -e
1818

19-
source $(dirname "$0")/fih-tests_version.sh
19+
source $(dirname "$0")/fih-tests_config.sh
2020

2121
DOCKER_DIR=docker
2222

23-
IMAGE=fih-test:$FIH_IMAGE_VERSION
24-
25-
CACHED_IMAGE=$DOCKER_DIR/$IMAGE
23+
CACHED_IMAGE=$DOCKER_DIR/$FIH_IMAGE
2624

2725
[[ -f $CACHED_IMAGE ]] && (gzip -dc $CACHED_IMAGE | docker load)
2826

2927
if [[ $? -ne 0 ]]; then
30-
docker pull mcuboot/$IMAGE
28+
docker pull $CONTAINER_REGISTRY/$FIH_IMAGE
3129
if [[ $GITHUB_ACTIONS != true ]]; then
32-
docker save mcuboot/$IMAGE | gzip > $CACHED_IMAGE
30+
docker save $CONTAINER_REGISTRY/$FIH_IMAGE | gzip > $CACHED_IMAGE
3331
fi
3432
fi

ci/fih-tests_run.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -x
22

3-
# Copyright (c) 2020-2024 Arm Limited
3+
# Copyright (c) 2020-2025 Arm Limited
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
1616

1717
set -e
1818

19-
source $(dirname "$0")/fih-tests_version.sh
19+
source $(dirname "$0")/fih-tests_config.sh
2020

2121
# Note that we are pulling from a github mirror of these repos, not direct upstream. If the sha
2222
# checked out below changes, the mirrors might need to be updated.
@@ -54,7 +54,7 @@ if [[ $GITHUB_ACTIONS == true ]]; then
5454
fi
5555

5656
if test -z "$FIH_LEVEL"; then
57-
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
57+
docker run --rm -v $(pwd):/root/work/tfm:rw,z $CONTAINER_REGISTRY/$FIH_IMAGE /bin/sh -c '/root/work/tfm/mcuboot/ci/fih_test_docker/execute_test.sh $0 $1 $2' $SKIP_SIZE $BUILD_TYPE $DAMAGE_TYPE
5858
else
59-
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
59+
docker run --rm -v $(pwd):/root/work/tfm:rw,z $CONTAINER_REGISTRY/$FIH_IMAGE /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
6060
fi

ci/fih-tests_version.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)