ci: give migration containers readable names (timestamped) and echo them before launch
This commit is contained in:
1 parent
4309e7501d
commit
d93eba3766
1 file changed
+6
-1
+6
-1
@@ -148,6 +148,11 @@ if [[ -z "$QT_ROOT_OVERRIDE" ]]; then
|
||||
QT_ROOT_OVERRIDE="$QT_ROOT_DEFAULT"
|
||||
fi
|
||||
|
||||
# Name containers with a readable timestamped name so they can be inspected if orphaned
|
||||
CONTAINER_NAME="${CONTAINER_NAME:-migration-pipeline-$(date +%s)-$HOST_UID}"
|
||||
DOCKER_NAME_FLAG="--name ${CONTAINER_NAME}"
|
||||
echo "Launching container with name: ${CONTAINER_NAME}"
|
||||
|
||||
if [[ ! -f "$SCRIPT_DIR/.env" ]]; then
|
||||
echo "Missing env file: $SCRIPT_DIR/.env" >&2
|
||||
exit 1
|
||||
@@ -211,7 +216,7 @@ else
|
||||
DOCKER_TTY_FLAG="-i"
|
||||
fi
|
||||
|
||||
docker run --rm $DOCKER_TTY_FLAG \
|
||||
docker run --rm $DOCKER_TTY_FLAG $DOCKER_NAME_FLAG \
|
||||
--user root \
|
||||
--env-file "$SCRIPT_DIR/.env" \
|
||||
-v "$SCRIPT_DIR:/app" \
|
||||
|
||||
Reference in new issue
Block a user