forked from jdamata/terraform-provider-sonarqube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (21 loc) · 764 Bytes
/
Makefile
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
export GO111MODULE=on
export TF_LOG=DEBUG
SRC=$(shell find . -name '*.go')
SONARQUBE_IMAGE?=sonarqube:latest
SONARQUBE_START_SLEEP?=60
.PHONY: all vet build test
all: fmt vet build
build:
go build -a -tags netgo -o terraform-provider-sonarqube
mkdir -p ~/.terraform.d/plugins/github.com/jdamata/sonarqube/0.1/linux_amd64/
cp terraform-provider-sonarqube ~/.terraform.d/plugins/github.com/jdamata/sonarqube/0.1/linux_amd64/
fmt:
go fmt ./...
vet:
go vet ./...
testacc:
docker run --name sonarqube1 -d -p 9001:9000 ${SONARQUBE_IMAGE}
sleep ${SONARQUBE_START_SLEEP}
-TF_ACC=1 SONAR_HOST=http://localhost:9001 SONAR_USER=admin SONAR_PASS=admin go test -race -coverprofile=coverage.txt -covermode=atomic ./...
docker stop sonarqube1
docker rm sonarqube1