forked from atlassian/terraform-provider-artifactory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
35 lines (26 loc) · 860 Bytes
/
GNUmakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
TEST?=./...
PKG_NAME=pkg/artifactory
default: build
build: fmtcheck
go install
test:
@echo "==> Starting unit tests"
go test $(TEST) -timeout=30s -parallel=4
artifactory:
@echo "==> Launching Artifactory in Docker..."
@scripts/run-artifactory.sh
docker:
@docker build -t dillongiacoppo/terraform-artifactory .
testacc: fmtcheck artifactory
@echo "==> Starting integration tests"
TF_ACC=1 ARTIFACTORY_USERNAME=admin ARTIFACTORY_PASSWORD=password ARTIFACTORY_URL=http://localhost:8080/artifactory \
go test $(TEST) -v -parallel 20 $(TESTARGS) -timeout 120m
@docker stop artifactory
fmt:
@echo "==> Fixing source code with gofmt..."
gofmt -s -w ./$(PKG_NAME)
goimports -w pkg/artifactory
fmtcheck:
@echo "==> Checking that code complies with gofmt requirements..."
@sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'"
.PHONY: build test testacc fmt