Skip to content

Commit

Permalink
Use buildx to produce tar
Browse files Browse the repository at this point in the history
Signed-off-by: Sivanantham Chinnaiyan <[email protected]>
  • Loading branch information
sivanantha321 committed Feb 11, 2024
1 parent 306c029 commit 83df39b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build KServe images
run: |
sudo mkdir -p ${DOCKER_IMAGES_PATH}
Expand Down
20 changes: 12 additions & 8 deletions test/scripts/gh-actions/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,25 @@ AGENT_IMG_TAG=${DOCKER_REPO}/${AGENT_IMG}:${GITHUB_SHA}
ROUTER_IMG_TAG=${DOCKER_REPO}/${ROUTER_IMG}:${GITHUB_SHA}

echo "Building Kserve controller image"
docker buildx build . -t "${CONTROLLER_IMG_TAG}"
docker image save -o "${DOCKER_IMAGES_PATH}/${CONTROLLER_IMG}-${GITHUB_SHA}" "${CONTROLLER_IMG_TAG}"
docker buildx build . -t "${CONTROLLER_IMG_TAG}" -o type=docker,dest="${DOCKER_IMAGES_PATH}/${CONTROLLER_IMG}-${GITHUB_SHA}",compression-level=0
#docker buildx build . -t "${CONTROLLER_IMG_TAG}"
#docker image save -o "${DOCKER_IMAGES_PATH}/${CONTROLLER_IMG}-${GITHUB_SHA}" "${CONTROLLER_IMG_TAG}"

echo "Building agent image"
docker buildx build -f agent.Dockerfile . -t "${AGENT_IMG_TAG}"
docker image save -o "${DOCKER_IMAGES_PATH}/${AGENT_IMG}-${GITHUB_SHA}" "${AGENT_IMG_TAG}"
docker buildx build -f agent.Dockerfile . -t "${AGENT_IMG_TAG}" -o type=docker,dest="${DOCKER_IMAGES_PATH}/${AGENT_IMG}-${GITHUB_SHA}",compression-level=0
#docker buildx build -f agent.Dockerfile . -t "${AGENT_IMG_TAG}"
#docker image save -o "${DOCKER_IMAGES_PATH}/${AGENT_IMG}-${GITHUB_SHA}" "${AGENT_IMG_TAG}"

echo "Building router image"
docker buildx build -f router.Dockerfile . -t "${ROUTER_IMG_TAG}"
docker image save -o "${DOCKER_IMAGES_PATH}/${ROUTER_IMG}-${GITHUB_SHA}" "${ROUTER_IMG_TAG}"
docker buildx build -f router.Dockerfile . -t "${ROUTER_IMG_TAG}" -o type=docker,dest="${DOCKER_IMAGES_PATH}/${ROUTER_IMG}-${GITHUB_SHA}",compression-level=0
#docker buildx build -f router.Dockerfile . -t "${ROUTER_IMG_TAG}"
#docker image save -o "${DOCKER_IMAGES_PATH}/${ROUTER_IMG}-${GITHUB_SHA}" "${ROUTER_IMG_TAG}"

pushd python >/dev/null
echo "Building storage initializer"
docker buildx build -t "${STORAGE_INIT_IMG_TAG}" -f storage-initializer.Dockerfile .
docker image save -o "${DOCKER_IMAGES_PATH}/${STORAGE_INIT_IMG}-${GITHUB_SHA}" "${STORAGE_INIT_IMG_TAG}"
docker buildx build -f storage-initializer.Dockerfile . -t "${STORAGE_INIT_IMG_TAG}" -o type=docker,dest="${DOCKER_IMAGES_PATH}/${STORAGE_INIT_IMG}-${GITHUB_SHA}",compression-level=0
# docker buildx build -t "${STORAGE_INIT_IMG_TAG}" -f storage-initializer.Dockerfile .
# docker image save -o "${DOCKER_IMAGES_PATH}/${STORAGE_INIT_IMG}-${GITHUB_SHA}" "${STORAGE_INIT_IMG_TAG}"
popd

echo "Done building images"

0 comments on commit 83df39b

Please sign in to comment.