Skip to content

Commit 7a10918

Browse files
committed
Supports locally built & locally docker buildable runtime changes
1 parent 5179727 commit 7a10918

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

bin/y-build-like-sync

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,22 @@ RUNTIME_IMAGE=$1
3535
[ -z "$RUNTIME_IMAGE" ] && echo "First argument must be a runtime image to append the layer to" \
3636
&& echo "To improve build times use a runtime image in the target repo" && exit 1
3737

38+
# Experimental support for runtime dev loops
39+
case "$RUNTIME_IMAGE" in
40+
$BUILDS_REGISTRY*-dirty )
41+
docker inspect $RUNTIME_IMAGE >/dev/null && docker push $RUNTIME_IMAGE || true
42+
;;
43+
$BUILDS_REGISTRY*:../* )
44+
RUNTIME_BUILD_CONTEXT=$(echo $RUNTIME_IMAGE | cut -d':' -f 2)
45+
RUNTIME_IMAGE=$(echo $RUNTIME_IMAGE | cut -d':' -f 1):y-build-like-sync-devloop
46+
docker build -t $RUNTIME_IMAGE $RUNTIME_BUILD_CONTEXT
47+
docker push $RUNTIME_IMAGE
48+
;;
49+
$BUILDS_REGISTRY* )
50+
y-crane validate --remote=$RUNTIME_IMAGE
51+
;;
52+
esac
53+
3854
# # crane hangs for a long time if it doesn't know that the registry is plain http
3955
# RUNTIME_IMAGE=$(echo $RUNTIME_IMAGE | sed 's|.local/|.local:80/|')
4056
# IMAGE=$(echo $IMAGE | sed 's|.local/|.local:80/|')

0 commit comments

Comments
 (0)