Skip to content
Snippets Groups Projects
Commit 9d298d79 authored by Burhan Akbar's avatar Burhan Akbar
Browse files

Hardcode password in healthcheck for testingv1

parent 1fc6ba4d
No related branches found
No related tags found
No related merge requests found
......@@ -83,9 +83,9 @@ pipeline {
scp docker-compose.yml ${APP_VM}:~/healthcare/
scp Dockerfile ${APP_VM}:~/healthcare/
"""
// Create directory for SQL files on App VM
// Ensure the target directory exists AND IS EMPTY before copying
sh """
ssh ${APP_VM} 'mkdir -p ~/healthcare/src/main/resources'
ssh ${APP_VM} 'rm -rf ~/healthcare/src/main/resources && mkdir -p ~/healthcare/src/main/resources'
"""
// Copy SQL files needed for DB init
sh """
......@@ -96,11 +96,10 @@ pipeline {
sh """
ssh ${APP_VM} '
cd ~/healthcare &&
# Added -v flag to remove volume
/usr/local/bin/docker-compose down -v --remove-orphans || echo "Compose down failed or had nothing to do."
docker system prune -f || echo "Prune failed."
# Set variable specifically for the up command
MYSQL_ROOT_PASSWORD=comsc /usr/local/bin/docker-compose -f docker-compose.yml up -d --build || echo "Compose up command failed."
# Keep password hardcoded in docker-compose.yml for now
/usr/local/bin/docker-compose -f docker-compose.yml up -d --build || echo "Compose up command failed."
'
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment