Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ IMAGE := $(REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG)
IMAGE_LOCAL := $(REGISTRY)/$(IMAGE_NAME):local
IMAGE_LATEST := $(REGISTRY)/$(IMAGE_NAME):latest

# Disable TTY to perserve output within Github Actions logs
# CI env variable is always set to true in Github Actions
ifeq "$(CI)" "true"
CI_ARGS:=--no-TTY
endif

# Run in Compose
RUN = docker compose run --rm $(IMAGE_NAME)
RUN_NO_DEPS = docker compose run --no-deps --rm $(IMAGE_NAME)
RUN = docker compose run --rm $(CI_ARGS) $(IMAGE_NAME)
RUN_NO_DEPS = docker compose run --no-deps --rm $(CI_ARGS) $(IMAGE_NAME)

.PHONY: help
help:
Expand Down Expand Up @@ -113,7 +119,7 @@ pytest-unit:

pytest-integration:
@docker compose -f docker-compose.yml -f docker-compose.integration-tests.yml up -d $(IMAGE_NAME)
@docker compose run --rm $(IMAGE_NAME) \
@docker compose run --rm $(CI_ARGS) $(IMAGE_NAME) \
pytest -x -m integration
@make teardown

Expand All @@ -125,7 +131,7 @@ pytest-external:
-e AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY \
-e AWS_DEFAULT_REGION \
--rm $(IMAGE_NAME) \
--rm $(CI_ARGS) $(IMAGE_NAME) \
pytest -x -m external
@make teardown

Expand Down Expand Up @@ -155,11 +161,11 @@ teardown:

.PHONY: docs-build
docs-build: build-local
@docker compose run --rm $(IMAGE_NAME) \
@docker compose run --rm $(CI_ARGS) $(IMAGE_NAME) \
python generate_docs.py ../docs/fides/docs/

.PHONY: docs-serve
docs-serve: docs-build
@docker compose build docs
@docker compose run --rm --service-ports docs \
@docker compose run --rm --service-ports $(CI_ARGS) docs \
/bin/bash -c "pip install -e /fidesctl && mkdocs serve --dev-addr=0.0.0.0:8000"