26 lines
654 B
Bash
26 lines
654 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
VERSION="${1:-}"
|
|
REGISTRY="registry.c5ai.ch/pieced/pieced-portal"
|
|
|
|
if [[ -z "$VERSION" ]]; then
|
|
echo "Usage: ./buildanddeploy.sh <version>"
|
|
echo "Example: ./buildanddeploy.sh 0.2.0"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Building pieced-portal:${VERSION}..."
|
|
npm install
|
|
docker build -t "${REGISTRY}:${VERSION}" .
|
|
docker push "${REGISTRY}:${VERSION}"
|
|
|
|
echo ""
|
|
echo "✓ Pushed ${REGISTRY}:${VERSION}"
|
|
echo ""
|
|
echo "Next steps:"
|
|
echo " 1. Update image tag in pieced-gitops/apps/portal/deployment.yaml:"
|
|
echo " image: ${REGISTRY}:${VERSION}"
|
|
echo " 2. git commit + push to pieced-gitops"
|
|
echo " 3. ArgoCD syncs automatically"
|