14 Commits

Author SHA1 Message Date
Valentin Lab ba87920715 fix: [compose-core] add missing ``RELATION_DATA_FILE`` var for indirect action 4 weeks ago
Valentin Lab 67ce0adc49 new: [compose-core] move cache files to global cache for increased performance 4 weeks ago
Valentin Lab 662d3f778b new: [compose-core] add ``status`` global action 4 weeks ago
Valentin Lab 69ed33afcb new: [compose-core] add service state tracking 1 month ago
Valentin Lab aea2344b56 fix: [compose-core] make ``stub`` services un-summonable 1 month ago
Valentin Lab e9f3a7fcee fix: [compose-core] improve support of ``run`` action 1 month ago
Valentin Lab c01460dffd new: dev: [compose-core] introduce ``is_docker_compose_action_multi_service`` variable for convenience 1 month ago
Valentin Lab 8a08e36dbf fix: dev: [compose-core] change minor debug statement !minor 1 month ago
Valentin Lab f57d6b5d12 new: dev: [compose-core] introduce ``err-d`` to display location of errors in debug mode 1 month ago
Valentin Lab 2e2267716a fix: dev: [compose-core] use ``hash_get`` from ``kal-shlib-common`` 1 month ago
Valentin Lab 94acd713cc fix: [compose-core] prevent hard to debug issue with output leaking out 1 month ago
Valentin Lab 810f0c6049 new: [compose-core] add code improvements !minor 1 month ago
Valentin Lab f71e3ec42f fix: dev: [compose-core] better capture error in ``get_service_relation`` 1 month ago
Valentin Lab af246b1ad6 chg: dev: [compose,compose-core] rename ``ALL_RELATIONS`` to ``GLOBAL_ALL_RELATIONS`` 1 month ago
  1. 5
      Dockerfile
  2. 29
      bin/compose
  3. 1044
      bin/compose-core

5
Dockerfile

@ -15,7 +15,7 @@ ENV KAL_SHLIB_ARRAY_VERSION="0.2.0" \
KAL_SHLIB_CACHE_VERSION="0.0.1" \
KAL_SHLIB_CHARM_VERSION="0.5.3" \
KAL_SHLIB_CMDLINE_VERSION="0.0.5" \
KAL_SHLIB_COMMON_VERSION="0.4.22" \
KAL_SHLIB_COMMON_VERSION="0.5.1" \
KAL_SHLIB_CONFIG_VERSION="0.0.2" \
KAL_SHLIB_CORE_VERSION="0.7.0" \
KAL_SHLIB_FIREWALL_VERSION="0.2.0" \
@ -131,6 +131,9 @@ RUN apk add curl wget
## handy in some charms or action to recode some output
RUN apk add recode
## used for column resizing
RUN apk add gawk
## handy yaml2json converter for charm
RUN wget https://github.com/bronze1man/yaml2json/releases/download/v1.3/yaml2json_linux_amd64 \
-O /usr/local/bin/yaml2json && \

29
bin/compose

@ -1036,20 +1036,25 @@ load_env() {
fi
done < "$COMPOSE_LAUNCHER_OPTS"
fi
if [ -n "$ALL_RELATIONS" ]; then
if ! [ -e "$ALL_RELATIONS" ]; then
err "Variable \$ALL_RELATION provided but it doesn't point on an existing file."
if [ -n "$GLOBAL_ALL_RELATIONS" ]; then
if ! [ -e "$GLOBAL_ALL_RELATIONS" ]; then
err "Variable \$GLOBAL_ALL_RELATION provided but it doesn't point on an existing file."
return 1
fi
if ! [ -r "$ALL_RELATIONS" ]; then
err "Variable \$ALL_RELATION provided but it doesn't point on a readable file."
if ! [ -r "$GLOBAL_ALL_RELATIONS" ]; then
err "Variable \$GLOBAL_ALL_RELATION provided but it doesn't point on a readable file."
return 1
fi
NEW_ALL_RELATIONS="$COMPOSE_CACHE/${ALL_RELATIONS##*/}"
if [ "$NEW_ALL_RELATIONS" != "$ALL_RELATIONS" ]; then
cp "$ALL_RELATIONS" "$NEW_ALL_RELATIONS" || return 1
if [ -z "$GLOBAL_ALL_RELATIONS_HASH" ]; then
err "Variable \$GLOBAL_ALL_RELATION provided but not \$GLOBAL_ALL_RELATIONS_HASH."
return 1
fi
NEW_GLOBAL_ALL_RELATIONS="$COMPOSE_CACHE/${GLOBAL_ALL_RELATIONS##*/}"
if [ "$NEW_GLOBAL_ALL_RELATIONS" != "$GLOBAL_ALL_RELATIONS" ]; then
cp "$GLOBAL_ALL_RELATIONS" "$NEW_GLOBAL_ALL_RELATIONS" || return 1
fi
docker_run_opts+=("-e" "ALL_RELATIONS=$NEW_ALL_RELATIONS")
docker_run_opts+=("-e" "GLOBAL_ALL_RELATIONS=$NEW_GLOBAL_ALL_RELATIONS")
docker_run_opts+=("-e" "GLOBAL_ALL_RELATIONS_HASH=$GLOBAL_ALL_RELATIONS_HASH")
fi
if [ -n "$PROJECT_NAME" ]; then
docker_run_opts+=("-e" "PROJECT_NAME=$PROJECT_NAME")
@ -1068,8 +1073,10 @@ show_env() {
echo " COMPOSE_LAUNCHER_CACHE: $COMPOSE_LAUNCHER_CACHE"
echo " SESSION_DIR: $SESSION_DIR"
echo " TZ_PATH: $TZ_PATH"
[ -n "$ALL_RELATIONS" ] &&
echo " ALL_RELATIONS: $ALL_RELATIONS"
[ -n "$GLOBAL_ALL_RELATIONS" ] && {
echo " GLOBAL_ALL_RELATIONS: $GLOBAL_ALL_RELATIONS"
echo " GLOBAL_ALL_RELATIONS_HASH: $GLOBAL_ALL_RELATIONS_HASH"
}
[ -n "$PROJECT_NAME" ] &&
echo " PROJECT_NAME: $PROJECT_NAME"

1044
bin/compose-core
File diff suppressed because it is too large
View File

Loading…
Cancel
Save