Skip to content

Commit

Permalink
README and style
Browse files Browse the repository at this point in the history
  • Loading branch information
aBozowski committed Apr 16, 2022
1 parent f3e81c9 commit db33367
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
1 change: 1 addition & 0 deletions integrations/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
13 changes: 11 additions & 2 deletions integrations/docker/images/chip-build-zap/README.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 3 additions & 3 deletions integrations/docker/images/chip-build-zap/zapverify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db33367

Please sign in to comment.