diff --git a/integrations/docker/build.sh b/integrations/docker/build.sh index 7c5b2845c9f190..940026215a4b0b 100755 --- a/integrations/docker/build.sh +++ b/integrations/docker/build.sh @@ -45,6 +45,7 @@ VERSION=${DOCKER_BUILD_VERSION:-$(sed 's/ .*//' version)} --push push image(s) to docker.io (requires docker login for \"$ORG\") --help get this message --squash squash docker layers before push them to docker.io (requires docker-squash python module) + " exit 0 } diff --git a/integrations/docker/images/chip-build-zap/README.md b/integrations/docker/images/chip-build-zap/README.md index 14ffb4a121a31a..cfb6fb851256fd 100644 --- a/integrations/docker/images/chip-build-zap/README.md +++ b/integrations/docker/images/chip-build-zap/README.md @@ -1,4 +1,13 @@ # ZAP -- This image builds `zap` which gets copied into `chip-build-vscode`. - +- This Dockerfile builds https://github.com/project-chip/zap.git, which gets copied into `chip-build-vscode` +- This image must be built in a working tree of the `CHIP` repo with a commit found in https://github.com/project-chip/connectedhomeip +- This image must be built using the included `build.sh`. + - `build.sh` will check for the precense of `buildcontext.sh` in the build context and will execute the script before calling `docker build` if it exists. +- In the case of `zap`, `buildcontext.sh` will get the commit of the current working tree and store it in `context.txt`. +- At build time: + - The `CHIP` repo will be cloned from https://github.com/project-chip/connectedhomeip + - The commit found in the working tree by `buildcontext.sh` will be checked out. + - The hash of the `zap` submodule and the hash written in `chip-build-zap/Dockerfile` will be extracted from the cloned repo. + - `zapverify.sh` will compare whether the hashes match and log what was extracted. + - If there is a discrepancy, it will provide instructions to update origin and fails the build. diff --git a/integrations/docker/images/chip-build-zap/zapverify.sh b/integrations/docker/images/chip-build-zap/zapverify.sh index 801187e28c0e22..3d22176497e9e3 100644 --- a/integrations/docker/images/chip-build-zap/zapverify.sh +++ b/integrations/docker/images/chip-build-zap/zapverify.sh @@ -11,15 +11,15 @@ echo 'remote_zap_commit' $remote_zap_commit echo 'remote_dockerfile_commit' $remote_dockerfile_commit if [[ $remote_zap_commit != $local_dockerfile_commit ]] || [[ $remote_dockerfile_commit != $local_dockerfile_commit ]]; then - echo 'This image is being built in an instance of ' $CHIP_ORIGIN + echo 'This build is verifying against origin ' $CHIP_ORIGIN echo 'Origin has the following at commit ' $local_chip_commit echo ' zap submodule at ' $remote_zap_commit echo ' Dockerfile at ' $remote_dockerfile_commit - echo 'Origin is not in sync with this build specifying' $ZAP_COMMIT + echo 'Origin is not in sync with this build specifying' $local_dockerfile_commit echo 'If the zap commit requested for the build is ahead of the submodule in origin:' echo ' please update the submodule in origin and checkout.' echo 'If the zap commit requested in the build is behind the submodule in origin:' - echo ' please update and push this Dockerfile before building.' + echo ' please update this dockerfile to match the submodule and push to origin before building.' else echo 'Origin matches build' exit 0