Browse Source

Remove tests script and replace by testing with personal image

master
IamTheFij 1 year ago
parent
commit
47ae0f8a44
  1. 9
      Makefile
  2. 9
      tests/steps.sh

9
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

9
tests/steps.sh

@ -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
Loading…
Cancel
Save