Skip to content

Commit

Permalink
remove tools directory, we're not interacting with any form of image …
Browse files Browse the repository at this point in the history
…any more
  • Loading branch information
Daniel Holbach committed May 11, 2020
1 parent 82d1f7a commit 0474c86
Show file tree
Hide file tree
Showing 96 changed files with 1 addition and 5,482 deletions.
31 changes: 1 addition & 30 deletions Makefile
@@ -1,35 +1,11 @@
.PHONY: all clean clean-deps lint test deps coverage
.DEFAULT_GOAL := all

# Boiler plate for bulding Docker containers.
# All this must go at top of file I'm afraid.
IMAGE_PREFIX := weaveworks
IMAGE_TAG := $(shell ./tools/image-tag)
GIT_REVISION := $(shell git rev-parse HEAD)
UPTODATE := .uptodate

# Building Docker images is now automated. The convention is every directory
# with a Dockerfile in it builds an image calls weaveworks/<dirname>.
# Dependencies (i.e. things that go in the image) still need to be explicitly
# declared.
%/$(UPTODATE): %/Dockerfile
$(SUDO) docker build --build-arg=revision=$(GIT_REVISION) -t $(IMAGE_PREFIX)/$(shell basename $(@D)) $(@D)/
$(SUDO) docker tag $(IMAGE_PREFIX)/$(shell basename $(@D)) $(IMAGE_PREFIX)/$(shell basename $(@D)):$(IMAGE_TAG)
touch $@

# Get a list of directories containing Dockerfiles
DOCKERFILES=$(shell find * -type f -name Dockerfile ! -path "tools/*" ! -path "vendor/*")
UPTODATE_FILES=$(patsubst %/Dockerfile,%/$(UPTODATE),$(DOCKERFILES))
DOCKER_IMAGE_DIRS=$(patsubst %/Dockerfile,%,$(DOCKERFILES))
IMAGE_NAMES=$(foreach dir,$(DOCKER_IMAGE_DIRS),$(patsubst %,$(IMAGE_PREFIX)/%,$(shell basename $(dir))))

# Python-specific stuff
TOX := $(shell command -v tox 2> /dev/null)
PIP := $(shell command -v pip3 2> /dev/null)
FLAKE8 := $(shell command -v flake8 2> /dev/null)

DOCS_PORT:=8000

.ensure-tox: .ensure-pip
ifndef TOX
rm -f .ensure-tox
Expand All @@ -51,10 +27,7 @@ ifndef FLAKE8
endif
touch .ensure-pip

images:
$(info $(IMAGE_NAMES))

all: $(UPTODATE_FILES) test lint coverage
all: test lint coverage

deps: setup.py .ensure-tox tox.ini

Expand All @@ -70,8 +43,6 @@ coverage:
$(TOX) -e coverage

clean:
$(SUDO) docker rmi $(IMAGE_NAMES) >/dev/null 2>&1 || true
rm -rf $(UPTODATE_FILES)
rm -rf grafanalib.egg-info
rm -f .ensure-pip .ensure-tox .ensure-flake8
find . -name '*.pyc' | xargs rm
Expand Down
10 changes: 0 additions & 10 deletions tools/.gitignore

This file was deleted.

52 changes: 0 additions & 52 deletions tools/README.md

This file was deleted.

46 changes: 0 additions & 46 deletions tools/build/Makefile

This file was deleted.

49 changes: 0 additions & 49 deletions tools/build/golang/Dockerfile

This file was deleted.

22 changes: 0 additions & 22 deletions tools/build/golang/build.sh

This file was deleted.

4 changes: 0 additions & 4 deletions tools/build/haskell/Dockerfile

This file was deleted.

12 changes: 0 additions & 12 deletions tools/build/haskell/build.sh

This file was deleted.

41 changes: 0 additions & 41 deletions tools/build/haskell/copy-libraries

This file was deleted.

55 changes: 0 additions & 55 deletions tools/circle.yml

This file was deleted.

0 comments on commit 0474c86

Please sign in to comment.