Skip to content

Commit

Permalink
check for new docker build messages
Browse files Browse the repository at this point in the history
Signed-off-by: Le Zhang <[email protected]>
  • Loading branch information
LiilyZhang committed Aug 3, 2023
1 parent d7d6bd0 commit ee0ea96
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion test/docker/fs/hzn/service/cpu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ default: all
all: build run check

build: clean
DOCKER_BUILDKIT=0 docker build -t $(DOCKER_HUB_ID)/$(DOCKER_NAME):$(DOCKER_TAG) .
docker build -t $(DOCKER_HUB_ID)/$(DOCKER_NAME):$(DOCKER_TAG) .

run: stop
docker run -d --name $(DOCKER_NAME) --publish=8347:8347 --volume `pwd`:/outside $(DOCKER_HUB_ID)/$(DOCKER_NAME):$(DOCKER_TAG)
Expand Down
2 changes: 1 addition & 1 deletion test/docker/fs/hzn/service/hello/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ default: build run check

build: clean Dockerfile start.sh server
-docker rmi $(BASE)/$(IMAGE):$(VER)
DOCKER_BUILDKIT=0 docker build --no-cache -t $(BASE)/$(IMAGE):$(VER) .
docker build --no-cache -t $(BASE)/$(IMAGE):$(VER) .

server: server.go
CGO_ENABLED=0 go build server.go
Expand Down
2 changes: 1 addition & 1 deletion test/docker/fs/hzn/service/leaf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ default: all
all: build run check

build: clean
DOCKER_BUILDKIT=0 docker build -t $(DOCKER_HUB_ID)/$(DOCKER_NAME):$(DOCKER_TAG) .
docker build -t $(DOCKER_HUB_ID)/$(DOCKER_NAME):$(DOCKER_TAG) .

run: stop
docker run -d --name $(DOCKER_NAME) --publish=8347:8347 --volume `pwd`:/outside $(DOCKER_HUB_ID)/$(DOCKER_NAME):$(DOCKER_TAG)
Expand Down
2 changes: 1 addition & 1 deletion test/docker/fs/hzn/service/usehello/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ default: build run check

build: Dockerfile start.sh
-docker rmi $(BASE)/$(IMAGE):$(VER)
DOCKER_BUILDKIT=0 docker build --no-cache -t $(BASE)/$(IMAGE):$(VER) .
docker build --no-cache -t $(BASE)/$(IMAGE):$(VER) .

horizonstart:
hzn -v dev service start
Expand Down
15 changes: 8 additions & 7 deletions test/gov/hzn_dev_services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
# $2 - expected result
# $3 - error message
function verify {
#8 writing image sha256:bb33b8630cbbdd0c1a16cf5f4caf70a47083354d2966ab9d062d070f124403d8 done
#8 naming to localhost:443/amd64_leaf:1.0 done
# writing image sha256:[0-9A-Za-z]* done
respContains=$(echo $1 | grep "$2")
if [ "${respContains}" == "" ]; then
echo -e "\nERROR: $3. Output was:"
echo -e "Didn't find \"$2\" in the response, check \"$3\" in response"
respContains=$(echo $1 | grep -E "$3")
echo -e "\nERROR: $4. Output was:"
echo -e "$1"
exit 1
fi
Expand All @@ -30,11 +35,10 @@ function verify {
function createProject {
echo -e "Building $2 service container."
cd $1
#make ARCH="${ARCH}"
# export DOCKER_BUILDKIT=0

buildOut=$(make ARCH="${ARCH}" 2>&1)

verify "${buildOut}" "Successfully built" "$2 container did not build"
verify "${buildOut}" "Successfully built" "writing image sha256:[0-9A-Za-z]* done" "$2 container did not build"
if [ $? -ne 0 ]; then exit $?; fi

verify "${buildOut}" "$3" "$2 container did not produce output"
Expand Down Expand Up @@ -194,9 +198,6 @@ USEHELLO_HOME=${PROJECT_HOME}/usehello
# ============= Service creation =====================================
#

docker --version
docker images

NUMBER_SERVICES=0

createProject "${LEAF_HOME}" "LEAF" "\"leaf\":" "my.company.com.services.leaf" "singleton" "MY_LEAF_VAR" "string" "leafVarValue" "leaf"
Expand Down

0 comments on commit ee0ea96

Please sign in to comment.