From 47ae0f8a447a2f214ef797ac505324ffde9eeb35 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Fri, 5 Feb 2021 12:33:29 -0800 Subject: [PATCH] Remove tests script and replace by testing with personal image --- Makefile | 9 +++++---- tests/steps.sh | 9 --------- 2 files changed, 5 insertions(+), 13 deletions(-) delete mode 100755 tests/steps.sh diff --git a/Makefile b/Makefile index c073595..0a5396b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ DOCKER_TAG = drone-pre-commit-$(USER) +DOCKER_TAG_PERSONAL = $(DOCKER_TAG):personal .PHONY: clean @@ -6,8 +7,8 @@ DOCKER_TAG = drone-pre-commit-$(USER) default: test .PHONY: test -test: build - docker run --rm -v $(shell pwd):/src:ro --workdir /src $(DOCKER_TAG) ./tests/steps.sh +test: build-personal + docker run --rm -v $(shell pwd):/src:ro --workdir /src $(DOCKER_TAG_PERSONAL) .PHONY: build build: ./Dockerfile @@ -19,7 +20,7 @@ build-personal: build ./Dockerfile.personal docker build \ --build-arg "BASE_IMAGE=$(DOCKER_TAG)" \ -f ./Dockerfile.personal \ - -t "$(DOCKER_TAG):personal" \ + -t "$(DOCKER_TAG_PERSONAL)" \ . .PHONY: install-hooks @@ -31,4 +32,4 @@ check: pre-commit run --all-files .PHONY: all -all: check test build build-personal +all: check test diff --git a/tests/steps.sh b/tests/steps.sh deleted file mode 100755 index 0b53ead..0000000 --- a/tests/steps.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash -set -ex - -# These simulate commands added to a pipeline step - -wget -L -O /usr/bin/hadolint https://github.com/hadolint/hadolint/releases/download/v1.18.0/hadolint-Linux-x86_64 -chmod +x /usr/bin/hadolint - -pre-commit run --all-files