alficles commented on a change in pull request #5004:
URL: https://github.com/apache/trafficcontrol/pull/5004#discussion_r533725958
##########
File path: pkg
##########
@@ -134,9 +152,23 @@ while (( "$#" )); do
if (( "$verbose" == 0 )); then
exec >/dev/null 2>&1
fi
+
+ # Build the project
"${COMPOSECMD[@]}" -f $COMPOSE_FILE pull $1 || exit 1
"${COMPOSECMD[@]}" -f $COMPOSE_FILE build --pull $1 || exit 1
"${COMPOSECMD[@]}" -f $COMPOSE_FILE run "${RUN_OPTIONS[@]}"
--rm $1 || exit 1
+
+ # Check for a chained compose file for this particular project.
+ # A chained compose file will be named exactly the same as main
docker-compose, with .service added,
+ # where <service> is the name of the specific service to be
chained. The file may be a symlink to another
+ # compose file, in which case the symlink will be followed
before it is processed.
+ # A "dist" symlink will be temporarily created in that
directory to facilitate the collation of artefacts.
+ [ ! -e "$COMPOSE_FILE.$1" ] || ln -s "$(dirname -- "$(realpath
-e -- "$SELF")")/dist" "$(dirname -- "$(realpath -e --
"$COMPOSE_FILE.$1")")/dist" || exit 1
+ [ ! -e "$COMPOSE_FILE.$1" ] || $SELF -f $(realpath -e
"$COMPOSE_FILE.$1") $([ "$verbose" == 0 ] || echo "-v") $([ "$quiet" == 0 ] ||
echo "-q") $([ "$debug" == 0 ] || echo "-d") $("${COMPOSECMD[@]}" -f $(realpath
-e "$COMPOSE_FILE.$1") config --services) || exit 1
+ [ ! -e "$COMPOSE_FILE.$1" ] || rm "$(dirname -- "$(realpath -e
-- "$COMPOSE_FILE.$1")")/dist"
Review comment:
Done.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]