jenkins-podman/Makefile
Stefan Reimer 95b1db689e
Some checks reported errors
ZeroDownTime/jenkins-podman/pipeline/head Something is wrong with the build of this commit
ci: final cleanup
2022-01-14 01:35:17 +01:00

27 lines
591 B
Makefile

VERSION ?= 0.2.2
BASE ?= latest-alpine-jdk11
REGISTRY := public.ecr.aws/zero-downtime
REPOSITORY := jenkins-podman
TAG := $(REPOSITORY):v$(VERSION)
ifeq ($(TRIVY_REMOTE),)
TRIVY_OPTS := image
else
TRIVY_OPTS := client --remote ${TRIVY_REMOTE}
endif
.PHONY: build push scan
all: build
build:
podman build --rm --squash-all --build-arg BASE=$(BASE) -t $(TAG) .
push:
aws ecr-public get-login-password --region us-east-1 | podman login --username AWS --password-stdin $(REGISTRY)
podman tag $(TAG) $(REGISTRY)/$(TAG)
podman push $(REGISTRY)/$(TAG)
scan:
trivy $(TRIVY_OPTS) $(TAG)