From 01fa77f8e5f5812d86f5f50c4979667a12224917 Mon Sep 17 00:00:00 2001 From: Song Guo Date: Wed, 1 Feb 2023 10:56:36 +0800 Subject: [PATCH 1/2] [Hotfix] Fix ot-br-posix crash in cirque --- .../chip-cirque-device-base/build.sh | 14 ++++++++------ .../chip-cirque-device-base/cachekey.sh | 4 ++++ .../ci-only-images/chip-cirque-device-base/version | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh b/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh index 2bea878a71d95d..f77c36ee7d96a6 100755 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh +++ b/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh @@ -22,8 +22,12 @@ # This script expects to find a Dockerfile next to $0, so symlink # in an image name directory is the expected use case. -me=$(basename "$0") -cd "$(dirname "$0")" +set +xe + +SOURCE=${BASH_SOURCE[0]} +cd "$(dirname "$SOURCE")" + +SOURCE_DIR=$(pwd) ORG=${DOCKER_BUILD_ORG:-connectedhomeip} @@ -35,6 +39,8 @@ VERSION=${DOCKER_BUILD_VERSION:-$(sed 's/ .*//' version)} GITHUB_ACTION_RUN=${GITHUB_ACTION_RUN:-"0"} +REPO_DIR="$SOURCE_DIR/../../../../" + # The image build will clone its own ot-br-posix checkout due to limitations of git submodule. # Using the same ot-br-posix version as chip OT_BR_POSIX=$REPO_DIR/third_party/ot-br-posix/repo @@ -85,10 +91,6 @@ else fi fi -SOURCE=${BASH_SOURCE[0]} -SOURCE_DIR=$(cd "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd) -REPO_DIR="$SOURCE_DIR/../../../../" - docker build -t "$ORG/$IMAGE" -f "$SOURCE_DIR/Dockerfile" "${BUILD_ARGS[@]}" --build-arg OT_BR_POSIX_CHECKOUT="$OT_BR_POSIX_CHECKOUT" "$SOURCE_DIR" if [[ -n GITHUB_ACTION_RUN ]]; then diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/cachekey.sh b/integrations/docker/ci-only-images/chip-cirque-device-base/cachekey.sh index ee7f5fa23ee397..4e5c754538a5f0 100755 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/cachekey.sh +++ b/integrations/docker/ci-only-images/chip-cirque-device-base/cachekey.sh @@ -24,6 +24,10 @@ me=$(basename "$0") cd "$(dirname "$0")" +SOURCE=${BASH_SOURCE[0]} +SOURCE_DIR=$(cd "$(dirname "$SOURCE")" >/dev/null 2>&1 && pwd) +REPO_DIR="$SOURCE_DIR/../../../../" + # The image build will clone its own ot-br-posix checkout due to limitations of git submodule. # Using the same ot-br-posix version as chip OT_BR_POSIX=$REPO_DIR/third_party/ot-br-posix/repo diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/version b/integrations/docker/ci-only-images/chip-cirque-device-base/version index 2b2a18d2659ec8..4add8a3f3185ce 100644 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/version +++ b/integrations/docker/ci-only-images/chip-cirque-device-base/version @@ -1 +1 @@ -0.4.20 +0.4.21 From e2723267c1424c9b60a51230f5ad2b9119a3b2ae Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Wed, 1 Feb 2023 03:00:52 +0000 Subject: [PATCH 2/2] Restyled by shellharden --- .../docker/ci-only-images/chip-cirque-device-base/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh b/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh index f77c36ee7d96a6..78f4945469917b 100755 --- a/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh +++ b/integrations/docker/ci-only-images/chip-cirque-device-base/build.sh @@ -27,7 +27,7 @@ set +xe SOURCE=${BASH_SOURCE[0]} cd "$(dirname "$SOURCE")" -SOURCE_DIR=$(pwd) +SOURCE_DIR=$PWD ORG=${DOCKER_BUILD_ORG:-connectedhomeip}