github.com/abayer/test-infra@v0.0.5/mungegithub/submit-queue/Makefile (about)

     1  # Copyright 2017 The Kubernetes Authors.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  KUBECONFIG ?= $(HOME)/.kube/config
    16  
    17  push-nginx:
    18  	# Replace the nginx config and restart the pod.
    19  	kubectl --kubeconfig=$(KUBECONFIG) delete configmap nginx-https-redirect && \
    20  	kubectl --kubeconfig=$(KUBECONFIG) create configmap nginx-https-redirect --from-file=nginx.conf=nginx-redirect/nginx.conf && \
    21  	kubectl --kubeconfig=$(KUBECONFIG) delete pod -l app=nginx-https-redirect
    22  
    23  push-ingress:
    24  	# Update the ingress.
    25  	kubectl --kubeconfig=$(KUBECONFIG) apply --record -f ingress.yaml
    26  
    27  # Updates nginx https proxy and the ingress with the local nginx-redirect/nginx.conf and ingress.yaml files.
    28  push-network: push-nginx push-ingress
    29  
    30  targets := $(shell ls -d deployment/*/ | sed -e "s|deployment/\(.*\)/|\1|"| sed -e "s|^$$||")
    31  
    32  update-all:
    33  	@echo "Updating submit queues for repo(s) [$(targets)] in 4 seconds..."
    34  	@sleep 4
    35  	@$(foreach repo,$(targets),echo "Updating $(repo) submit-queue:"; APP=submit-queue TARGET=$(repo) make --no-print-directory -f ../Makefile push_config deploy;)
    36  
    37  deploy-all:
    38  	@echo "Deploying submit queues for repo(s) [$(targets)] in 4 seconds..."
    39  	@sleep 4
    40  	@$(foreach repo,$(targets),echo "Deploying $(repo) submit-queue:"; APP=submit-queue TARGET=$(repo) make --no-print-directory -f ../Makefile first_time_deploy;)
    41  
    42  .PHONY: push-network update-all deploy-all push-nginx push-ingress