-
Andrew Kapuscinski authoredAndrew Kapuscinski authored
Makefile 1.27 KiB
SHELL := /bin/bash
all: dev check-build
# Check if local code will pass CI build
.PHONY: check-build
check-build: docker-base docker-dev-images-locally test-dev
# Run tests on Dockerfile.dev images
.PHONY: test-dev
test-dev:
docker run nrao:workflow ./bin/run-tests.sh
docker run nrao:capability ./bin/run-tests.sh
docker run nrao:notification ./bin/run-tests.sh
# Run tests on Dockerfile.local containers
.PHONY: test
test:
docker exec workspaces_workflow_1 ./bin/run-tests.sh
docker exec workspaces_capability_1 ./bin/run-tests.sh
docker exec workspaces_notification_1 ./bin/run-tests.sh
# Setup local development environment
.PHONY: dev
dev: docker-base
.PHONY: alembic-update
alembic-update:
cd schema; \
env CAPO_PROFILE=local alembic upgrade head
# Build images from Dockerfile.dev
.PHONY: docker-dev-images-locally
docker-dev-images-locally:
docker build -t nrao:workflow -f services/workflow/Dockerfile.local . --build-arg capo_env=docker
docker build -t nrao:capability -f services/capability/Dockerfile.local . --build-arg capo_env=docker
docker build -t nrao:notification -f services/notification/Dockerfile.local . --build-arg capo_env=docker
# Build base image
.PHONY: docker-base
docker-base:
docker build -t marconi.aoc.nrao.edu/ops/base:workspaces -f Dockerfile.base .