File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ BUILD_BASE=false
1313PUSH_LOCAL=false
1414PUSH_REMOTE=false
1515PULL_LOCAL=false
16+ DRY_RUN=false
1617TARGET=" "
1718
1819# Parse args
@@ -36,6 +37,10 @@ while [[ $# -gt 0 ]]; do
3637 VARS=" $OPERATORS_DIR /vars-prod.hcl"
3738 shift
3839 ;;
40+ --dry-run)
41+ DRY_RUN=true
42+ shift
43+ ;;
3944 --target)
4045 TARGET=" $2 "
4146 shift 2
@@ -57,14 +62,18 @@ cd "$REPO_ROOT_DIR"
5762
5863
5964if $BUILD_BASE ; then
65+ base_cmd=(docker buildx bake)
66+ if $DRY_RUN ; then
67+ base_cmd+=(--print)
68+ fi
6069 echo " === Building base images ==="
61- docker buildx bake base --file " $BAKE_FILE " \
70+ " ${base_cmd[@]} " base --file " $BAKE_FILE " \
6271 --file " $BASE_VARS "
6372
64- docker buildx bake operator --file " $BAKE_FILE " \
73+ " ${base_cmd[@]} " operator --file " $BAKE_FILE " \
6574 --file " $BASE_VARS "
6675
67- docker buildx bake distiller-streaming --file " $BAKE_FILE " \
76+ " ${base_cmd[@]} " distiller-streaming --file " $BAKE_FILE " \
6877 --file " $BASE_VARS "
6978fi
7079
@@ -105,6 +114,11 @@ build_operators() {
105114
106115 cmd+=(--push)
107116
117+
118+ if $DRY_RUN ; then
119+ cmd+=(--print)
120+ fi
121+
108122 # Execute the command
109123 " ${cmd[@]} "
110124}
You can’t perform that action at this time.
0 commit comments