<commit_before># Environment variables expected by this makefile
# DOCKER_TAG - dynamic tag for image
# DOCKER_PUSH_REPOSITORY - URL set by prow preset
# DOCKER_PUSH_DIRECTORY

IMG_NAME = prow-tools
IMG = $(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/$(IMG_NAME)


# build and push on PR, tag with PR number
.PHONY: ci-pr
ci-pr: build-image push-image
push-image: build-image


# build and push on postsubmit, tag with commit ID and current
.PHONY: ci-release
ci-release: build-image tag-image push-image
tag-image: build-image


# tag image with current tag
.PHONY: tag-image
tag-image:
	docker tag $(IMG):$(DOCKER_TAG) $(IMG):current
ifdef DOCKER_POST_PR_TAG
	docker tag $(IMG):$(DOCKER_TAG) $(IMG):$(DOCKER_POST_PR_TAG)
endif


# build image and tag it with commit ID or PR number
.PHONY: build-image
build-image:
	docker build -t $(IMG):$(DOCKER_TAG) --build-arg commit=$(DOCKER_TAG) -f Dockerfile ../../../.


# push image with all tags<commit_msg>Disabled pr tag for prow-tools image. (#2838)<commit_after># Environment variables expected by this makefile
# DOCKER_TAG - dynamic tag for image
# DOCKER_PUSH_REPOSITORY - URL set by prow preset
# DOCKER_PUSH_DIRECTORY

IMG_NAME = prow-tools
IMG = $(DOCKER_PUSH_REPOSITORY)$(DOCKER_PUSH_DIRECTORY)/$(IMG_NAME)


# build and push on PR, tag with PR number
.PHONY: ci-pr
ci-pr: build-image push-image
push-image: build-image


# build and push on postsubmit, tag with commit ID and current
.PHONY: ci-release
ci-release: build-image tag-image push-image
tag-image: build-image


# tag image with current tag
.PHONY: tag-image
tag-image:
	docker tag $(IMG):$(DOCKER_TAG) $(IMG):current


# build image and tag it with commit ID or PR number
.PHONY: build-image
build-image:
	docker build -t $(IMG):$(DOCKER_TAG) --build-arg commit=$(DOCKER_TAG) -f Dockerfile ../../../.


# push image with all tags
{'fraction_non_alphanumeric': 0.1149487317862925, 'fraction_numerical': 0.0021586616297895305, 'mean_word_length': 4.436950146627566, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1859312', 'n_tokens_mistral': 688, 'n_tokens_neox': 664, 'n_words': 206}