Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
remove docker test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Smith committed Feb 20, 2020
1 parent 22d6e18 commit d12db91
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 635 deletions.
21 changes: 1 addition & 20 deletions docker.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: docker.build docker.test docker.pkg
.PHONY: docker.build docker.pkg

SHARD=0
SHARDS=1
Expand All @@ -12,7 +12,6 @@ images:=$(if $(TRAVIS_COMMIT_RANGE),$(shell git diff --name-only $(TRAVIS_COMMIT
images:=$(shell echo "$(all_images) $(images)" | tr " " "\n" | sort | uniq -d)

docker_build=docker.build.
docker_test=docker.test.
docker_pkg=docker.pkg.
docker_push=docker.push.

Expand All @@ -26,12 +25,10 @@ docker.help:
@echo ' $(docker_pull)$$image pull $$image from dockerhub'
@echo ''
@echo ' $(docker_build)$$container build $$container'
@echo ' $(docker_test)$$container test that $$container will build'
@echo ' $(docker_pkg)$$container package $$container for a push to dockerhub'
@echo ' $(docker_push)$$container push $$container to dockerhub '
@echo ''
@echo ' docker.build build all defined docker containers (based on dockerhub base images)'
@echo ' docker.test test all defined docker containers'
@echo ' docker.pkg package all defined docker containers (using local base images)'
@echo ' docker.push push all defined docker containers'
@echo ''
Expand All @@ -44,19 +41,14 @@ docker_pull=docker.pull/

build: docker.build

test: docker.test

pkg: docker.pkg

clean: docker.clean

docker.clean:
rm -rf .build

docker.test.shard: $(foreach image,$(shell echo $(images) | python util/balancecontainers.py $(SHARDS) | awk 'NR%$(SHARDS)==$(SHARD)'),$(docker_test)$(image))

docker.build: $(foreach image,$(images),$(docker_build)$(image))
docker.test: $(foreach image,$(images),$(docker_test)$(image))
docker.pkg: $(foreach image,$(images),$(docker_pkg)$(image))
docker.push: $(foreach image,$(images),$(docker_push)$(image))

Expand All @@ -66,9 +58,6 @@ $(docker_pull)%:
$(docker_build)%: docker/build/%/Dockerfile
docker build -f $< .

$(docker_test)%: .build/%/Dockerfile.test
docker build -t $*:test -f $< .

$(docker_pkg)%: .build/%/Dockerfile.pkg
docker build -t $*:latest -f $< .

Expand All @@ -88,21 +77,13 @@ $(docker_push)%: $(docker_pkg)%
@echo $(EDXOPS_FROM)
@echo "$(docker_build)$*: $(docker_pull)$(FROM)" > $@
@if [ "$(EDXOPS_FROM)" != "$(FROM)" ]; then \
echo "$(docker_test)$*: $(docker_test)$(EDXOPS_FROM:@%=)" >> $@; \
echo "$(docker_pkg)$*: $(docker_pkg)$(EDXOPS_FROM:@%=)" >> $@; \
else \
echo "$(docker_test)$*: $(docker_pull)$(FROM)" >> $@; \
echo "$(docker_pkg)$*: $(docker_pull)$(FROM)" >> $@; \
fi

.build/%/Dockerfile.test: docker/build/%/Dockerfile Makefile
@mkdir -p .build/$*
@# perl p (print the line) n (loop over every line) e (exec the regex), like sed but cross platform
@perl -pne "s#FROM edxops/([^:]+)(:\S*)?#FROM \1:test#" $< > $@

.build/%/Dockerfile.pkg: docker/build/%/Dockerfile Makefile
@mkdir -p .build/$*
@# perl p (print the line) n (loop over every line) e (exec the regex), like sed but cross platform
@perl -pne "s#FROM edxops/([^:]+)(:\S*)?#FROM \1:test#" $< > $@

-include $(foreach image,$(images),.build/$(image)/Dockerfile.d)
108 changes: 0 additions & 108 deletions util/balancecontainers.py

This file was deleted.

37 changes: 0 additions & 37 deletions util/docker_images.py

This file was deleted.

Loading

0 comments on commit d12db91

Please sign in to comment.