afedulov commented on code in PR #116:
URL: https://github.com/apache/flink-docker/pull/116#discussion_r866998834


##########
utils.sh:
##########
@@ -0,0 +1,59 @@
+#!/bin/bash -e
+
+IMAGE_REPO=$1
+echo "Image repository: $IMAGE_REPO"
+
+function image_tag() {
+    local dockerfile
+    dockerfile="$1"
+
+    local variant minor_version
+    variant="$(basename "$(dirname "$dockerfile")")"
+
+    echo "${variant}"
+}
+
+function image_name() {
+    local image_tag
+    image_tag="$1"
+
+    echo "${IMAGE_REPO}:${image_tag}"
+}
+
+function build_image() {
+    local dockerfile
+    dockerfile="$1"
+
+    local image_tag image_name dockerfile_dir
+    image_tag="$(image_tag "$dockerfile")"
+    image_name="$(image_name "$image_tag")"
+    dockerfile_dir="$(dirname "$dockerfile")"
+
+    echo >&2 "===> Building ${image_tag} image..."
+    docker build -t "$image_name" "$dockerfile_dir"
+}
+
+function publish_snapshots() {

Review Comment:
   I guess you are right, I'll inline this logic into the pipeline.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to