-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (49 loc) · 2.16 KB
/
Copy pathMakefile
File metadata and controls
63 lines (49 loc) · 2.16 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
.PHONY: validate
validate:
python3 tools/validate.py --schema schema/ampy-config.schema.json examples/dev.yaml examples/paper.yaml examples/prod.yaml
PROFILE ?= dev
OVERLAYS ?= overlays/region.us-east-1.yaml
SERVICE_OVERRIDES ?= overrides/service.oms-tighten.yaml
ENV_FILE ?= .env
RUNTIME ?= runtime/overrides.yaml
OUTPUT ?= effective.yaml
.PHONY: effective
effective:
python3 -m ampy_config.cli render --profile $(PROFILE) --overlay $(OVERLAYS) \
--service-override $(SERVICE_OVERRIDES) --env-file $(ENV_FILE) \
--env-allowlist env_allowlist.txt --runtime $(RUNTIME) \
--schema schema/ampy-config.schema.json --defaults config/defaults.yaml \
--provenance --output $(OUTPUT)
.PHONY: effective-noenv
effective-noenv:
python3 -m ampy_config.cli render --profile $(PROFILE) --overlay $(OVERLAYS) \
--service-override $(SERVICE_OVERRIDES) --env-allowlist env_allowlist.txt \
--schema schema/ampy-config.schema.json --defaults config/defaults.yaml \
--provenance --output $(OUTPUT)
.PHONY: secret-get secret-rotate render-redacted render-values
secret-get:
python3 -m ampy_config.cli secret get --plain $(REF)
secret-rotate:
python3 -m ampy_config.cli secret rotate $(REF)
render-redacted:
python3 -m ampy_config.cli render --profile $(PROFILE) --resolve-secrets redacted --provenance
render-values:
python3 -m ampy_config.cli render --profile $(PROFILE) --resolve-secrets values --provenance
.PHONY: agent ops-preview ops-apply ops-rotated
agent:
python3 -m ampy_config.cli agent --profile $(PROFILE)
ops-preview:
python3 -m ampy_config.cli ops preview --profile $(PROFILE) --overlay-file $(OVERLAY_FILE) --expires-at $(EXPIRES_AT) --reason "$(REASON)"
ops-apply:
python3 -m ampy_config.cli ops apply --profile $(PROFILE) --overlay-file $(OVERLAY_FILE) --change-id $(CHANGE_ID) --canary-percent $(CANARY_PCT) --canary-duration $(CANARY_DUR)
ops-rotated:
python3 -m ampy_config.cli ops secret-rotated --profile $(PROFILE) --reference $(REF) --rotated-at $(ROTATED_AT)
.PHONY: build publish test
build:
python -m build
test:
pytest -q
publish:
@echo "Remember to set TWINE_USERNAME/TWINE_PASSWORD or use API token"
python -m pip install --upgrade twine
twine upload dist/*