Files
mic-check/scripts/ci/docker-build.sh
James Wampler 11527fc679 Add Gitea/GitHub CI pipeline, QA deploy, and Husky pre-push hook
Builds and tests are driven entirely by scripts/ci/*.sh so every step
(build, test, image build/push, QA deploy) can be run identically in
CI or on a workstation. QA runs as an isolated docker-compose stack
with its Postgres volume wiped and recreated on each deploy.
2026-07-02 12:38:43 -07:00

24 lines
618 B
Bash
Executable File

#!/usr/bin/env bash
# Builds self-contained CI images for the API and admin apps and tags them
# with both the current git sha and "qa" (the tag the QA compose stack pulls).
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")" && source ./lib.sh
cd "$CI_ROOT"
image_names
log "Building $API_IMAGE:$GIT_SHA / :qa"
docker build \
-f src/api/MicCheck.Api/Dockerfile.ci \
-t "$API_IMAGE:$GIT_SHA" \
-t "$API_IMAGE:qa" \
.
log "Building $ADMIN_IMAGE:$GIT_SHA / :qa"
docker build \
-f src/admin/Dockerfile.ci \
-t "$ADMIN_IMAGE:$GIT_SHA" \
-t "$ADMIN_IMAGE:qa" \
src/admin
log "docker-build.sh complete"