forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
100 lines (75 loc) · 3.72 KB
/
Makefile
File metadata and controls
100 lines (75 loc) · 3.72 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
CF_DIAL_TIMEOUT ?= 15
GINKGO_UNIT_TEST_NODES ?= 4
GINKGO_INTEGRATION_TEST_NODES ?= 4
LC_ALL = "en_US.UTF-8"
CF_BUILD_VERSION ?= $$(cat ci/VERSION)
CF_BUILD_SHA ?= $$(git rev-parse --short HEAD)
CF_BUILD_DATE ?= $$(date -u +"%Y-%m-%d")
GOSRC = $(shell find . -name "*.go" ! -name "*test.go" ! -name "*fake*")
all : test build
build : out/cf
check_target_env :
ifndef CF_API
$(error CF_API is undefined)
endif
ifndef CF_PASSWORD
$(error CF_PASSWORD is undefined)
endif
clean :
rm -r $(wildcard out/*)
format :
go fmt ./...
fly-windows-experimental : check_target_env
CF_CLI_EXPERIMENTAL=true CF_TEST_SUITE=./integration/experimental fly -t ci execute -c ci/cli/tasks/integration-windows-oneoff.yml -i cli=./ -x
fly-windows-isolated : check_target_env
CF_TEST_SUITE=./integration/isolated fly -t ci execute -c ci/cli/tasks/integration-windows-oneoff.yml -i cli=./ -x
fly-windows-plugin : check_target_env
CF_TEST_SUITE=./integration/plugin fly -t ci execute -c ci/cli/tasks/integration-windows-oneoff.yml -i cli=./ -x
fly-windows-push : check_target_env
CF_TEST_SUITE=./integration/push fly -t ci execute -c ci/cli/tasks/integration-windows-oneoff.yml -i cli=./ -x
i18n :
$(PWD)/bin/i18n-checkup
integration-cleanup :
$(PWD)/bin/cleanup-integration
integration-experimental : build integration-cleanup
CF_CLI_EXPERIMENTAL=true ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/experimental
integration-isolated : build integration-cleanup
ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/isolated
integration-plugin : build integration-cleanup
ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/plugin
integration-push : build integration-cleanup
ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/push
integration-tests : build integration-cleanup
ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/isolated integration/push
ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 integration/global
make integration-cleanup
integration-tests-full : build integration-cleanup
ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 -nodes $(GINKGO_INTEGRATION_TEST_NODES) integration/isolated integration/push integration/plugin integration/experimental
ginkgo -r -randomizeAllSpecs -slowSpecThreshold 60 integration/global
make integration-cleanup
out/cf : $(GOSRC)
go build -o out/cf \
-ldflags "-w \
-s \
-X code.cloudfoundry.org/cli/version.binaryVersion=$(CF_BUILD_VERSION) \
-X code.cloudfoundry.org/cli/version.binarySHA=$(CF_BUILD_SHA) \
-X code.cloudfoundry.org/cli/version.binaryBuildDate=$(CF_BUILD_DATE)" \
.
test : units
units : format vet build
ginkgo -r -nodes $(GINKGO_UNIT_TEST_NODES) -randomizeAllSpecs -randomizeSuites \
api actor command types util
@echo "\nSWEET SUITE SUCCESS"
units-full : format vet build
@rm -f $(wildcard fixtures/plugins/*.exe)
@ginkgo version
CF_HOME=$(PWD)/fixtures ginkgo -r -nodes $(GINKGO_UNIT_TEST_NODES) -randomizeAllSpecs -randomizeSuites -skipPackage integration
@echo "\nSWEET SUITE SUCCESS"
version :
@echo $(CF_BUILD_VERSION)+$(CF_BUILD_SHA).$(CF_BUILD_DATE)
vet :
@echo "Vetting packages for potential issues..."
go tool vet -all -shadow=true ./api ./actor ./command ./integration ./types ./util ./version
.PHONY : all build clean i18n format version vet
.PHONY : test units units-full integration integration-tests-full integration-cleanup integration-experimental integration-plugin integration-isolated integration-push
.PHONY : fly-windows-experimental fly-windows-isolated fly-windows-plugin fly-windows-push