provision tests, add parameter to keep the containers running after the test is done.

This commit is contained in:
2026-08-05 16:00:44 -07:00
parent 55c7287b3d
commit ba379b253e
3 changed files with 14 additions and 6 deletions
+8 -6
View File
@@ -1,18 +1,20 @@
#!/usr/bin/env bash
LOCAL_REPO_NAME="git-repo"
local_clone="git-repo"
sh -c "rm -rfv $LOCAL_REPO_NAME"
sh -c "rm -rfv $local_clone"
echo "Downloading Repo '$REPO' : Branch '$BRANCH'"
git clone $REPO --branch=$BRANCH $LOCAL_REPO_NAME
git clone $REPO --branch=$BRANCH $local_clone
cd $LOCAL_REPO_NAME
cd $local_clone
echo "Starting Executable Script '$EXEC'"
#tail -F /var/mail/mail &
#tail -F /var/mail/ansible &
if [[ "$KEEP_ALIVE" == "Y" ]]; then
tail -F /var/mail/mail &
tail -F /var/mail/ansible &
fi
logfile="/root/test.log"
$EXEC > $logfile &
@@ -27,6 +27,7 @@ services:
- REPO=$REPO
- BRANCH=$BRANCH
- EXEC=$EXEC
- KEEP_ALIVE=$KEEP_ALIVE
volumes:
- type: volume
source: pt-storage
@@ -56,6 +57,7 @@ services:
- REPO=$REPO
- BRANCH=$BRANCH
- EXEC=$EXEC
- KEEP_ALIVE=$KEEP_ALIVE
volumes:
- type: volume
source: pt-storage
@@ -85,6 +87,7 @@ services:
- REPO=$REPO
- BRANCH=$BRANCH
- EXEC=$EXEC
- KEEP_ALIVE=$KEEP_ALIVE
volumes:
- type: volume
source: pt-storage
@@ -114,6 +117,7 @@ services:
- REPO=$REPO
- BRANCH=$BRANCH
- EXEC=$EXEC
- KEEP_ALIVE=$KEEP_ALIVE
volumes:
- type: volume
source: pt-storage
@@ -143,6 +147,7 @@ services:
- REPO=$REPO
- BRANCH=$BRANCH
- EXEC=$EXEC
- KEEP_ALIVE=$KEEP_ALIVE
volumes:
- type: volume
source: pt-storage
+1
View File
@@ -21,3 +21,4 @@ EXTRA_UBUNTU=""
REPO=https://git.hyperling.com/me/env-ansible
BRANCH=stage
EXEC="./setup.sh -l -g -s"
#KEEP_ALIVE=Y