Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
docker-shib-proxy/Makefile
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Shib SP base image * Update CentOS7 repos and test infrastructure * Replace CentOS7 sample app image with official PHP image * Replace ldap,shib idp with simplesamlphp idp * Replace testing image and add selenium standalone image * Test should run in headless mode * Streamline test/release/clean * Update Quickstart
55 lines (45 sloc)
1.46 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is the main interface into the repository for building the image of the Shibboleth SP reverse proxy. | |
# | |
# All targets assume they're running on a Linux or macOS host with Bash and Docker installed. | |
# Any other dependencies should be satisfied by containers. | |
# | |
.DEFAULT_GOAL := help | |
DEBUG = [DEBUG] | |
INFO = [INFO] | |
SUCCESS = [INFO] | |
VERSION := $(shell cat VERSION.txt) | |
compose := docker compose | |
.PHONY: all | |
all: build | |
.PHONY: build | |
build: ## Build the Docker image | |
$(compose) build proxy | |
@echo "$(SUCCESS) Successfully built!" | |
.PHONY: clean | |
clean: ## Remove build artifacts | |
$(compose) down --rmi all | |
@echo "$(SUCCESS) All clean!" | |
.PHONY: help | |
help: ## Display this help (default) | |
@echo "Targets:" | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort \ | |
| awk 'BEGIN {FS = ":.*?## "}; {printf " %-17s%s\n", $$1, $$2}' | |
.PHONY: release | |
release: ## Build the Docker image with the tagged version for release | |
VERSION=${VERSION} $(compose) build proxy | |
@docker images --format "{{.Repository}}:{{.Tag}}" | grep '^shib-proxy:' | \ | |
while read -r line; do \ | |
tag=$$(echo $$line | awk -F: '{print $$2}'); \ | |
if [ "$$tag" != "$(VERSION)" ]; then \ | |
echo "${INFO} Removing tag - $$tag"; \ | |
docker rmi shib-proxy:$$tag; \ | |
fi \ | |
done | |
@echo "$(SUCCESS) Successfully built!" | |
.PHONY: test | |
test: ## Run the tests on the proxy Docker image | |
$(compose) up -d selenium-firefox | |
@echo "${INFO} Waiting for services to come up..." | |
@sleep 30 | |
$(compose) up test | |
$(compose) down |