celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject celix git commit: CELIX-446: Updates runtimes.cmake to use a celix prefix and refactors deployments -> containers
Date Fri, 01 Jun 2018 11:31:35 GMT
Repository: celix
Updated Branches:
  refs/heads/develop 3182ca7aa -> 77ffca39c


CELIX-446: Updates runtimes.cmake to use a celix prefix and refactors deployments -> containers


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/77ffca39
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/77ffca39
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/77ffca39

Branch: refs/heads/develop
Commit: 77ffca39c6ab47c0067188fe61290b1acbf3fb5d
Parents: 3182ca7
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Fri Jun 1 13:30:37 2018 +0200
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Fri Jun 1 13:30:37 2018 +0200

----------------------------------------------------------------------
 bundles/pubsub/examples/CMakeLists.txt | 56 +++++++++---------
 cmake/cmake_celix/Runtimes.cmake       | 92 +++++++++++++++++++++--------
 cmake/cmake_celix/runtime_common.sh.in | 36 ++++++-----
 3 files changed, 117 insertions(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/77ffca39/bundles/pubsub/examples/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/bundles/pubsub/examples/CMakeLists.txt b/bundles/pubsub/examples/CMakeLists.txt
index 91f2efa..58fbd92 100644
--- a/bundles/pubsub/examples/CMakeLists.txt
+++ b/bundles/pubsub/examples/CMakeLists.txt
@@ -68,17 +68,17 @@ add_celix_container("pubsub_subscriber2_udp_mc"
 target_link_libraries(pubsub_subscriber2_udp_mc PRIVATE ${PUBSUB_CONTAINER_LIBS})
 if (ETCD_CMD AND XTERM_CMD)
     #Runtime starting a publish and subscriber for udp mc
-    add_runtime(pubsub_rt_upd_mc
-            NAME udp_mc
-            GROUP pubsub
-            DEPLOYMENTS
+    add_celix_runtime(pubsub_rt_upd_mc
+        NAME udp_mc
+        GROUP pubsub
+        CONTAINERS
             pubsub_publisher_udp_mc
             pubsub_subscriber_udp_mc
             pubsub_subscriber2_udp_mc
-            COMMANDS
+        COMMANDS
             etcd
-            USE_TERM
-            )
+        USE_TERM
+    )
 endif ()
 
 if (BUILD_PUBSUB_PSA_ZMQ)
@@ -206,42 +206,42 @@ if (BUILD_PUBSUB_PSA_ZMQ)
 
     if (ETCD_CMD AND XTERM_CMD)
         #Runtime starting two bundles using both zmq and upd mc pubsub
-        add_runtime(pubsub_rt_zmq_udpmc_combi
-                NAME combi
-                GROUP pubsub
-                DEPLOYMENTS
+        add_celix_runtime(pubsub_rt_zmq_udpmc_combi
+            NAME combi
+            GROUP pubsub
+            CONTAINERS
                 pubsub_publisher_zmq
                 pubsub_subscriber_zmq
                 pubsub_subscriber_zmq
-                COMMANDS
+            COMMANDS
                 etcd
-                USE_TERM
-                )
+            USE_TERM
+        )
 
         #Runtime starting a publish and 2 subscribers for zmq
-        add_runtime(pubsub_rt_zmq
-                NAME zmq
-                GROUP pubsub
-                DEPLOYMENTS
+        add_celix_runtime(pubsub_rt_zmq
+            NAME zmq
+            GROUP pubsub
+            CONTAINERS
                 pubsub_publisher
                 pubsub_subscriber_zmq
                 pubsub_subscriber2_zmq
-                COMMANDS
+            COMMANDS
                 etcd
-                USE_TERM
-                )
+            USE_TERM
+        )
 
         #Runtime starting a multipart (multiple message in one send) publish and subscriber
for zmq
-        add_runtime(pubsub_rt_multipart_zmq
-                NAME zmq_multipart
-                GROUP pubsub
-                DEPLOYMENTS
+        add_celix_runtime(pubsub_rt_multipart_zmq
+            NAME zmq_multipart
+            GROUP pubsub
+            CONTAINERS
                 pubsub_mp_subscriber_zmq
                 pubsub_mp_publisher_zmq
-                COMMANDS
+            COMMANDS
                 etcd
-                USE_TERM
-                )
+            USE_TERM
+        )
     endif ()
 
 endif()

http://git-wip-us.apache.org/repos/asf/celix/blob/77ffca39/cmake/cmake_celix/Runtimes.cmake
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/Runtimes.cmake b/cmake/cmake_celix/Runtimes.cmake
index b502245..b665a03 100644
--- a/cmake/cmake_celix/Runtimes.cmake
+++ b/cmake/cmake_celix/Runtimes.cmake
@@ -24,12 +24,16 @@ if (NOT TARGET celix-runtimes)
 endif ()
 
 function(add_runtime)
+    message(DEPRECATION "add_runtime is depecrated, use add_celix_runtime instead.")
+    add_celix_runtime(${ARGN})
+endfunction()
+function(add_celix_runtime)
     list(GET ARGN 0 RUNTIME_TARGET_NAME)
     list(REMOVE_AT ARGN 0)
 
     set(OPTIONS USE_TERM LOG_TO_FILES)
     set(ONE_VAL_ARGS WAIT_FOR NAME GROUP)
-    set(MULTI_VAL_ARGS DEPLOYMENTS COMMANDS ARGUMENTS)
+    set(MULTI_VAL_ARGS DEPLOYMENTS CONTAINERS COMMANDS ARGUMENTS RELEASE_FILES)
     cmake_parse_arguments(RUNTIME "${OPTIONS}" "${ONE_VAL_ARGS}" "${MULTI_VAL_ARGS}" ${ARGN})
 
     if (NOT RUNTIME_NAME)
@@ -59,18 +63,19 @@ function(add_runtime)
         DEPENDS "${TIMESTAMP_FILE}"
     )
 
-    set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_DEPLOYMENTS" "") #deployments
that should be runned
+    set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_CONTAINERS" "") #containers
that should be runned
     set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_COMMANDS" "") #command
that should be executed
     set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_ARGUMENTS" "") #potential
arguments to use for deployments
+    set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RELEASE_FILES" "") #release
files which needs to be released before starting the containers/commands
     set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_NAME" "${RUNTIME_NAME}")
#The runtime workdir
     set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_GROUP" "${RUNTIME_GROUP}")
#The runtime workdir
     set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_LOC" "${RUNTIME_LOC}")
#The runtime workdir
     set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_USE_TERM" "${RUNTIME_USE_TERM}")
#Wether or not the use terminal
     set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_LOG_TO_FILES" "${RUNTIME_LOG_TO_FILES}")
#log to files or std out/err
-    set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_NEXT_DEPLOYMENT_ID"
"0") #used for indexes int he bash scripts
+    set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_NEXT_CONTAINER_ID" "0")
#used for indexes int he bash scripts
 
     #wait for deployment, e.g. the one that control the lifecycle of the runtime.
-    set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_WAIT_FOR_DEPLOYMENT"
"")
+    set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_WAIT_FOR_CONTAINER"
"")
 
     #wait for command, e.g. the one that control the lifecycle of the runtime.
     set_target_properties(${RUNTIME_TARGET_NAME} PROPERTIES "RUNTIME_WAIT_FOR_COMMAND" "")
@@ -83,7 +88,6 @@ function(add_runtime)
     configure_file("${CELIX_CMAKE_DIRECTORY}/runtime_common.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/common.sh.${RUNTIME_TARGET_NAME}.in.1"
@ONLY)
 
 
-    #replaces $<TARGET_PROPERTY:<RUNTIME_NAME>,RUNTIME_DEPLOYMENTS>
     file(GENERATE
             OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/common.sh.${RUNTIME_TARGET_NAME}.in.2"
             INPUT "${CMAKE_CURRENT_BINARY_DIR}/common.sh.${RUNTIME_TARGET_NAME}.in.1"
@@ -107,17 +111,23 @@ function(add_runtime)
     list(APPEND DEPS "${RUNTIME_TARGET_NAME}")
     set_target_properties(celix-runtimes PROPERTIES "DEPS" "${DEPS}")
 
-    runtime_deployments(${RUNTIME_TARGET_NAME} ${RUNTIME_DEPLOYMENTS})
-    runtime_commands(${RUNTIME_TARGET_NAME} ${RUNTIME_COMMANDS})
-    runtime_arguments(${RUNTIME_TARGET_NAME} ${RUNTIME_ARGUMENTS})
+    celix_runtime_containers(${RUNTIME_TARGET_NAME} ${RUNTIME_DEPLOYMENTS})
+    celix_runtime_containers(${RUNTIME_TARGET_NAME} ${RUNTIME_CONTAINERS})
+    celix_runtime_commands(${RUNTIME_TARGET_NAME} ${RUNTIME_COMMANDS})
+    celix_runtime_arguments(${RUNTIME_TARGET_NAME} ${RUNTIME_ARGUMENTS})
+    celix_runtime_release_files(${RUNTIME_TARGET_NAME} ${RUNTIME_RELEASE_FILES})
 
     if (RUNTIME_WAIT_FOR)
-        runtime_deployment_wait_for(${RUNTIME_TARGET_NAME} ${RUNTIME_WAIT_FOR})
+        celix_runtime_deployment_wait_for(${RUNTIME_TARGET_NAME} ${RUNTIME_WAIT_FOR})
     endif ()
 
 endfunction()
 
 function(runtime_use_term)
+    message(DEPRECATION "runtime_use_term is depecrated, use celix_runtime_use_term instead.")
+    celix_runtime_use_term(${ARGN})
+endfunction()
+function(celix_runtime_use_term)
     #0 is runtime TARGET
     #1 is BOOL (use xterm)
     list(GET ARGN 0 RUNTIME_NAME)
@@ -126,6 +136,10 @@ function(runtime_use_term)
 endfunction()
 
 function(runtime_log_to_files)
+    message(DEPRECATION "runtime_log_to_files is depecrated, use celix_runtime_log_to_files
instead.")
+    celix_runtime_log_to_files(${ARGN})
+endfunction()
+function(celix_runtime_log_to_files)
     #0 is runtime TARGET
     #1 is BOOL (log to files)
     list(GET ARGN 0 RUNTIME_NAME)
@@ -134,36 +148,48 @@ function(runtime_log_to_files)
 endfunction()
 
 function(runtime_deployments)
+    message(DEPRECATION "runtime_deployments is depecrated, use celix_runtime_containers
instead.")
+    celix_runtime_containers(${ARGN})
+endfunction()
+function(celix_runtime_containers)
     #0 is runtime TARGET
     #1..n is deployments
     list(GET ARGN 0 RUNTIME_NAME)
     list(REMOVE_AT ARGN 0)
 
-    get_target_property(DEPLOYMENTS ${RUNTIME_NAME} "RUNTIME_DEPLOYMENTS")
-    foreach(DEPLOYMENT IN ITEMS ${ARGN})
-        get_target_property(DEP_ID ${RUNTIME_NAME} "RUNTIME_NEXT_DEPLOYMENT_ID")
+    get_target_property(CONTAINERS ${RUNTIME_NAME} "RUNTIME_CONTAINERS")
+    foreach(CONTAINER IN ITEMS ${ARGN})
+        get_target_property(DEP_ID ${RUNTIME_NAME} "RUNTIME_NEXT_CONTAINER_ID")
         math(EXPR DEP_ID "${DEP_ID}+1")
-        set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_DEPLOYMENT_${DEPLOYMENT}_ID"
"${DEP_ID}")
-        list(APPEND DEPLOYMENTS "DEPLOYMENT_NAMES[${DEP_ID}]=\"$<TARGET_PROPERTY:${DEPLOYMENT},CONTAINER_NAME>\"")
-        list(APPEND DEPLOYMENTS "DEPLOYMENT_DIRS[${DEP_ID}]=\"$<TARGET_PROPERTY:${DEPLOYMENT},CONTAINER_LOC>\"")
-        list(APPEND DEPLOYMENTS "DEPLOYMENT_DEBUG_OPTS[${DEP_ID}]=\"\${${DEPLOYMENT}_DEBUG_OPTS:-}\"")
-        set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_NEXT_DEPLOYMENT_ID" "${DEP_ID}")
+        set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_DEPLOYMENT_${CONTAINER}_ID"
"${DEP_ID}")
+        list(APPEND CONTAINERS "CONTAINERS_NAMES[${DEP_ID}]=\"$<TARGET_PROPERTY:${CONTAINER},CONTAINER_NAME>\"")
+        list(APPEND CONTAINERS "CONTAINERS_DIRS[${DEP_ID}]=\"$<TARGET_PROPERTY:${CONTAINER},CONTAINER_LOC>\"")
+        list(APPEND CONTAINERS "CONTAINERS_DEBUG_OPTS[${DEP_ID}]=\"\${${CONTAINER}_DEBUG_OPTS:-}\"")
+        set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_NEXT_CONTAINER_ID" "${DEP_ID}")
    endforeach()
 
-   set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_DEPLOYMENTS" "${DEPLOYMENTS}")
+   set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_CONTAINERS" "${CONTAINERS}")
 endfunction()
 
 function(runtime_deployment_wait_for)
+    message(DEPRECATION "runtime_deployment_wait_for is depecrated, use celix_runtime_container_wait_for
instead.")
+    celix_runtime_container_wait_for(${ARGN})
+endfunction()
+function(celix_runtime_container_wait_for)
     #0 is runtime TARGET
     #1 is deployment TARGET
     list(GET ARGN 0 RUNTIME_NAME)
-    list(GET ARGN 1 DEPLOYMENT)
+    list(GET ARGN 1 CONTAINER)
 
-    set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_WAIT_FOR_DEPLOYMENT" "$<TARGET_PROPERTY:${DEPLOYMENT},CONTAINER_LOC>")
+    set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_WAIT_FOR_CONTAINER" "$<TARGET_PROPERTY:${CONTAINER},CONTAINER_LOC>")
     set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_WAIT_FOR_COMMAND" "")
 endfunction()
 
 function(runtime_commands)
+    message(DEPRECATION "runtime_commands is depecrated, use celix_runtime_commands instead.")
+    celix_runtime_commands(${ARGN})
+endfunction()
+function(celix_runtime_commands)
     #0 is runtime TARGET
     #1..n is commands
     list(GET ARGN 0 RUNTIME_NAME)
@@ -177,16 +203,24 @@ function(runtime_commands)
 endfunction()
 
 function(runtime_command_wait_for)
+    message(DEPRECATION "runtime_command_wait_for is depecrated, use celix_runtime_command_wait_for
instead.")
+    celix_runtime_command_wait_for(${ARGN})
+endfunction()
+function(celix_runtime_command_wait_for)
     #0 is runtime TARGET
     #1 is COMMAND STR
     list(GET ARGN 0 RUNTIME_NAME)
     list(GET ARGN 1 COMMAND)
 
     set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_WAIT_FOR_COMMAND" "${COMMAND}")
-    set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_WAIT_FOR_DEPLOYMENT" "")
+    set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_WAIT_FOR_CONTAINER" "")
 endfunction()
 
 function(runtime_arguments)
+    message(DEPRECATION "runtime_arguments is depecrated, use celix_runtime_arguments instead.")
+    celix_runtime_arguments(${ARGN})
+endfunction()
+function(celix_runtime_arguments)
     #0 is runtime TARGET
     #1..n is commands
     list(GET ARGN 0 RUNTIME_NAME)
@@ -199,9 +233,21 @@ function(runtime_arguments)
             math(EXPR IMINUS "${I}-1")
             list(GET ARGN ${IMINUS} DEPLOY_NAME)
             list(GET ARGN ${I} DEPLOY_ARGS)
-            get_target_property(TEST ${RUNTIME_NAME} "RUNTIME_DEPLOYMENT_${DEPLOY_NAME}_ID")
-            list(APPEND ARGUMENTS "DEPLOYMENT_ARGUMENTS[$<TARGET_PROPERTY:${RUNTIME_NAME},RUNTIME_DEPLOYMENT_${DEPLOY_NAME}_ID>]=\"${DEPLOY_ARGS}\"")
+            list(APPEND ARGUMENTS "CONTAIMER_ARGUMENTS[$<TARGET_PROPERTY:${RUNTIME_NAME},RUNTIME_CONTAIMER_${DEPLOY_NAME}_ID>]=\"${DEPLOY_ARGS}\"")
         endforeach()
     endif ()
     set_target_properties(${RUNTIME_NAME} PROPERTIES "RUNTIME_ARGUMENTS" "${ARGUMENTS}")
 endfunction()
+
+function(celix_runtime_release_files)
+    #0 is runtime TARGET
+    #1..n is release files
+    list(GET ARGN 0 RUNTIME_NAME)
+    list(REMOVE_AT ARGN 0)
+
+    get_target_property(RELEASE_FILES ${RUNTIME_NAME} "RELEASE_FILES")
+    foreach(RELEASE_FILE IN ITEMS ${ARGN})
+        list(APPEND RELEASE_FILES "source ${RELEASE_FILE}")
+    endforeach()
+    set_target_properties(${RUNTIME_NAME} PROPERTIES "RELEASE_FILES" "${RELEASE_FILES}")
+endfunction()
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/celix/blob/77ffca39/cmake/cmake_celix/runtime_common.sh.in
----------------------------------------------------------------------
diff --git a/cmake/cmake_celix/runtime_common.sh.in b/cmake/cmake_celix/runtime_common.sh.in
index b819bf8..286aa40 100644
--- a/cmake/cmake_celix/runtime_common.sh.in
+++ b/cmake/cmake_celix/runtime_common.sh.in
@@ -7,25 +7,29 @@ DEPLOY_DIR="${DEPLOY_DIR:-${BUILD_DIR}/deploy}"
 
 #Name & Group
 RUNTIME_NAME="${RUNTIME_NAME:-$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_NAME>}"
-RUNTIME_GROUP="${RUNTIME_NAME:-$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_GROUP>}"
+RUNTIME_GROUP="${RUNTIME_GROUP:-$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_GROUP>}"
 
 #commands
 COMMANDS=${COMMANDS:-"$<JOIN:$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_COMMANDS>,
>"}
 
-#deployments
-$<JOIN:$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_DEPLOYMENTS>,
+#containers
+$<JOIN:$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_CONTAINERS>,
 >
 
-#deployment arguments
+#container arguments
 $<JOIN:$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_ARGUMENTS>,
 >
 
+#release files
+$<JOIN:$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RELEASE_FILES>,
+>
+
 #Options
 TERM_CMD="${TERM_CMD:-xterm}"
 TERM_OPTS="${TERM_OPTS:-}"
 USE_TERM="${USE_TERM:-$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_USE_TERM>}"
 RELEASE_SH="${RELEASE_SH:-}"
-WAIT_FOR_DEPLOYMENT="${WAIT_FOR_DEPLOYMENT:-$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_WAIT_FOR_DEPLOYMENT>}"
+WAIT_FOR_CONTAINER="${WAIT_FOR_CONTAINER:-$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_WAIT_FOR_CONTAINER>}"
 WAIT_FOR_CMD="${WAIT_FOR_CMD:-$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_WAIT_FOR_COMMAND>}"
 LOG_TO_FILES="${LOG_TO_FILES:-$<TARGET_PROPERTY:@RUNTIME_TARGET_NAME@,RUNTIME_LOG_TO_FILES>}"
 KILL_OPTS="${KILL_OPTS:--2}" #default is -2, e.g. SIGINT
@@ -50,9 +54,9 @@ function rt_start_all() {
     echo ""
     echo ""
     echo "********** Starting runtime ${RUNTIME_NAME} **********"
-    for DEPLOYMENT_INDEX in "${!DEPLOYMENT_NAMES[@]}"
+    for CONTAINERS_INDEX in "${!CONTAINERS_NAMES[@]}"
     do
-        rt_run_deployment ${DEPLOYMENT_INDEX}
+        rt_run_deployment ${CONTAINERS_INDEX}
     done
 
     for CMD in ${COMMANDS}; do
@@ -64,33 +68,33 @@ function rt_stop_all() {
     echo "********** Stopping runtime ${RUNTIME_NAME} **********"
     for PID in ${PIDS}; do
         echo "Sending signal to ${PID}"
-        kill ${KILL_OPTS} ${PID}
+        kill ${KILL_OPTS} ${PID} 2> /dev/null; true
     done
 }
 
 function rt_stop() {
     PIDS=$@
     echo "Stopping pids ${PIDS}"
-    kill ${KILL_OPTS} ${PIDS}
+    kill ${KILL_OPTS} ${PIDS} 2> /dev/null; true
 }
 
 function rt_run_deployment() {
     INDEX=$1
-    DEPLOYMENT=${DEPLOYMENT_NAMES[${INDEX}]}
-    DEPLOYMENT_DIR=${DEPLOYMENT_DIRS[${INDEX}]}
-    ARGS=${DEPLOYMENT_ARGUMENTS[${INDEX}]}
+    DEPLOYMENT=${CONTAINERS_NAMES[${INDEX}]}
+    CONTAINERS_DIR=${CONTAINERS_DIRS[${INDEX}]}
+    ARGS=${CONTAINERS_ARGUMENTS[${INDEX}]}
     LOG_FILE="${RUNTIME_DIR}/logs/${DEPLOYMENT}.log"
-    DEBUG_OPTS=${DEPLOYMENT_DEBUG_OPTS[${INDEX}]}
+    DEBUG_OPTS=${CONTAINERS_DEBUG_OPTS[${INDEX}]}
 
     echo ""
     echo "Starting deployment ${DEPLOYMENT}"
-    cd ${DEPLOYMENT_DIR}
+    cd ${CONTAINERS_DIR}
     if [ -d .cache ] ; then
         echo "  Clearing cache"
         rm -fr .cache
     fi
     . ./release.sh #run deployment release
-    echo "  Workdir: ${DEPLOYMENT_DIR}"
+    echo "  Workdir: ${CONTAINERS_DIR}"
     echo "  Cmd used: '${DEBUG_OPTS} ./${DEPLOYMENT} ${ARGS}'"
     if [ "${USE_TERM}" = "TRUE" ] ; then
         if [ "${LOG_TO_FILES}" = "TRUE" ] ; then
@@ -109,7 +113,7 @@ function rt_run_deployment() {
     fi
     PID=$!
     echo "  Pid of deployment '${DEPLOYMENT}' is ${PID}"
-    if [ ! -z "${WAIT_FOR_DEPLOYMENT}" -a "${DEPLOYMENT_DIR}" = "${WAIT_FOR_DEPLOYMENT}"
] ; then
+    if [ ! -z "${WAIT_FOR_CONTAINER}" -a "${CONTAINERS_DIR}" = "${WAIT_FOR_CONTAINER}" ]
; then
         WAIT_FOR_PID=${PID}
         echo "${PID}" > ${RUNTIME_DIR}/run/wait_for_pid
     else


Mime
View raw message