-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (43 loc) · 1.32 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
48
49
50
51
52
53
54
55
56
dex_version=v2_14_0
dex_docker_port=35556
dex_dockerfile=docker_files/Dockerfile_${dex_version}
dex_docker_image_name=dex-api-server
python_bin=venv/bin/python3
pip_bin=venv/bin/pip3
nosetests_bin=venv/bin/nosetests
build:
# Compile protocol buffers
${python_bin} -m grpc_tools.protoc -I./proto \
--python_out=./ \
--grpc_python_out=./ \
proto/dex_k8s_client/dexidp/dex/api/${dex_version}.proto
# Build Dex/OpenLDAP for functional testing
./docker-compose.sh build
run:
./docker-compose.sh up -d
setup:
virtualenv --python python3 venv
install:
${pip_bin} install -r requirements.txt
${python_bin} setup.py install
clean:
./docker-compose.sh down --remove-orphans
${python_bin} setup.py clean --all
healthchecks:
docker inspect --format "{{json .State.Health }}" dex-openldap | jq
test: test_unit test_integration
test_unit:
@echo "Running unit tests..."
${python_bin} setup.py test
test_integration:
@echo "Running integration tests..."
${nosetests_bin} -v --nocapture tests/integration.py
logs:
docker logs ${dex_docker_image_name}
docker logs dex-openldap
# Publish a release to PyPi
# NOTE: This depends on having a correctly configured ~/.pypirc
# NOTE: https://docs.python.org/3.7/distutils/packageindex.html
release:
${python_bin} setup.py sdist bdist_wheel
${python_bin} -m twine upload --skip-existing dist/*