Skip to content

Commit

Permalink
registry.sh #1
Browse files Browse the repository at this point in the history
  • Loading branch information
kuritka committed Nov 6, 2020
1 parent f7b5c82 commit 1b1a329
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ terratest:
deploy-full-terratest-setup:
@echo "\n$(YELLOW)deploy registry $(NC)"
# TODO:move to Makefile
./deploy/registry.sh
# ./deploy/registry.sh
$(call install-docker-registry,5000,kind-registry,registry:2)

@echo "\n$(YELLOW)build k8gb docker and push to registry $(NC)"
docker build . -t k8gb:`$(call git-last-commit-hash)`
Expand Down Expand Up @@ -264,3 +265,11 @@ endef
define version
helm show chart chart/k8gb/|awk '/appVersion:/ {print $$2}'
endef

# $1 port (5000), $2 reg_name (kind-registry) $3 image (registry:2)
# see: https://kind.sigs.k8s.io/docs/user/local-registry/
define install-docker-registry
ifeq (`docker inspect -f '{{.State.Running}}' "$2" 2>/dev/null || true`,true)
docker run -d --restart=always -p "$1:5000" --name "$2" "$3"
endif
endef

0 comments on commit 1b1a329

Please sign in to comment.