feat: add create-repo task to ease bootstrapping new project

This commit is contained in:
Stefan Reimer 2022-05-24 16:53:39 +02:00
parent 49ea8c8779
commit cb5facae6c

View File

@ -2,6 +2,8 @@
GTAG=$(shell git describe --tags --match v*.*.* 2>/dev/null || git rev-parse --short HEAD 2>/dev/null) GTAG=$(shell git describe --tags --match v*.*.* 2>/dev/null || git rev-parse --short HEAD 2>/dev/null)
TAG ?= $(shell echo $(GTAG) | awk -F '-' '{ print $$1 "-" $$2 }' | sed -e 's/-$$//') TAG ?= $(shell echo $(GTAG) | awk -F '-' '{ print $$1 "-" $$2 }' | sed -e 's/-$$//')
# EXTRA_TAGS supposed to be set at the caller, eg. $(shell echo $(TAG) | awk -F '.' '{ print $$1 "." $$2 }')
ifeq ($(TRIVY_REMOTE),) ifeq ($(TRIVY_REMOTE),)
TRIVY_OPTS := image TRIVY_OPTS := image
else else
@ -54,5 +56,9 @@ rm-test-image:
ci-pull-upstream: ci-pull-upstream:
git stash && git subtree pull --prefix .ci ssh://git@git.zero-downtime.net/ZeroDownTime/ci-tools-lib.git master --squash && git stash pop git stash && git subtree pull --prefix .ci ssh://git@git.zero-downtime.net/ZeroDownTime/ci-tools-lib.git master --squash && git stash pop
.PHONY: create-repo
create-repo:
aws ecr-public create-repository --repository-name $(IMAGE) --region $(REGION)
.DEFAULT: .DEFAULT:
@echo "$@ not implemented. NOOP" @echo "$@ not implemented. NOOP"