-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (30 loc) · 1.09 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
SHELL=/bin/bash
IMAGE ?= ghcr.io/aridhia-open-source/fn_task_controller:0.1.1-dev
TESTS_IMAGE ?= ghcr.io/aridhia-open-source/fn_task_controller_tests
TEST_CONTAINER ?= fn-controller-tests
build:
docker build . -t "${IMAGE}"
build_test_container:
docker build . -f test.Dockerfile -t ${TESTS_IMAGE}
run_test_container: cleanup_test_container
docker run --name ${TEST_CONTAINER} ${TESTS_IMAGE}
docker cp ${TEST_CONTAINER}:/app/artifacts/coverage.xml artifacts/coverage.xml
cleanup_test_container:
docker rm ${TEST_CONTAINER} || echo "No ${TEST_CONTAINER} container exists"
send_micro: build
docker save "${IMAGE}" > fndev.tar
microk8s ctr image import fndev.tar
rm fndev.tar
restart_controller:
kubectl rollout restart -n controller deployment analytics-operator
apply:
kubectl apply -f k8s/
exec_docker:
docker run --rm -it --entrypoint sh ${IMAGE}
tests_local:
pytest -v --cov-report xml:artifacts/coverage.xml --cov=controller controller
tests_ci: build_test_container run_test_container cleanup_test_container
pylint_ci:
./scripts/linting/pylint.sh
hadolint:
./scripts/tests/hadolint.sh