File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed
Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,25 @@ 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- # crane hangs for a long time if it doesn't know that the registry is plain http
39- RUNTIME_IMAGE=$( echo $RUNTIME_IMAGE | sed ' s|.local/|.local:80/|' )
40- IMAGE=$( echo $IMAGE | sed ' s|.local/|.local:80/|' )
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+
54+ # # crane hangs for a long time if it doesn't know that the registry is plain http
55+ # RUNTIME_IMAGE=$(echo $RUNTIME_IMAGE | sed 's|.local/|.local:80/|')
56+ # IMAGE=$(echo $IMAGE | sed 's|.local/|.local:80/|')
4157
4258# This is a PoC, let's make a lot of assumptions to simplify
4359context=.
You can’t perform that action at this time.
0 commit comments