This repository has been archived by the owner on Feb 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM alpine:3.6 | ||
|
||
ENV CIBULLY_VERSION 0.0.1-rc.3 | ||
ENV CIBULLY_CHECKSUM c2e299cf781b6e79648f9f54b24441b3aba4897a6ed0295b38f3c6ca488bd101 | ||
|
||
ADD https://github.com/ahelal/ci-bully/releases/download/v${CIBULLY_VERSION}/ci-bully_${CIBULLY_VERSION}_linux_amd64 /usr/bin/cibully | ||
RUN set -ex \ | ||
&& echo "${CIBULLY_CHECKSUM} /usr/bin/cibully" | sha256sum -c \ | ||
&& chmod +x /usr/bin/cibully \ | ||
&& mkdir /config \ | ||
&& apk add --update-cache --no-cache ca-certificates \ | ||
&& rm -rf /var/cache/apk/* | ||
VOLUME /config | ||
WORKDIR /config | ||
|
||
CMD [ "/bin/sh", "-c", "echo You need to run dockers with cibuly ARGS" ] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
MAKEFLAGS += --warn-undefined-variables | ||
.DEFAULT_GOAL := build | ||
PHONY: all build test push push_latest clean clean_all | ||
|
||
M = $(shell printf "\033[34;1m▶\033[0m") | ||
|
||
NAME := "quay.io/ahelal/cibully" | ||
VERSION := $(shell cat .VERSION) | ||
BUILD_ARGS := --build-arg VERSION=${VERSION} | ||
|
||
|
||
docker: dbuild dpush dpush_latest | ||
|
||
dbuild: | ||
$(info $(M) Building ${NAME}:${VERSION}…) | ||
@#docker build ${BUILD_ARGS} --no-cache=True -t ${NAME}:${VERSION} -f Dockerfile . | ||
docker build ${BUILD_ARGS} -t ${NAME}:${VERSION} -f Dockerfile . | ||
|
||
dtests: | ||
@if ! docker images $(NAME) | awk '{print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi | ||
@docker tag $(NAME):$(VERSION) $(NAME):dev | ||
@./test/run_tests.sh tests | ||
|
||
dtests-debug: | ||
@if ! docker images $(NAME) | awk '{print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi | ||
@docker tag $(NAME):$(VERSION) $(NAME):dev | ||
@./test/run_tests.sh tests-debug | ||
|
||
dpush: | ||
@echo ${VERSION} | ||
@if ! docker images $(NAME) | awk '{print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME) version $(VERSION) is not yet built. Please run 'make build'"; false; fi | ||
$(info $(M) Pushing ${NAME}:${VERSION}…) | ||
@docker push "${NAME}:${VERSION}" | ||
|
||
dpush_latest: | ||
$(info $(M) Linking latest and pushing ${NAME}:${VERSION}…) | ||
docker tag $(NAME):$(VERSION) $(NAME):latest | ||
docker push "${NAME}:latest" | ||
|
||
dclean: | ||
@if docker images $(NAME) | awk '{print $$2 }' | grep -q -F $(VERSION); then echo "*** Cleaning ${NAME}:${VERSION} ***"; docker rmi "${NAME}:${VERSION}"; else echo "*** No image ${NAME}:${VERSION} ***"; fi | ||
|
||
|
||
dclean_all: clean | ||
$(info $(M) Cleaning all…) | ||
@#@if docker images $(NAME) | awk '{print $$2 }'; then echo "*** Cleaning ${NAME} ***"; docker rmi "${NAME}"; fi | ||
docker system prune -f |