Skip to content
Snippets Groups Projects
Commit 314a1e0b authored by Shane Hutchins's avatar Shane Hutchins
Browse files

Merge branch 'configmap' into 'master'

Configmap

See merge request !374
parents 11952835 50db2bb7
No related branches found
No related tags found
1 merge request!374Configmap
Pipeline #188312 failed
......@@ -122,7 +122,6 @@ The following software have components provided under the terms of this license:
- pytest-cov (from https://github.com/pytest-dev/pytest-cov)
- pytest-mock (from https://github.com/pytest-dev/pytest-mock/)
- pytest-order (from https://github.com/pytest-dev/pytest-order)
- pytz (from http://pythonhosted.org/pytz)
- six (from http://pypi.python.org/pypi/six/, https://github.com/benjaminp/six)
- sniffio (from https://github.com/python-trio/sniffio)
- starlette-context (from https://github.com/tomwojcik/starlette-context)
......@@ -154,19 +153,5 @@ The following software have components provided under the terms of this license:
- exceptiongroup (from https://pypi.org/project/exceptiongroup/1.0.1/, https://pypi.org/project/exceptiongroup/1.1.1/)
- portalocker (from https://github.com/WoLpH/portalocker)
- python-dateutil (from https://github.com/dateutil/dateutil)
- typing-extensions (from https://pypi.org/project/typing-extensions/4.4.0/, https://pypi.org/project/typing-extensions/4.5.0/)
- typing-extensions (from https://pypi.org/project/typing-extensions/4.4.0/, https://pypi.org/project/typing-extensions/4.6.0/)
- urllib3 (from https://pypi.org/project/urllib3/2.0.2/)
========================================================================
mit-old-style-no-advert
========================================================================
The following software have components provided under the terms of this license:
- pytz (from http://pythonhosted.org/pytz)
========================================================================
public-domain
========================================================================
The following software have components provided under the terms of this license:
- pytz (from http://pythonhosted.org/pytz)
IMAGE_NAME=policy-service
BASE_IMAGE_NAME=python:3.9-slim-buster
CONTAINER_NAME=policy-service-source
PYTHON=/opt/homebrew/bin/python3.9
AWSENV_PRESHIP=${HOME}/bin/setenv-aws-preship.sh
AWSENV_BLUE=${HOME}/bin/setenv-aws-blue.sh
AWSENV_GREEN=${HOME}/bin/setenv-aws-green.sh
BUILD_DIR := $(shell git rev-parse --show-toplevel)
ENVSUBST=envsubst
TAG=latest
default: test
......@@ -69,12 +72,30 @@ run:
-e POLICY_BUCKET=$(POLICY_BUCKET) \
--name $(IMAGE_NAME) -p $(PORT):$(PORT) $(IMAGE_NAME):$(TAG)
runshell:
cd .. && docker run -it --rm \
-e OPA_URL=http://host.docker.internal:$(OPA_PORT) \
-e ENTITLEMENTS_BASE_URL=${ENTITLEMENTS_BASE_URL} \
-e ENTITLEMENTS_BASE_PATH=${ENTITLEMENTS_BASE_PATH} \
-e LEGAL_BASE_URL=${LEGAL_BASE_URL} \
-e TOKEN="${TOKEN}" \
-e ENABLE_DEV_DIAGNOSTICS=1 \
-e ENABLE_ADMIN_UI=1 \
-e CLOUD_PROVIDER=aws \
-e POLICY_BUCKET=$(POLICY_BUCKET) \
--volume $(BUILD_DIR):/src \
--entrypoint /bin/bash \
--name $(CONTAINER_NAME) \
$(BASE_IMAGE_NAME)
exec:
docker exec -it $(IMAGE_NAME) sh
clean:
- docker rm -f $(IMAGE_NAME)
- docker rm -f $(OPA_NAME)
- docker rm -f $(CONTAINER_NAME)
- rm -f *.log
- rm -f *_debug.json
- rm -f *dump*.json
......@@ -325,7 +346,7 @@ echoenv:
pull:
docker pull openpolicyagent/opa --platform linux/amd64
docker pull python:3.9-slim-buster
docker pull $(BASE_IMAGE_NAME)
gcp_opa: gcp_set_token gcp_init
#(ENVSUBST) < tests/gcp_init.yaml > $(TMP)/config.yaml
......
pip install --upgrade pip
pip install wheel pytest pytest-cov
pip install -r requirements.txt
pip install -r requirements_dev.txt
pip install -r app/requirements.txt
export PYTEST_DIR="app/tests/unit"
export PYTEST_COV="app"
export PYTHONPATH=app
pytest --junit-xml=unit_tests_report.xml $PYTEST_OPTIONS --cov="$PYTEST_COV" --cov-report=xml:coverage.xml --cov-report=term "$PYTEST_DIR"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment