generated from konveyor/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
85 lines (67 loc) · 2.41 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
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
VENDOR_DIR ?= /tmp/konveyor-vendor
ARCH ?= amd64
JUNIT_REPORT_DIR ?= /tmp/junit-report
# Setup local minikube with tackle - work in progress (TODO: enable auth)
# This is for local setup, CI uses shared github actions
setup:
mkdir -p ${VENDOR_DIR}
rm -rf ${VENDOR_DIR}/start-minikube.sh
rm -rf ${VENDOR_DIR}/install-tackle.sh
curl https://raw.githubusercontent.com/konveyor/operator/main/hack/start-minikube.sh -Lo ${VENDOR_DIR}/start-minikube.sh && chmod +x ${VENDOR_DIR}/start-minikube.sh
curl https://raw.githubusercontent.com/konveyor/operator/main/hack/install-tackle.sh -Lo ${VENDOR_DIR}/install-tackle.sh && chmod +x ${VENDOR_DIR}/install-tackle.sh
${VENDOR_DIR}/start-minikube.sh && \
${VENDOR_DIR}/install-tackle.sh
# Clean local minikube with tackle
clean:
minikube delete || true
# Update Hub dependency with latest binding and api.
update-hub:
go get -u github.com/konveyor/tackle2-hub@main
#
# Test tiers.
#
# Set HUB_BASE_URL to point to Konveyor installation, e.g. export HUB_BASE_URL="http://192.168.39.16/hub"
#
# TIER0 - a core functionality, should never fail, Konveyor would be fully broken.
test-tier0:
$(MAKE) test-analysis
# TIER1 - all normal features expected to work.
test-tier1:
${MAKE} test-hub-api
$(MAKE) test-metrics
TIER1=1 $(MAKE) test-analysis
# TIER2 - advanced features and nice-to-haves.
test-tier2:
TIER2=1 $(MAKE) test-analysis
# TIER3
test-tier3:
$(MAKE) test-jira
$(MAKE) test-migrationwave
TIER3=1 $(MAKE) test-analysis
#
# Feature tests.
#
# Application analysis tests.
test-analysis:
go test -count=1 -p=1 -timeout 7200s -v ./analysis/...
# Metrics.
test-metrics:
cd e2e/metrics/ && ginkgo -v --junit-report=metrics-report.xml --output-dir=${JUNIT_REPORT_DIR}
# Jira Integration.
test-jira:
cd e2e/jiraintegration/ && ginkgo -v --junit-report=jiraintegration-report.xml --output-dir=${JUNIT_REPORT_DIR}
# Migration wave
test-migrationwave:
cd e2e/migrationwave/ && ginkgo -v --junit-report=migrationwave-report.xml --output-dir=${JUNIT_REPORT_DIR}
# Hub API remote tests.
test-hub-api:
./hub-api/run-tests.sh ${HUB_TESTS_REF}
# Add next features tests here and call the target from appropriate stage.
# Execute all tests.
test-all: test-tier0 test-tier1 test-tier2
# Merge Junit reports
merge-report:
go install github.com/nezorflame/junit-merger@latest
cd ${JUNIT_REPORT_DIR} && rm -f merged.xml && junit-merger -o merged.xml *
clean-report-dir:
rm -f ${JUNIT_REPORT_DIR}/*