-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
81 lines (69 loc) · 2.63 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
# Makefile for collecting and installing requirements for cloudify-plugins-sdk.
VENVS := $(shell pyenv virtualenvs --skip-aliases --bare | grep 'project\b')
FUSION_COMMON := fusion-common
FUSION_AGENT := fusion-agent
FUSION_MANAGER := fusion-manager
cloudify_SDK := cloudify-utilities-plugins-sdk
BRANCH := master
SHELL := /bin/bash
ifneq ($(GH_USER),)
DOMAIN=${GH_USER}:${GITHUB_PASSWORD}@eos2git.cec.lab.emc.com/ISG-Edge
else
DOMAIN=${GH_TOKEN}@github.com/fusion-e
endif
default:
make download_from_git
make setup_local_virtual_env
make run_tests
compile:
make download_from_git
make setup_local_virtual_env
download_from_git:
make download_fusion_common
make download_fusion_agent
make download_fusion_manager
make download_cloudify_sdk
setup_local_virtual_env:
ifneq ($(VENVS),)
@echo We have $(VENVS)
pyenv virtualenv-delete -f project && pyenv deactivate
endif
pyenv virtualenv 3.11 project
download_fusion_common:
ifneq ($(wildcard ${HOME}/${FUSION_COMMON}*),)
@echo "Found ${HOME}/${FUSION_COMMON}."
else
git clone --depth 1 https://${DOMAIN}/${FUSION_COMMON}.git ${HOME}/${FUSION_COMMON} -b ${BRANCH} && cd ${HOME}/${FUSION_COMMON} && cd
endif
download_fusion_agent:
ifneq ($(wildcard ${HOME}/${FUSION_AGENT}*),)
@echo "Found ${HOME}/${FUSION_AGENT}."
else
git clone --depth 1 https://${DOMAIN}/${FUSION_AGENT}.git ${HOME}/${FUSION_AGENT} -b ${BRANCH} && cd ${HOME}/${FUSION_AGENT} && cd
endif
download_fusion_manager:
ifneq ($(wildcard ${HOME}/${FUSION_MANAGER}*),)
@echo "Found ${HOME}/${FUSION_MANAGER}."
else
git clone --depth 1 https://${DOMAIN}/${FUSION_MANAGER}.git ${HOME}/${FUSION_MANAGER} -b ${BRANCH} && cd ${HOME}/${FUSION_MANAGER}/mgmtworker && cd
endif
download_cloudify_sdk:
ifneq ($(wildcard ${HOME}/${cloudify_SDK}*),)
@echo "Found ${HOME}/${cloudify_SDK}."
else
git clone --depth 1 https://${GH_TOKEN}@github.com/cloudify-incubator/${cloudify_SDK}.git ${HOME}/${cloudify_SDK} -b master && cd ${HOME}/${cloudify_SDK} && cd
endif
cleanup:
pyenv virtualenv-delete -f project
rm -rf ${FUSION_MANAGER} ${FUSION_AGENT} ${FUSION_COMMON}
run_tests:
@echo "Starting executing the tests."
HOME=${HOME} VIRTUAL_ENV=${HOME}/.pyenv/${VENVS} tox
clrf:
@find . \( -path ./.tox -prune -o -path ./.git -prune \) -o -type f -exec dos2unix {} \;
wheels:
@echo "Creating wheels..."
@pip wheel ${HOME}/${FUSION_COMMON}/ -w /workspace/build/ --find-links /workspace/build
@pip wheel ${HOME}/${FUSION_AGENT}/ -w /workspace/build/ --find-links /workspace/build
@pip wheel ${HOME}/${FUSION_MANAGER}/mgmtworker -w /workspace/build/ --find-links /workspace/build
@pip wheel ${HOME}/${cloudify_SDK} -w /workspace/build/ --find-links /workspace/build