Skip to content

Commit

Permalink
Merge pull request Checkmarx#7243 from Checkmarx/AST-65514
Browse files Browse the repository at this point in the history
build(makefile): update makefile to add podman commands
  • Loading branch information
cxMiguelSilva authored Sep 4, 2024
2 parents d51ee51 + 438cd29 commit b4e6202
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,31 @@ docker: ## build docker image
$(call print-target)
@docker build --build-arg VERSION=${VERSION} --build-arg COMMIT=${COMMIT} -t "kics:${IMAGE_TAG}" .

.PHONY: podman
podman: ## build podman image
$(call print-target)
@podman build --build-arg VERSION=${VERSION} --build-arg COMMIT=${COMMIT} -t "kics:${IMAGE_TAG}" .

.PHONY: docker-compose
dkr-compose: ## build docker image and runs docker-compose up
$(call print-target)
VERSION=${VERSION} COMMIT=${COMMIT} IMAGE_TAG=${IMAGE_TAG} docker-compose up --build

.PHONY: podman-compose
podman-compose: ## build podman image and runs podman-compose up
$(call print-target)
VERSION=${VERSION} COMMIT=${COMMIT} IMAGE_TAG=${IMAGE_TAG} podman-compose up --build

.PHONY: dkr-build-antlr
dkr-build-antlr: ## build ANTLRv4 docker image and generate parser based on given grammar
@docker build -t antlr4-generator:dev -f ./docker/Dockerfile.antlr .
@docker run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/pkg/parser:/work -it antlr4-generator:dev

.PHONY: podman-build-antlr
podman-build-antlr: ## build ANTLRv4 podman image and generate parser based on given grammar
@podman build -t antlr4-generator:dev -f ./docker/Dockerfile.antlr .
@podman run --rm -u $(id -u ${USER}):$(id -g ${USER}) -v $(pwd)/pkg/parser:/work -it antlr4-generator:dev

.PHONY: release
release: ## goreleaser --rm-dist
release: install
Expand Down Expand Up @@ -178,3 +193,7 @@ endef
.PHONY: lint-docker-image
lint-docker-image:
docker run -t --rm -v ./:/app -w /app golangci/golangci-lint:v1.57.2 golangci-lint run -v -c /app/.golangci.yml --timeout 20m

.PHONY: lint-podman-image
lint-podman-image:
podman run -t --rm -v ./:/app -w /app golangci/golangci-lint:v1.57.2 golangci-lint run -v -c /app/.golangci.yml --timeout 20m

0 comments on commit b4e6202

Please sign in to comment.