Add option to configure --detach behavior in docker stack deploy #21
Replies: 5 comments 1 reply
-
This is a solid request.
Out of the stack deploy flags, I probably need to add options for I will try to get these added ASAP. |
Beta Was this translation helpful? Give feedback.
-
I have this feature working in this PR: #22 You can view the output and summary by clicking on a recent Test workflow run: This can be tested by using the branch: Testing is optional, I have already tested the arguments and added them to the 2 included The README.md for the branch is available here: https://github.com/cssnr/stack-deploy-action/tree/deploy?tab=readme-ov-file#readme Unless you have any feedback, I will get this released a little later today. |
Beta Was this translation helpful? Give feedback.
-
The only caveat here is docker is flushing the output of This is not an at all an issue, and the output is still all there and readable for debugging, just a bit long and repetitive.
Setting I think I am now happy with the changes. I will merge and release this here shortly... |
Beta Was this translation helpful? Give feedback.
-
I have released this change in
Let me know if you have any issues. Thank you for the feedback. |
Beta Was this translation helpful? Give feedback.
-
I just released a new version
exec 5>&1
STACK_RESULTS=$( "${COMMAND[@]}" 2>&1 | tee >(cat >&5) ; exit "${PIPESTATUS[0]}" )
EXIT_STATUS="$?" I bumped the minor version because I also added
Thanks again for the support... |
Beta Was this translation helpful? Give feedback.
-
Currently, docker stack deploy defaults to --detach=true, but in future Docker releases, the default will change to false. This change could impact deployments using cssnr/stack-deploy-action.
I’d like to request an option in this action to explicitly control the --detach flag. This would allow users to:
Proposed Solution:
Add an optional input to the action, default can be true (in line with current functionality) but can be toggled to true.
Use Case:
With --detach=false, users can see whether the deployment succeeds or fails directly in the action logs, improving visibility into stack updates.
Would this be feasible to add? Happy to provide more details if needed. Thanks for your work on this project!
Beta Was this translation helpful? Give feedback.
All reactions