Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Davkutalek/refactor #436

Draft
wants to merge 53 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
0782f49
Fix for graceful shutdown option. Don't call docker rm --force until …
Apr 24, 2024
853a524
Merge remote-tracking branch 'upstream/master' into davkutalek/premat…
Apr 25, 2024
af54780
working on testing graceful shutdown fix
Apr 25, 2024
bebc54f
fixed broken tests
Apr 25, 2024
1b6df23
try running docker shell arg in [] to use exec mode
Apr 29, 2024
dc72a0f
try graceful compose shutdown
Apr 30, 2024
553a8d6
pass service name arg to stop/wait
Apr 30, 2024
4dbb936
exit upon getting term signal, otherwise service restarts
Apr 30, 2024
846e1bc
Don't run docker command in subshell, obviously signals wont make it\!
Apr 30, 2024
e5fd440
rewrite run.sh to use docker compose exec form. All the tests broke, …
Apr 30, 2024
99c0fc3
revert previous since it isn't working
Apr 30, 2024
722c50e
attempt to run shell script without sh -c which creates new shell
Apr 30, 2024
47d200d
syntax fix
Apr 30, 2024
aa1220c
try subshell with direct command
Apr 30, 2024
8e06129
refactor subshell to make it a little clearer, prevent exitcode -u issue
May 1, 2024
1a5d072
try not using a subshell again
May 1, 2024
812ece2
trying to clean up run file so I can understand the docker calls
May 1, 2024
3031858
Remove e flag from file, just gets in the way
May 2, 2024
570b262
Tabbing fix, add some logging
May 2, 2024
02a77d7
not sure why exit code is causing exit
May 2, 2024
4fa1a59
Move trap
May 2, 2024
df849c9
remove root -e
May 2, 2024
73500d8
declare array
May 2, 2024
8a41127
syntax fix
May 2, 2024
6dad4ad
fix circular name issue
May 2, 2024
fd19fe4
simplify logic, put run args in an array
May 2, 2024
e3df3ba
try different syntax
May 2, 2024
79a565e
try different syntax
May 2, 2024
78c7d41
try different syntax
May 2, 2024
e1d6ba3
try different syntax
May 2, 2024
0c79c5d
add some logging
May 2, 2024
fc598aa
logic fix
May 2, 2024
ae42cf4
syntax fix
May 2, 2024
000655d
syntax fix
May 2, 2024
b2bef76
syntax fix
May 2, 2024
662f6ad
revert to non-array since it isn't workingx
May 2, 2024
857c525
syntax fix
May 2, 2024
83f6a47
syntax fix
May 3, 2024
b9ccdd6
syntax fix
May 3, 2024
b7722ca
syntax fix
May 3, 2024
47e78be
Move err trap, add some logging
May 3, 2024
882e5a3
move signal trap, make sure err triggers in places we want it to and …
May 3, 2024
d208f69
run compose in subshell, move run command generation to it's own file
May 3, 2024
eebd7a2
try running compose commands directly
May 3, 2024
a991830
revert run cmd
May 3, 2024
b7690a6
Don't add name to compose kill
May 3, 2024
58ee5e4
send kill to named service
May 3, 2024
a931a74
send kill using build compose command
May 3, 2024
1151415
try running sleep to see if it restarts
May 3, 2024
d5e07aa
fix to prev
May 3, 2024
305ed1d
use shell
May 3, 2024
3e00061
run regular cmd in subprocess
May 3, 2024
1435f76
try without -T
May 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add some logging
  • Loading branch information
David Kutalek authored and David Kutalek committed May 2, 2024
commit 0c79c5de52dd5f476fdf41cb63d9fc4eec6b5dcc
4 changes: 3 additions & 1 deletion commands/run.sh
Original file line number Diff line number Diff line change
@@ -149,11 +149,13 @@ if plugin_read_list_into_result BUILDKITE_PLUGIN_DOCKER_COMPOSE_COMMAND ; then
echo "+++ Error: Can't use both a step level command and the command parameter of the plugin"
exit 1
elif [[ "${#result[@]}" -gt 0 ]] ; then
echo "compose plugin command: ${result[@]}"
for arg in "${result[@]}" ; do
commands+=("$arg")
display_command+=("$arg")
done
elif [[ -n "${BUILDKITE_COMMAND}" ]] ; then
echo "buildkite command: ${BUILDKITE_COMMAND}"
if [[ $(echo "$BUILDKITE_COMMAND" | wc -l) -gt 1 ]]; then
# FIXME: This is easy to fix, just need to do at end

@@ -187,7 +189,7 @@ else
fi

echo "${group_type} :docker: Running ${display_command[*]:-} in service $run_service"
echo "command is: ${commands[@]}"
echo "commands is: ${commands[@]}"
cmd_lit="[${commands[@]}]"
echo "cmd_lit is: ${cmd_lit}"
run_docker_compose "${run_params[@]}" "$cmd_lit"