Skip to content

Commit

Permalink
chore: rename DOCKER_REPO to IMG_REPO.
Browse files Browse the repository at this point in the history
  • Loading branch information
hemanik committed Jul 2, 2018
1 parent ee6328c commit 3c4eefa
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions .make/Makefile.deploy.prow
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ oc-deploy-hook: build-hook deploy-hook ## Deploys hook service only
@echo "Deploys hook service ${TAG}"
@oc process -f $(CLUSTER_DIR)/hook-template.yaml \
-p REGISTRY=$(REGISTRY) \
-p DOCKER_REPO=$(DOCKER_REPO) \
-p IMG_REPO=$(IMG_REPO) \
-p PROJECT_NAME=$(OC_PROJECT_NAME) \
-p IMAGE_TAG=$(TAG) \
-o yaml | oc apply -f -
Expand All @@ -22,16 +22,16 @@ build-hook: update

.PHONY: build-hook-image
build-hook-image:
$(DOCKER) build --build-arg BINARY=hook -t $(REGISTRY)/$(DOCKER_REPO)/$(OC_PROJECT_NAME)-hook -f $(DEPLOY_DOCKERFILE) .
$(DOCKER) tag $(REGISTRY)/$(DOCKER_REPO)-hook $(REGISTRY)/$(DOCKER_REPO)/$(OC_PROJECT_NAME)-hook:$(TAG)
$(DOCKER) build --build-arg BINARY=hook -t $(REGISTRY)/$(IMG_REPO)/$(OC_PROJECT_NAME)-hook -f $(DEPLOY_DOCKERFILE) .
$(DOCKER) tag $(REGISTRY)/$(IMG_REPO)-hook $(REGISTRY)/$(IMG_REPO)/$(OC_PROJECT_NAME)-hook:$(TAG)

.PHONY: push-hook-image
push-hook-image: build-hook-image
$(DOCKER) push $(REGISTRY)/$(DOCKER_REPO)/$(OC_PROJECT_NAME)-hook
$(DOCKER) push $(REGISTRY)/$(IMG_REPO)/$(OC_PROJECT_NAME)-hook

.PHONY: clean-hook-image
clean-hook-image:
$(DOCKER) rmi -f $(REGISTRY)/$(DOCKER_REPO)/$(OC_PROJECT_NAME)-hook
$(DOCKER) rmi -f $(REGISTRY)/$(IMG_REPO)/$(OC_PROJECT_NAME)-hook

.PHONY: oc-deploy-plugins ## Builds plugin images, updates configuration and deploys new version of ike-plugins
oc-deploy-plugins: oc-init-project compile deploy-plugins oc-generate-deployments
Expand All @@ -42,7 +42,7 @@ $(OC_DEPLOYMENTS): oc-%: %
@mkdir -p $(PLUGIN_DEPLOYMENTS_DIR)
@oc process -f $(CLUSTER_DIR)/ike-prow-template.yaml \
-p REGISTRY=$(REGISTRY) \
-p DOCKER_REPO=$(DOCKER_REPO) \
-p IMG_REPO=$(IMG_REPO) \
-p PROJECT_NAME=$(OC_PROJECT_NAME) \
-p PLUGIN_NAME=$< \
-p IMAGE_TAG=$(TAG) \
Expand All @@ -56,16 +56,16 @@ deploy-plugins: build-plugin-images push-plugin-images
.PHONY: build-plugin-images $(PLUGINS)
build-plugin-images: $(BUILD_IMAGES)
$(BUILD_IMAGES): build-%: %
$(DOCKER) build --build-arg BINARY=$< -t $(REGISTRY)/$(DOCKER_REPO)/$(OC_PROJECT_NAME)-$< -f $(DEPLOY_DOCKERFILE) .
$(DOCKER) tag $(REGISTRY)/$(DOCKER_REPO)/$< $(REGISTRY)/$(DOCKER_REPO)/$(OC_PROJECT_NAME)-$<:$(TAG)
$(DOCKER) build --build-arg BINARY=$< -t $(REGISTRY)/$(IMG_REPO)/$(OC_PROJECT_NAME)-$< -f $(DEPLOY_DOCKERFILE) .
$(DOCKER) tag $(REGISTRY)/$(IMG_REPO)/$< $(REGISTRY)/$(IMG_REPO)/$(OC_PROJECT_NAME)-$<:$(TAG)


.PHONY: clean-plugin-images
clean-plugin-images: $(CLEAN_IMAGES)
$(CLEAN_IMAGES): clean-%: %
$(DOCKER) rmi -f $(REGISTRY)/$(DOCKER_REPO)/$(OC_PROJECT_NAME)-$<
$(DOCKER) rmi -f $(REGISTRY)/$(IMG_REPO)/$(OC_PROJECT_NAME)-$<

.PHONY: push-plugin-images
push-plugin-images: build-plugin-images $(PUSH_IMAGES)
$(PUSH_IMAGES): push-%: %
$(DOCKER) push $(REGISTRY)/$(DOCKER_REPO)/$(OC_PROJECT_NAME)-$<
$(DOCKER) push $(REGISTRY)/$(IMG_REPO)/$(OC_PROJECT_NAME)-$<
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CLUSTER_DIR?=${PWD}/cluster
PLUGIN_DEPLOYMENTS_DIR?=$(CLUSTER_DIR)/generated

REGISTRY?=quay.io
DOCKER_REPO?=openshiftio
IMG_REPO?=openshiftio
BUILD_IMAGES:=$(patsubst %,build-%, $(PLUGINS))
PUSH_IMAGES:=$(patsubst %,push-%, $(PLUGINS))
CLEAN_IMAGES:=$(patsubst %,clean-%, $(PLUGINS))
Expand Down
2 changes: 1 addition & 1 deletion cico_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function deploy() {

if [ "${TARGET}" = "rhel" ]; then
export DEPLOY_DOCKERFILE='Dockerfile.deploy.rhel'
export DOCKER_REPO="openshiftio/rhel-"
export IMG_REPO="openshiftio/rhel-"
fi

# Login first
Expand Down
4 changes: 2 additions & 2 deletions cluster/hook-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ parameters:
- name: REGISTRY
required: true
value: quay.io
- name: DOCKER_REPO
- name: IMG_REPO
required: true
value: openshiftio
- name: PROJECT_NAME
Expand Down Expand Up @@ -45,7 +45,7 @@ objects:
terminationGracePeriodSeconds: 180
containers:
- name: hook
image: ${REGISTRY}/${DOCKER_REPO}/${PROJECT_NAME}-hook:${IMAGE_TAG}
image: ${REGISTRY}/${IMG_REPO}/${PROJECT_NAME}-hook:${IMAGE_TAG}
imagePullPolicy: Always
resources:
requests:
Expand Down
4 changes: 2 additions & 2 deletions cluster/ike-prow-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ parameters:
- name: REGISTRY
required: true
value: quay.io
- name: DOCKER_REPO
- name: IMG_REPO
required: true
value: openshiftio
- name: PROJECT_NAME
Expand Down Expand Up @@ -45,7 +45,7 @@ objects:
terminationGracePeriodSeconds: 180
containers:
- name: ${PLUGIN_NAME}
image: ${REGISTRY}/${DOCKER_REPO}/${PROJECT_NAME}-${PLUGIN_NAME}:${IMAGE_TAG}
image: ${REGISTRY}/${IMG_REPO}/${PROJECT_NAME}-${PLUGIN_NAME}:${IMAGE_TAG}
imagePullPolicy: Always
resources:
requests:
Expand Down
2 changes: 1 addition & 1 deletion local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
eval $(minishift docker-env)
docker login -u $(oc whoami) -p $(oc whoami -t) $(minishift openshift registry)
export REGISTRY=$(minishift openshift registry)
export DOCKER_REPO=$(oc project -q)
export IMG_REPO=$(oc project -q)
# end::local_docker_registry[]

# tag::seeding_secrets[]
Expand Down

0 comments on commit 3c4eefa

Please sign in to comment.