forked from RalicLooo/polymarket-copy-trading-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (54 loc) · 3.84 KB
/
Makefile
File metadata and controls
69 lines (54 loc) · 3.84 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
# Cloud factory top-level Makefile
CUR_DIR := $(cwd)
PROJECT_DIR := .
LINK_CHECK_DIR := cloud-tools/link_checker
POLICY_CHECK_DIR := cloud-tools/test-policy-parser
CRAWLER_DIR := cloud-tools/crawler
PARSER_DIR := cloud-tools/parameter-parser
SYNC_AT_DIR := cloud-tools/sync-at-components-metadata
DIFF_VAR :=`diff --color automated-test-scripts/parameters_diff_expected.yaml ${PARSER_DIR}/parameters_diff.yaml`
DIFF_VAR_OUTPUTS :=`diff --color automated-test-scripts/outputs_diff_expected.yaml ${PARSER_DIR}/outputs_diff.yaml`
.PHONY: help
help:
@echo "Check MakeFile"
link_check:
echo "Running link checker against all markdown files";
cd ${LINK_CHECK_DIR} && npm install && cd ${CUR_DIR};
${LINK_CHECK_DIR}/link_checker.sh ${PROJECT_DIR} "cloud-tools automated-test-scripts" link_checker_config.json
link_check_release:
echo "Running link checker against all markdown files";
cd ${LINK_CHECK_DIR} && npm install && cd ${CUR_DIR};
${LINK_CHECK_DIR}/link_checker.sh ${PROJECT_DIR} "cloud-tools automated-test-scripts" link_checker_config_release.json
test_policy_check:
echo "Running parameter checker against all test policy files";
cd ${POLICY_CHECK_DIR} && pip install -r requirements.txt && cd ${CUR_DIR};
python ${POLICY_CHECK_DIR}/test_policy_parser.py
gdm_lint:
echo "Running linter (any error will result in non-zero exit code)";
pip install -r cloud-tools/linters/requirements.txt;
pylint -j 0 examples && yamllint -s -d "{extends: default, yaml-files: ['*.yaml'], ignore: runtime-init*}" examples;
run_crawler:
echo "Running crawler against cloud factory artifacts";
cd ${CRAWLER_DIR} && bash ./run_crawler.sh && cd ${CUR_DIR};
echo "Updated file: ${CRAWLER_DIR}/data.json"
run_parameter_parser:
echo "Generating v2 parameter config file"
cd ${PARSER_DIR} && pip install -r requirements.txt && python parameter_parser.py --cloud gdm
run_compare_parameters: run_parameter_parser
echo "Comparing given outputs config file against golden parameters config file"
cd ${PARSER_DIR} && python compare_parameters.py -g golden_parameters.yaml -l 2 && echo '*********' && echo 'The following files have parameters that do not match what is in golden_parameters.yaml' && cat parameters_diff.yaml
run_expected_diff:
# Need to run run_compare_parser before running expected diff or DIFF_VAR variable will not be correct
if [ -n ${DIFF_VAR} ]; then echo "Diff files for parmaters match!"; else echo "========================================"; echo "Diff files do not match: ${DIFF_VAR}"; exit 1; fi
run_outputs_parser:
echo "Generating v2 parameter config file"
cd ${PARSER_DIR} && pip install -r requirements.txt && python parameter_parser.py --type outputs --output-file outputs_config.yaml --cloud gdm
run_compare_outputs: run_outputs_parser
echo "Comparing given outputs config file against golden outputs config file"
cd ${PARSER_DIR} && python compare_parameters.py -g golden_outputs.yaml --output-file outputs_diff.yaml --input-parameters-file outputs_config.yaml -l 2 && echo '*********' && echo 'The following files have outputs that do not match what is in golden_outputs.yaml' && cat outputs_diff.yaml
run_expected_outputs_diff:
# Need to run run_compare_parser before running expected diff or DIFF_VAR variable will not be correct
if [ -n ${DIFF_VAR_OUTPUTS} ]; then echo "Diff files for outputs match!"; else echo "========================================"; echo "Diff files do not match: ${DIFF_VAR_OUTPUTS}"; exit 1; fi
run_sync_at_metadata:
echo "Syncing AT component metadata"
cd ${SYNC_AT_DIR} && ./sync_at_components_metadata.sh --config-directories ../../examples/autoscale/bigip-configurations,../../examples/quickstart/bigip-configurations,../../examples/failover/bigip-configurations --template-directory ../../examples --runtime-init-package-url https://cdn.f5.com/product/cloudsolutions/f5-bigip-runtime-init/v2.0.2/dist/f5-bigip-runtime-init-2.0.2-1.gz.run --cloud gcp