forked from ImpactInsights/valuestream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (48 loc) · 1.66 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
PKGS = $(shell go list ./... | grep -v /vendor/)
TEST_EVENTS_CUSTOM_HTTP_PATH ?= "/customhttp"
TEST_EVENTS_JENKINS_PATH ?= "/jenkins"
TEST_EVENTS_GITHUB_PATH ?= "/github"
TEST_EVENTS_GITLAB_PATH ?= "/gitlab"
TEST_EVENTS_JIRA_PATH ?= "/jira"
test-unit:
GO111MODULE=on go test -tags=unit -coverprofile=coverage.out $(PKGS)
build:
GO111MODULE=on go build ./...
fmt:
go fmt $(PKGS)
start-stack:
cd test/jaeger-stack && docker-compose down && docker-compose up
start-valuestream-local:
GO111MODULE=on \
JAEGER_REPORTER_LOG_SPANS=1 \
JAEGER_SAMPLER_TYPE=const \
JAEGER_SAMPLER_PARAM=1 \
VS_LOG_LEVEL=debug \
go run main.go -addr=:5000 -tracer=jaeger
start-valuestream-events-test:
GO111MODULE=on \
VS_LOG_LEVEL=debug \
go run main.go -addr=:7778 -tracer=mock
test-service-github-jenkins:
GO111MODULE=on \
VALUESTREAM_URL=http://localhost:5000 \
go test -run TestGithubJenkinsTrace ./traces/trace_service_test.go -v -count=1
test-service-github-ci-build-jenkins:
GO111MODULE=on \
VALUESTREAM_URL=http://localhost:5000 \
go test -run TestGithubJenkinsPRBuildJenkinsDeployTrace ./traces/trace_service_test.go -v -count=1
test-service-events:
TEST_EVENTS_CUSTOM_HTTP_PATH=$(TEST_EVENTS_CUSTOM_HTTP_PATH) \
TEST_EVENTS_JENKINS_PATH=$(TEST_EVENTS_JENKINS_PATH) \
TEST_EVENTS_GITHUB_PATH=$(TEST_EVENTS_GITHUB_PATH) \
TEST_EVENTS_GITLAB_PATH=$(TEST_EVENTS_GITLAB_PATH) \
TEST_EVENTS_JIRA_PATH=$(TEST_EVENTS_JIRA_PATH) \
TEST_EVENTS_URL=http://localhost:7778 \
VS_LOG_LEVEL=DEBUG \
go test \
-run TestService \
-tags=service \
./eventsources/... -count=1 -p 1
docker-image:
docker build -f Dockerfile -t impactinsights/valuestream .
.PHONY: test-unit start-stack fmt