Skip to content

Commit 4c77fb4

Browse files
committed
[TASK] Test image only if loaded
1 parent db05b83 commit 4c77fb4

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

build.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
GITHUB_OWNER=ddev
44
PUSH=""
5+
LOAD=""
56
IMAGE_NAME="ghcr.io/ochorocho/ddev-gitlab-ci"
67
DDEV_VERSION=""
78

@@ -73,6 +74,9 @@ done
7374

7475
loadVersionAndTags
7576

76-
# @todo: Add --load option
77-
docker buildx build --platform linux/amd64,linux/arm64 --no-cache --pull . -f Dockerfile ${DOCKER_TAGS[@]} --build-arg ddev_version="$DDEV_VERSION" $PUSH $LOAD
78-
#docker run --rm -it -v "$(pwd)/test.sh:/tmp/test.sh" --entrypoint "ash" "$IMAGE_NAME:$DDEV_VERSION" /tmp/test.sh
77+
docker buildx build --platform linux/amd64,linux/arm64 --progress plain --no-cache --pull . -f Dockerfile ${DOCKER_TAGS[@]} --build-arg ddev_version="$DDEV_VERSION" $PUSH $LOAD
78+
79+
if [ $LOAD ]; then
80+
docker run --rm -it -v "$(pwd)/test.sh:/tmp/test.sh" --entrypoint "ash" "$IMAGE_NAME:$DDEV_VERSION" /tmp/test.sh
81+
fi
82+

test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
docker --version | head -n 1 || exit 1
44
docker-compose --version | head -n 1 || exit 1
55
ddev --version | head -n 1 || exit 1
6-
mkcert -version
6+
echo "mkcert $(mkcert -version || exit 1)"
77
echo "Current user: $(whoami)"

0 commit comments

Comments
 (0)