Skip to content

Commit

Permalink
Adding push to latest to dockerize script
Browse files Browse the repository at this point in the history
Signed-off-by: Davis Broda <[email protected]>
  • Loading branch information
DavisBroda committed Aug 12, 2024
1 parent 9b42283 commit 9558782
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
23 changes: 22 additions & 1 deletion bin/dockerize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ while [[ $# -gt 0 ]]; do
esac
shift
;;
--latest)
LATEST="true"
shift
;;
--version)
shift; #move past arg
VERSION="$1"
shift
;;
*) # ignore other args
shift
;;
Expand All @@ -44,10 +53,11 @@ function showHelp {
echo " "
echo "Usage:"
echo " "
echo " docker.sh [--publish registry]"
echo " docker.sh [--publish registry] [--latest] [--version ver]"
echo " "
echo " --publish argument controls whether the docker image will be published to dockerhub."
echo " This argument defaults to false. Must be set to one of [false, dockerhub, custom]"
echo " The DOCKER_REGISTRY environment variable "
echo " "
echo " The DOCKER_USERNAME environment variable must exist to run this script, and "
echo " should be set to the user's docker username. "
Expand Down Expand Up @@ -159,6 +169,17 @@ publish() {
else
echo "Attempt to publish docker image failed!"
fi

if [[ "$LATEST" == "true" ]]
echo "Pushing image to Docker as latest"
docker push "$IMAGE_NAME:latest"
DOCKER_RETURN=$?

if [[ $DOCKER_RETURN -eq 0 ]]; then
echo "Image successfully published as latest!"
else
echo "Attempt to publish docker image as latest failed!"
fi
}

echo "Changing directory to sandbox directory ($WORKING_DIR)"
Expand Down
1 change: 1 addition & 0 deletions src/loader/output_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class LocalDuckdbOutputStep(OutputStep):

def __init__(self, conf_dict: Dict[str, str]):
self.conf = LocalDuckdbOutputStepConf(**conf_dict)
self._vaidate_conf(self.conf)

def _vaidate_conf(self, conf: LocalDuckdbOutputStepConf):
if conf.database_dir is None:
Expand Down

0 comments on commit 9558782

Please sign in to comment.