Files
euchre_camp/scripts/build-ci-image.sh
T
david 3983049d2c
Pull Request / unit-tests (pull_request) Failing after 9s
Pull Request / acceptance-tests (pull_request) Has been skipped
Pull Request / analyze-bump-type (pull_request) Has been skipped
Test / unit-tests (push) Failing after 8s
fix: use correct docker registry and image name
2026-03-31 22:19:54 -07:00

45 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
# Build and test the CI runner image locally
set -e
IMAGE_NAME="euchre-camp-ci-runner"
TAG="${1:-latest}"
echo "Building CI runner image..."
echo "Image: ${IMAGE_NAME}:${TAG}"
echo ""
# Build the image
docker build \
-f Dockerfile.ci \
-t ${IMAGE_NAME}:${TAG} \
.
echo ""
echo "✅ Image built successfully!"
echo ""
# Test the image
echo "Testing CI image..."
docker run --rm ${IMAGE_NAME}:${TAG} sh -c "
echo 'Node.js version:' && node --version
echo 'npm version:' && npm --version
echo 'Git version:' && git --version
echo 'Prisma version:' && npx prisma --version
echo ''
echo 'Installed packages (top 10):'
npm list --depth=0 | head -10
"
echo ""
echo "✅ CI image is ready to use!"
echo ""
echo "To use in GitHub Actions/Gitea Actions:"
echo " container:"
echo " image: docker.notsosm.art/${IMAGE_NAME}:${TAG}"
echo ""
echo "To push to registry:"
echo " docker tag ${IMAGE_NAME}:${TAG} docker.notsosm.art/${IMAGE_NAME}:${TAG}"
echo " docker push docker.notsosm.art/${IMAGE_NAME}:${TAG}"