-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (28 loc) · 1.08 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
COMMIT = $(shell git rev-parse HEAD)
VERSION ?= $(shell bash -o pipefail -c "$(GIT) show-ref --tags -d 2> /dev/null | grep $(COMMIT) | sed -e 's,.* refs/tags/,,' -e 's/\^{}//' | sed -n 1p" || echo "$(COMMIT)")
ROOT := hamgit.ir/aliabdollahi024a/stockprediction
DOCKER_REGISTRY = registry.hamdocker.ir/mlsd-indicatorss
IMAGE_TAG := $(VERSION)
IMAGE_NAME := $(DOCKER_REGISTRY)/stockprediction
IMAGE_NAME_TAG := $(IMAGE_NAME):$(IMAGE_TAG)
docker-build:
docker build \
--file Dockerfile \
--tag "$(IMAGE_NAME_TAG)" \
.
docker tag $(IMAGE_NAME_TAG) $(IMAGE_NAME):latest
docker-push:
docker push $(IMAGE_NAME_TAG)
docker push $(IMAGE_NAME):latest
darkube-deploy:
darkube deploy --token $(DEPLOY_TOKEN) \
--app-id $(APP_ID) \
--image-tag "$(IMAGE_TAG)" \
--job-id "$(CI_JOB_ID)"
test-app:
python test_app.py
darkube-test:
docker run --rm --name test "$(IMAGE_NAME_TAG)" make test-app
setup-dvc:
python3 -m dvc remote modify minio access_key_id $(MINIO_ACCESS_KEY)
python3 -m dvc remote modify minio secret_access_key $(MINIO_SECRET_KEY)