diff --git a/Makefile b/Makefile index 211f54a5..252ac600 100644 --- a/Makefile +++ b/Makefile @@ -131,17 +131,19 @@ images: gmimage lcimage gmimage lcimage: docker build --build-arg GO_LDFLAGS=${GO_LDFLAGS} -t ${IMAGE_REPO}/sedna-${@:image=}:${IMAGE_TAG} -f build/${@:image=}/Dockerfile . + .PHONY: push push-examples push-all push-all: push push-examples + +# push target pushes sedna-built images push: images docker push ${IMAGE_REPO}/sedna-gm:${IMAGE_TAG} docker push ${IMAGE_REPO}/sedna-lc:${IMAGE_TAG} + bash scripts/storage-initializer/push_image.sh push-examples: bash examples/push_image.sh - - .PHONE: e2e e2e: hack/run-e2e.sh diff --git a/scripts/storage-initializer/build_image.sh b/scripts/storage-initializer/build_image.sh old mode 100644 new mode 100755 index d1e95f6f..21feb1d7 --- a/scripts/storage-initializer/build_image.sh +++ b/scripts/storage-initializer/build_image.sh @@ -20,5 +20,6 @@ IMAGE_REPO=${IMAGE_REPO:-kubeedge} IMAGE_TAG=${IMAGE_TAG:-v0.2.0} REPO_PREFIX=${IMAGE_REPO}/sedna-storage-initializer +IMAGE=${REPO_PREFIX}:${IMAGE_TAG} -docker build -t ${REPO_PREFIX}:${IMAGE_TAG} --label sedna=scripts . +docker build -t $IMAGE --label sedna=scripts . diff --git a/scripts/storage-initializer/push_image.sh b/scripts/storage-initializer/push_image.sh new file mode 100755 index 00000000..1dc862da --- /dev/null +++ b/scripts/storage-initializer/push_image.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# Copyright 2021 The KubeEdge Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cd "$(dirname "${BASH_SOURCE[0]}")" + +source build_image.sh +docker push $IMAGE