Skip to content

Commit

Permalink
Add a make target to run interactive shell (#597)
Browse files Browse the repository at this point in the history
This will allow jumping into a shell to run tests and other commands from that (similar to breeze)
  • Loading branch information
kaxil authored Aug 19, 2022
1 parent 2d82aa9 commit 0ff239f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ You can configure the Docker-based development environment as follows:
- ``make run-mypy`` - Run MyPy checks
- ``make run-tests`` - Run CI tests
- ``make run-static-checks`` - Run CI static code checks
- ``make shell`` - To run bash/shell within a container (Allows interactive session)

Following ports are accessible from the host machine:

Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: dev logs stop clean build build-emr_eks_container_example_dag-image build-aws build-google-cloud build-run docs
.PHONY: restart restart-all run-tests run-static-checks run-mypy run-local-lineage-server test-rc-deps help
.PHONY: restart restart-all run-tests run-static-checks run-mypy run-local-lineage-server test-rc-deps shell help

# If the first argument is "run"...
ifeq (run-mypy,$(firstword $(MAKECMDGOALS)))
Expand Down Expand Up @@ -84,5 +84,8 @@ test-rc-deps: ## Test providers RC by building an image with given dependencies
python3 dev/scripts/trigger_master_dag.py '$(DEPLOYMENT_ID)' '$(ASTRONOMER_KEY_ID)' ' $(ASTRONOMER_KEY_SECRET)'
git checkout setup.cfg

shell: ## Runs a shell within a container (Allows interactive session)
docker compose -f dev/docker-compose.yaml run --rm airflow-scheduler bash

help: ## Prints this message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-41s\033[0m %s\n", $$1, $$2}'

0 comments on commit 0ff239f

Please sign in to comment.