-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
46 lines (40 loc) · 1.91 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
.PHONY: gen-site
gen-site:
ifeq ($(shard),1)
make transformation_dir=aws/asset-inventory-free output_file_name=aws-asset-inventory-free gen-single-site
endif
ifeq ($(shard),2)
make transformation_dir=aws/compliance-premium output_file_name=aws-compliance gen-single-site
endif
ifeq ($(shard),3)
make transformation_dir=aws/cost output_file_name=aws-cost gen-single-site
endif
ifeq ($(shard),4)
make transformation_dir=aws/data-resilience output_file_name=aws-data-resilience gen-single-site
endif
ifeq ($(shard),5)
make transformation_dir=aws/encryption output_file_name=aws-encryption gen-single-site
endif
ifeq ($(shard),6)
make transformation_dir=azure/compliance-premium output_file_name=azure-compliance gen-single-site
endif
ifeq ($(shard),7)
make transformation_dir=gcp/compliance-premium output_file_name=gcp-compliance gen-single-site
endif
ifeq ($(shard),8)
make transformation_dir=k8s/compliance-premium output_file_name=k8s-compliance gen-single-site
endif
ifeq ($(shard),9)
make transformation_dir=gcp/asset-inventory-free output_file_name=gcp-asset-inventory-free gen-single-site
endif
ifeq ($(shard),10)
make transformation_dir=azure/asset-inventory-free output_file_name=azure-asset-inventory-free gen-single-site
endif
.PHONY: gen-single-site
gen-single-site:
cloudquery migrate transformations/$(transformation_dir)/tests/postgres.yml
pip install -r transformations/$(transformation_dir)/requirements.txt
dbt seed --target dev-pg --profiles-dir transformations/$(transformation_dir)/tests --project-dir transformations/$(transformation_dir)
dbt run --target dev-pg --profiles-dir transformations/$(transformation_dir)/tests --project-dir transformations/$(transformation_dir)
dbt docs generate --target dev-pg --static --profiles-dir transformations/$(transformation_dir)/tests --project-dir transformations/$(transformation_dir)
cp transformations/$(transformation_dir)/target/static_index.html $(output_file_name).html