Skip to content

Commit

Permalink
Merge pull request #59 from andyzhangx/release-tool
Browse files Browse the repository at this point in the history
chore: add hack/release-image.sh
  • Loading branch information
andyzhangx authored Jul 10, 2020
2 parents cc96b4e + 1d18348 commit a04e886
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PKG = github.com/kubernetes-csi/csi-driver-smb
GIT_COMMIT ?= $(shell git rev-parse HEAD)
REGISTRY ?= andyzhangx
REGISTRY_NAME = $(shell echo $(REGISTRY) | sed "s/.azurecr.io//g")
IMAGE_NAME = smb-csi
IMAGE_NAME ?= smb-csi
IMAGE_VERSION ?= v0.2.0
# Use a custom version for E2E tests if we are testing in CI
ifdef CI
Expand Down
37 changes: 37 additions & 0 deletions hack/release-image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

# Copyright 2020 The Kubernetes 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.

set -euo pipefail

if [[ "$#" -lt 1 ]]; then
echo "please provide a registry name"
exit 1
fi

export REGISTRY_NAME="$1"
export REGISTRY=$REGISTRY_NAME.azurecr.io
export IMAGE_NAME=public/k8s/csi/smb-csi
export CI=1
export PUBLISH=1
make smb-container
make push
make push-latest

echo "sleep 10s ..."
sleep 10
image="mcr.microsoft.com/k8s/csi/smb-csi:latest"
docker pull $image
docker inspect $image | grep Created

0 comments on commit a04e886

Please sign in to comment.