-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for sub-folders when mounting S3 buckets (#263)
* initial support for s3 folders Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com> * adding support for building local component containers with podman Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com> * bug fixes in build bash scripts Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com> * bug fixes in build bash scripts Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com> * bug fixes in build bash scripts Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com> * bug fixes in build bash scripts Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com> * bug fixes in build bash scripts Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com> * bug fixes in build bash scripts Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com> * docker buildx load after build Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com> * docker buildx load after build Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com> --------- Signed-off-by: SRIKUMAR VENUGOPAL <srikumarv@ie.ibm.com>
- Loading branch information
1 parent
b4c16e4
commit 24062e9
Showing
14 changed files
with
301 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
src/dataset-operator/build_and_push_multiarch_dataset_operator.sh
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
print_usage() { | ||
echo "usage: $0 [-p] <REGISTRY_URL> <VERSION>" | ||
echo "Use -p to build and push multiarch images" | ||
} | ||
|
||
PUSH="false" | ||
while getopts 'p' flag; do | ||
case "$flag" in | ||
p) | ||
PUSH="true" | ||
;; | ||
?) | ||
print_usage >&2 | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
shift $((OPTIND-1)) | ||
|
||
REGISTRY_URL="${1:-quay.io/datashim-io}" | ||
VERSION="${2:-latest}" | ||
|
||
docker_build () { | ||
docker buildx build --platform linux/amd64 -t ${REGISTRY_URL}/dataset-operator:${VERSION} . | ||
docker buildx build --load -t ${REGISTRY_URL}/dataset-operator:${VERSION} . | ||
} | ||
|
||
docker_build_and_push () { | ||
docker buildx build --platform linux/amd64,linux/arm64,linux/ppc64le --push -t ${REGISTRY_URL}/dataset-operator:${VERSION} . | ||
} | ||
|
||
podman_build () { | ||
podman manifest create ${REGISTRY_URL}/dataset-operator:${VERSION} | ||
podman buildx build --platform linux/amd64,linux/arm64 --manifest ${REGISTRY_URL}/dataset-operator:${VERSION} . | ||
} | ||
|
||
podman_push () { | ||
podman manifest push ${REGISTRY_URL}/dataset-operator:${VERSION} | ||
|
||
} | ||
|
||
DOCKERCMD="docker" | ||
ALTDOCKERCMD="podman" | ||
if !(command -v ${DOCKERCMD} &> /dev/null) | ||
then | ||
echo "Docker command not found" | ||
if !(command -v ${ALTDOCKERCMD} &> /dev/null) | ||
then | ||
echo "Neither ${DOCKERCMD} nor ${ALTDOCKERCMD} commands found.. cannot build " | ||
exit 1 | ||
else | ||
DOCKERCMD=${ALTDOCKERCMD} | ||
fi | ||
else | ||
echo "Docker command found" | ||
cmd_type=$(type -t ${DOCKERCMD}) | ||
if [ $cmd_type == "alias" ] | ||
then | ||
echo "${DOCKERCMD} is an alias, switching to ${ALTDOCKERCMD}" | ||
DOCKERCMD=${ALTDOCKERCMD} | ||
fi | ||
fi | ||
|
||
if [ $PUSH == "true" ] | ||
then | ||
echo "pushing images to the registry" | ||
if [ ${DOCKERCMD} == "docker" ] | ||
then | ||
docker_build_and_push | ||
else | ||
podman_build | ||
podman_push | ||
fi | ||
else | ||
echo "building image locally" | ||
if [ ${DOCKERCMD} == "docker" ] | ||
then | ||
docker_build | ||
else | ||
podman_build | ||
fi | ||
fi |
Oops, something went wrong.