From d6a4ffa733517579c0a1fca97f6a5d1e0f85d5a6 Mon Sep 17 00:00:00 2001 From: mu <59917266+4eUeP@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:26:42 +0800 Subject: [PATCH] tmp --- build.sh | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 651e543..fbdfe89 100755 --- a/build.sh +++ b/build.sh @@ -62,13 +62,15 @@ _buildx() { image_name="$2" target="$3" tag="$4" + # Optional + build_args="$5" test -n "$target" && target="--target $target" metadata_file=$(mktemp) # build and push digest docker buildx build \ --file $dockerfile \ - $target \ + $target $build_args \ --output type=image,name=$image_name,push-by-digest=true,name-canonical=true,push=true \ --metadata-file $metadata_file \ . @@ -76,7 +78,7 @@ _buildx() { # writes to local image store, so it will appear in `docker images` docker buildx build \ - --file $dockerfile $target \ + --file $dockerfile $target $build_args \ --output type=docker,name=$image_name:$tag . # create tag from digests @@ -151,6 +153,26 @@ hadmin_store() { _buildx "dockerfiles/hadmin_store" "ghcr.io/hstreamdb/hadmin-store" "" "latest" } +# build_haskell810 +# haskell810() { +# cd $HS_DIR +# +# _buildx "Dockerfile" "hstreamdb/haskell" \ +# "" "8.10.7" \ +# "--build-arg GHC=8.10.7 --build-arg ld_client=hstreamdb/logdevice-client" +# +# ghc="$1" +# ld_client="$2" +# tag="$3" +# tag1="$4" +# +# $DOCKER_BIN build . -f Dockerfile \ +# --build-arg GHC=$ghc \ +# --build-arg LD_CLIENT_IMAGE=$ld_client \ +# --tag hstreamdb/haskell:${tag}_$ARCH \ +# --tag hstreamdb/haskell:${tag1}_$ARCH +# } + # ----------------------------------------------------------------------------- # Outdated # @@ -349,6 +371,7 @@ push_ghc_latest_manifest() { } # ----------------------------------------------------------------------------- +# Outdated, TODO: remove build_hsthrift() { cd $HS_DIR @@ -368,6 +391,7 @@ push_hsthrift_manifest() { } # ----------------------------------------------------------------------------- +# Outdated, TODO: remove build_hadmin_store() { cd $HS_DIR