Skip to content

Commit

Permalink
only export logs if not remote
Browse files Browse the repository at this point in the history
Signed-off-by: Sheldon Regular <sheldon.regular@gmail.com>
  • Loading branch information
nodlesh committed Oct 29, 2024
1 parent 69094d3 commit 7314f59
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion end-remote-agent-demo.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# set -x

echo Stoping remote agent:
echo Stopping remote agent:
docker stop fred_agent
echo Removing remote agent:
docker rm fred_agent
34 changes: 23 additions & 11 deletions manage
Original file line number Diff line number Diff line change
Expand Up @@ -1105,17 +1105,29 @@ runTests() {
if [[ ${COMMAND} != "dry-run" ]]; then
echo ""
echo "Exporting Agent logs."
docker logs acme_agent > .logs/acme_agent.log
docker logs bob_agent > .logs/bob_agent.log
docker logs faber_agent > .logs/faber_agent.log
docker logs mallory_agent > .logs/mallory_agent.log

if [[ "${USE_NGROK}" = "true" ]]; then
echo "Exporting ngrok Agent logs."
docker logs acme_agent-ngrok > .logs/acme_agent-ngrok.log
docker logs bob_agent-ngrok > .logs/bob_agent-ngrok.log
docker logs faber_agent-ngrok > .logs/faber_agent-ngrok.log
docker logs mallory_agent-ngrok > .logs/mallory_agent-ngrok.log
if [[ IS_ACME_REMOTE -eq 0 ]]; then
docker logs acme_agent > .logs/acme_agent.log
if [[ "${USE_NGROK}" = "true" ]]; then
docker logs acme_agent-ngrok > .logs/acme_agent-ngrok.log
fi
fi
if [[ IS_BOB_REMOTE -eq 0 ]]; then
docker logs bob_agent > .logs/bob_agent.log
if [[ "${USE_NGROK}" = "true" ]]; then
docker logs bob_agent-ngrok > .logs/bob_agent-ngrok.log
fi
fi
if [[ IS_FABER_REMOTE -eq 0 ]]; then
docker logs faber_agent > .logs/faber_agent.log
if [[ "${USE_NGROK}" = "true" ]]; then
docker logs faber_agent-ngrok > .logs/faber_agent-ngrok.log
fi
fi
if [[ IS_MALLORY_REMOTE -eq 0 ]]; then
docker logs mallory_agent > .logs/mallory_agent.log
if [[ "${USE_NGROK}" = "true" ]]; then
docker logs mallory_agent-ngrok > .logs/mallory_agent-ngrok.log
fi
fi
fi

Expand Down

0 comments on commit 7314f59

Please sign in to comment.