forked from aws-quickstart/quickstart-jfrog-artifactory
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
66 lines (48 loc) · 1.75 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
.PHONY: help run submodules
USEVENV ?= true
VENV=$${PWD}/venv
VENVBIN=${VENV}/bin
SHELL ?= /bin/bash
test: lint submodules
ifeq ($(USEVENV), true)
$(MAKE) venv
${VENVBIN}/taskcat test run -n -l
else
taskcat test run -n -l
endif
venv/bin/python3:
python3 -m venv ${VENV}
venv/bin/taskcat: venv/bin/python3
${VENVBIN}/pip3 install taskcat
venv/bin/aws: venv/bin/python3
${VENVBIN}/pip3 install awscli
venv: venv/bin/taskcat venv/bin/aws
submodules:
git submodule init
git submodule update --init --recursive
help:
@echo "make test : executes ${VENVBIN}/taskcat"
@echo "if running in a container without venv please set USEVENV to false"
create: venv
${VENVBIN}/aws cloudformation create-stack --stack-name test --template-body file://$(pwd)/templates/jfrog-artifactory-ec2-new-vpc.template --parameters $(cat .ignore/params) --capabilities CAPABILITY_IAM
delete: venv
${VENVBIN}/aws cloudformation delete-stack --stack-name test
.ONESHELL:
lint:
ifeq ($(USEVENV), true)
$(MAKE) venv
time ${VENVBIN}/taskcat lint
else
time taskcat lint
endif
public_repo: venv
${VENVBIN}/taskcat -c theflash/ci/config.yml -u
#https://${VENVBIN}/taskcat-tag-quickstart-jfrog-artifactory-c2fa9d34.s3-us-west-2.amazonaws.com/quickstart-jfrog-artifactory/templates/jfrog-artifactory-ec2-main.template
#curl https://${VENVBIN}/taskcat-tag-quickstart-jfrog-artifactory-7008506c.s3-us-west-2.amazonaws.com/quickstart-jfrog-artifactory/templates/jfrog-artifactory-ec2-main.template
get_public_dns: venv
${VENVBIN}/aws elb describe-load-balancers | jq '.LoadBalancerDescriptions[]| .CanonicalHostedZoneName'
get_bastion_ip: venv
${VENVBIN}/aws ec2 describe-instances | jq '.[] | select(.[].Instances[].Tags[].Value == "LinuxBastion") '
clean:
realclean:
rm -fr ${VENV} submodules