Skip to content

Commit

Permalink
update pipeline script
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Nov 6, 2024
1 parent 2d5a4a6 commit f93a4fc
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 39 deletions.
39 changes: 0 additions & 39 deletions assets/docker/scripts/pipeline.sh

This file was deleted.

37 changes: 37 additions & 0 deletions assets/pipeline/scripts/pipeline.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash

arg1="$1"
arg2="$2"

if [ "$arg1" == "-p" ] || [ "$arg2" == "-p" ]; then
docker system prune -a -f
fi

echo "Building base image..."
./assets/docker/scripts/build_base.sh

echo "Successfully built new base image. Currently installed docker images:"
docker images

echo "Building microservices..."
docker compose build --no-cache

echo "Successfully built new microservice images. Currently installed docker images:"
docker images

set -e

if [ "$arg1" == "-d" ] || [ "$arg2" == "-d" ]; then
echo "Deploying base..."
./assets/docker/scripts/push_base.sh
echo "Successfully deployed base image."

echo "Deploying API microservice..."
./assets/docker/scripts/push_image.sh api

echo "Deploying Worker microservice..."
./assets/docker/scripts/push_image.sh worker

echo "Images successfully deployed."
fi

File renamed without changes.

0 comments on commit f93a4fc

Please sign in to comment.