Squashed '.ci/' changes from bc72735..dc2c208
dc2c208 fix: use absolute image URLs for some tasks git-subtree-dir: .ci git-subtree-split: dc2c2082c0a9d6f2f75190f5957c92c3c3507344
This commit is contained in:
parent
8e76c36040
commit
71f4de5a99
12
podman.mk
12
podman.mk
@ -14,18 +14,18 @@ all: test
|
||||
|
||||
|
||||
build:
|
||||
@docker image exists $(IMAGE):$(TAG) || \
|
||||
docker build --rm -t $(IMAGE):$(TAG) --build-arg TAG=$(TAG) .
|
||||
@docker image exists $(REGISTRY)/$(IMAGE):$(TAG) || \
|
||||
docker build --rm -t $(REGISTRY)/$(IMAGE):$(TAG) --build-arg TAG=$(TAG) .
|
||||
|
||||
test: build rm-test-image
|
||||
@test -f Dockerfile.test && \
|
||||
{ docker build --rm -t $(IMAGE):$(TAG)-test --from=$(IMAGE):$(TAG) -f Dockerfile.test . && \
|
||||
docker run --rm --env-host -t $(IMAGE):$(TAG)-test; } || \
|
||||
{ docker build --rm -t $(REGISTRY)/$(IMAGE):$(TAG)-test --from=$(REGISTRY)/$(IMAGE):$(TAG) -f Dockerfile.test . && \
|
||||
docker run --rm --env-host -t $(REGISTRY)/$(IMAGE):$(TAG)-test; } || \
|
||||
echo "No Dockerfile.test found, skipping test"
|
||||
|
||||
scan: build
|
||||
@echo "Scanning $(IMAGE):$(TAG) using Trivy"
|
||||
@trivy $(TRIVY_OPTS) $(IMAGE):$(TAG)
|
||||
@echo "Scanning $(REGISTRY)/$(IMAGE):$(TAG) using Trivy"
|
||||
@trivy $(TRIVY_OPTS) $(REGISTRY)/$(IMAGE):$(TAG)
|
||||
|
||||
push: build
|
||||
@aws ecr-public get-login-password --region $(REGION) | docker login --username AWS --password-stdin $(REGISTRY)
|
||||
|
Loading…
Reference in New Issue
Block a user