Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Jan 12, 2024
1 parent 24fdd37 commit 428e64c
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 5 deletions.
8 changes: 7 additions & 1 deletion tools/gluten-te/centos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ BUILD_DOCKER_BUILD_ARGS="$BUILD_DOCKER_BUILD_ARGS -t $DOCKER_TARGET_IMAGE_BUILD_

if [ -n "$DOCKER_CACHE_REGISTRY" ]
then
docker pull $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILD_WITH_OS_IMAGE || echo "Required image not found in cache registry."
if [ "$DOCKER_CACHE_REGISTRY_PULL" == "ON" ]
then
docker pull $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILD_WITH_OS_IMAGE
docker tag $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILD_WITH_OS_IMAGE $DOCKER_TARGET_IMAGE_BUILD_WITH_OS_IMAGE
# Omits $DOCKER_PUSH_REGISTRY currently
exit 0
fi
BUILD_DOCKER_BUILD_ARGS="$BUILD_DOCKER_BUILD_ARGS --cache-from $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILD_WITH_OS_IMAGE"
fi

Expand Down
11 changes: 10 additions & 1 deletion tools/gluten-te/centos/buildenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export BUILDKIT_PROGRESS=plain
# Docker registry used to pull pre-built images to speed-up builds
DOCKER_CACHE_REGISTRY=${DOCKER_CACHE_REGISTRY:-$DEFAULT_DOCKER_CACHE_REGISTRY}

# If on, pull image from the cache registry rather than using the image as cache
DOCKER_CACHE_REGISTRY_PULL=${DOCKER_CACHE_REGISTRY_PULL:-$DEFAULT_DOCKER_CACHE_REGISTRY_PULL}

# Docker registry to push pre-built images
DOCKER_PUSH_REGISTRY=${DOCKER_PUSH_REGISTRY:-$DEFAULT_DOCKER_PUSH_REGISTRY}

Expand Down Expand Up @@ -75,7 +78,13 @@ BUILDENV_DOCKER_BUILD_ARGS="$BUILDENV_DOCKER_BUILD_ARGS -t $DOCKER_TARGET_IMAGE_

if [ -n "$DOCKER_CACHE_REGISTRY" ]
then
docker pull $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILDENV_WITH_OS_IMAGE || echo "Required image not found in cache registry."
if [ "$DOCKER_CACHE_REGISTRY_PULL" == "ON" ]
then
docker pull $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILDENV_WITH_OS_IMAGE
docker tag $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILDENV_WITH_OS_IMAGE $DOCKER_TARGET_IMAGE_BUILDENV_WITH_OS_IMAGE
# Omits $DOCKER_PUSH_REGISTRY currently
exit 0
fi
BUILDENV_DOCKER_BUILD_ARGS="$BUILDENV_DOCKER_BUILD_ARGS --cache-from $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILDENV_WITH_OS_IMAGE"
fi

Expand Down
4 changes: 4 additions & 0 deletions tools/gluten-te/centos/defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ DEFAULT_DOCKER_TARGET_IMAGE_BUILD=gluten-te/gluten-build
# Docker registry used to pull pre-built images to speed-up builds
DEFAULT_DOCKER_CACHE_REGISTRY=

# If on, pull image from the cache registry rather than using the image as cache. Turning on
# this may cause running on out-of-date image if the local dockerfile had been updated.
DEFAULT_DOCKER_CACHE_REGISTRY_PULL=OFF

# Docker registry to push pre-built images
DEFAULT_DOCKER_PUSH_REGISTRY=

Expand Down
8 changes: 7 additions & 1 deletion tools/gluten-te/ubuntu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ BUILD_DOCKER_BUILD_ARGS="$BUILD_DOCKER_BUILD_ARGS -t $DOCKER_TARGET_IMAGE_BUILD_

if [ -n "$DOCKER_CACHE_REGISTRY" ]
then
docker pull $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILD_WITH_OS_IMAGE || echo "Required image not found in cache registry."
if [ "$DOCKER_CACHE_REGISTRY_PULL" == "ON" ]
then
docker pull $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILD_WITH_OS_IMAGE
docker tag $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILD_WITH_OS_IMAGE $DOCKER_TARGET_IMAGE_BUILD_WITH_OS_IMAGE
# Omits $DOCKER_PUSH_REGISTRY currently
exit 0
fi
BUILD_DOCKER_BUILD_ARGS="$BUILD_DOCKER_BUILD_ARGS --cache-from $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILD_WITH_OS_IMAGE"
fi

Expand Down
11 changes: 10 additions & 1 deletion tools/gluten-te/ubuntu/buildenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ export BUILDKIT_PROGRESS=plain
# Docker registry used to pull pre-built images to speed-up builds
DOCKER_CACHE_REGISTRY=${DOCKER_CACHE_REGISTRY:-$DEFAULT_DOCKER_CACHE_REGISTRY}

# If on, pull image from the cache registry rather than using the image as cache
DOCKER_CACHE_REGISTRY_PULL=${DOCKER_CACHE_REGISTRY_PULL:-$DEFAULT_DOCKER_CACHE_REGISTRY_PULL}

# Docker registry to push pre-built images
DOCKER_PUSH_REGISTRY=${DOCKER_PUSH_REGISTRY:-$DEFAULT_DOCKER_PUSH_REGISTRY}

Expand Down Expand Up @@ -73,7 +76,13 @@ BUILDENV_DOCKER_BUILD_ARGS="$BUILDENV_DOCKER_BUILD_ARGS -t $DOCKER_TARGET_IMAGE_

if [ -n "$DOCKER_CACHE_REGISTRY" ]
then
docker pull $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILDENV_WITH_OS_IMAGE || echo "Required image not found in cache registry."
if [ "$DOCKER_CACHE_REGISTRY_PULL" == "ON" ]
then
docker pull $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILDENV_WITH_OS_IMAGE
docker tag $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILDENV_WITH_OS_IMAGE $DOCKER_TARGET_IMAGE_BUILDENV_WITH_OS_IMAGE
# Omits $DOCKER_PUSH_REGISTRY currently
exit 0
fi
BUILDENV_DOCKER_BUILD_ARGS="$BUILDENV_DOCKER_BUILD_ARGS --cache-from $DOCKER_CACHE_REGISTRY/$DOCKER_TARGET_IMAGE_BUILDENV_WITH_OS_IMAGE"
fi

Expand Down
4 changes: 4 additions & 0 deletions tools/gluten-te/ubuntu/defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ DEFAULT_DOCKER_TARGET_IMAGE_BUILD=gluten-te/gluten-build
# Docker registry used to pull pre-built images to speed-up builds
DEFAULT_DOCKER_CACHE_REGISTRY=

# If on, pull image from the cache registry rather than using the image as cache. Turning on
# this may cause running on out-of-date image if the local dockerfile had been updated.
DEFAULT_DOCKER_CACHE_REGISTRY_PULL=OFF

# Docker registry to push pre-built images
DEFAULT_DOCKER_PUSH_REGISTRY=

Expand Down
8 changes: 7 additions & 1 deletion tools/gluten-te/ubuntu/tpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ JDWP_SERVER_PORT=${JDWP_SERVER_PORT:-$DEFAULT_JDWP_SERVER_PORT}

if [ -n "$DOCKER_CACHE_REGISTRY" ]
then
docker pull $DOCKER_CACHE_REGISTRY/$DOCKER_SELECTED_TARGET_IMAGE_TPC_WITH_OS_IMAGE || echo "Required image not found in cache registry."
if [ "$DOCKER_CACHE_REGISTRY_PULL" == "ON" ]
then
docker pull $DOCKER_CACHE_REGISTRY/$DOCKER_SELECTED_TARGET_IMAGE_TPC_WITH_OS_IMAGE
docker tag $DOCKER_CACHE_REGISTRY/$DOCKER_SELECTED_TARGET_IMAGE_TPC_WITH_OS_IMAGE $DOCKER_SELECTED_TARGET_IMAGE_TPC_WITH_OS_IMAGE
# Omits $DOCKER_PUSH_REGISTRY currently
exit 0
fi
TPC_DOCKER_BUILD_ARGS="$TPC_DOCKER_BUILD_ARGS --cache-from $DOCKER_CACHE_REGISTRY/$DOCKER_SELECTED_TARGET_IMAGE_TPC_WITH_OS_IMAGE"
fi

Expand Down

0 comments on commit 428e64c

Please sign in to comment.