-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (37 loc) · 1.3 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
## Configuration for Makefile.
USER :=
UP42_DOCKERFILE := Dockerfile
DOCKER_TAG := up42-aspectum
DOCKER_VERSION := latest
UP42_MANIFEST := UP42Manifest.json
AWS_ACCESS_KEY := XXXXXXXXXXXXXXXXXX
AWS_SECRET_ACCESS_KEY := XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AWS_REGION := us-east-1
AWS_BUCKET_NAME := your-bucket-name-where-get-files
UID :=
VALIDATE_ENDPOINT := https://api.up42.com/validate-schema/block
REGISTRY := registry.up42.com
install:
pip install -r requirements.txt
clean:
find . -name "__pycache__" -exec rm -rf {} +
find . -name ".mypy_cache" -exec rm -rf {} +
find . -name ".pytest_cache" -exec rm -rf {} +
find . -name ".coverage" -exec rm -f {} +
validate:
curl -X POST -H 'Content-Type: application/json' -d @UP42Manifest.json $(VALIDATE_ENDPOINT)
build:
cd $(SRC);
docker build . \
--build-arg manifest='$(shell cat ${UP42_MANIFEST})' \
--build-arg aws_access_key='${AWS_ACCESS_KEY}' \
--build-arg aws_secret_access_key='${AWS_SECRET_ACCESS_KEY}' \
--build-arg aws_region='${AWS_REGION}' \
--build-arg aws_bucket_name='${AWS_BUCKET_NAME}' \
-t $(REGISTRY)/$(UID)/$(DOCKER_TAG):$(DOCKER_VERSION)
push:
docker push $(REGISTRY)/$(UID)/$(DOCKER_TAG):$(DOCKER_VERSION)
login:
docker login -u $(USER) https://$(REGISTRY)
https://registry.up42.com
.PHONY: build login push install push login