Used Claude to refactor pipeline code

This commit is contained in:
Murtadha 2024-07-19 18:06:43 -04:00
parent f9799e2aa3
commit 04d5d286a1

View file

@ -51,7 +51,7 @@ pipeline:
- cd /home/mnisyif/docker-containers/mnisyif/frontend
- VERSION=$(cat version.txt)
# Build the new Docker image with the current version tag
- docker build -t frontend:$VERSION .
- docker build -t frontend:$VERSION . || { echo "Docker build failed"; exit 1; }
# Stop and remove the existing container if it exists
- docker stop frontend || true
- docker rm frontend || true
@ -64,7 +64,7 @@ pipeline:
# Remove older versions of the Docker image
- >
for img in $(docker images frontend --format "{{.Tag}}" | grep -v $VERSION); do
docker rmi frontend:$img;
docker rmi frontend:$img || true;
done
trigger: