34 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
5d1a3fb079 fix: add missing ps-get-property 2025-06-09 11:39:00 -04:00
Jose Diaz-Gonzalez
ad5537c086 refactor: directly trigger pre-deploy hook from post-release-builder script
This removes the extra indirection in the deploy process for triggering the hooks.
2024-04-04 02:27:43 -04:00
Jose Diaz-Gonzalez
2516c79264 fix: add --global flag to ps:set
Closes #6755
2024-03-28 21:16:04 -04:00
Jose Diaz-Gonzalez
3c6cc68086 refactor: capture output by default
This is almost certainly the correct default for Dokku. While it's a BC break and might cause an increase in memory usage, the api is mostly internal and therefore this is safe to use.
2024-02-12 20:28:31 -05:00
Jose Diaz-Gonzalez
047a3c00f5 chore: remove default false values when calling CallExecCommand 2024-02-12 20:07:43 -05:00
Jose Diaz-Gonzalez
50239b056c fix: use new CallExecCommand when checking to see how help is being called
This is part of ongoing work to remove usage of the depreated NewShellCmd.
2024-02-12 00:55:16 -05:00
Jose Diaz-Gonzalez
eb6f85f083 feat: skip scaled processes that are missing in the Procfile
This allows folks to deploy apps that don't have a web process without needing to scale that process down before/after the first deploy. Note that the formations key in the app.json or a manual scale of other processes will be necessary to start anything non-web.

Closes #5700
2023-08-05 10:58:57 -04:00
Jose Diaz-Gonzalez
fe4d80a82b refactor: cleanup zero'd out processes when a Procfile omitting those process types is set
This change also moves the referenced Procfile out to a host path once on deploy vs potentially several times, which should speed up deploys a small amount and simplify reasoning about the file.

Closes #5112
2022-11-25 14:50:35 -05:00
Jose Diaz-Gonzalez
b48b79f5ca feat: allow specifying a single process type to restart
This changes restarts to drop the 'release' part that currently gets triggered, which also helps reduce the possibility that a new image layer will be added due to predeploy deploy triggers.

Note that the old method essentially halfway-rebuilt the app (which was what added the extra layer). This refactor removes that, which is a bc-break.

Additionally, scaling processes will result in deploying _only_ restarting the processes being scaled.

Closes #2184
2021-10-09 18:46:17 -04:00
Jose Diaz-Gonzalez
9e18736475 feat: add ability to scope retire call to a single app
Also cleanup the log output a bit for the ps:retire command.
2021-08-08 03:04:25 -04:00
Jose Diaz-Gonzalez
0decb386d5 fix: correct issues in parsing and writing an updated app.json 2021-08-01 21:52:05 -04:00
Jose Diaz-Gonzalez
a7593db0c3 refactor: allow specifying clearExisting when calling ps-set-scale 2021-08-01 17:54:12 -04:00
Jose Diaz-Gonzalez
bd4621070c feat: implement ps-can-scale 2021-08-01 16:27:13 -04:00
Jose Diaz-Gonzalez
46d333df4b feat: implement ps-set-scale trigger 2021-08-01 16:13:03 -04:00
Jose Diaz-Gonzalez
213f7d224c refactor: use ps-current-scale instead of parsing DOKKU_SCALE file when iterating over deployed processes 2021-08-01 01:43:35 -04:00
Jose Diaz-Gonzalez
a22391b7ad fix: copy the specified Procfile into place at the earliest possibility 2021-07-10 14:57:59 -04:00
Jose Diaz-Gonzalez
d55e34a55f refactor: use LogFailWithError to allow a unified exit code for golang commands when the app is missing 2021-02-28 15:20:46 -05:00
Jose Diaz-Gonzalez
d09a7506df refactor: bubble up error handling so that standard exit codes can be set at the top-level
LogFail shouldn't be called internally if at all possible.
2021-02-28 15:20:46 -05:00
Jose Diaz-Gonzalez
033b0952dd feat: allow formatting :report command output as json 2021-02-01 22:23:30 -05:00
Jose Diaz-Gonzalez
666bb9dfee fix: unscope err for report subcommands 2021-01-07 01:12:50 -05:00
Jose Diaz-Gonzalez
1439e8b30b hack: parse out the info flags for report subcommands separately
pflag doesn't ignore unspecified arguments, so they must be parsed out separately first.
2020-12-21 01:36:59 -05:00
Jose Diaz-Gonzalez
8240790381 fix: correct argument handling when setting the --app flag
When setting the `--app` flag, there was a special case for the config plugin. This plugin used to take the `--no-restart` flag as the first argument - and still did until this change - resulting in an invalid call to the plugin subcommands. What is worse is that this functionality carried over to all other plugins as they were rewritten in golang, and thus the issue spread without us knowing.

The fix is to support GNU flag parsing rules, which Golang does not do by default (Because Of Reasons™). Switching to `github.com/spf13/pflag` fixes this issue, and also allows positional arguments to be placed wherever, even in the middle of flags.

Closes #4255
2020-12-20 22:06:33 -05:00
Jose Diaz-Gonzalez
f7863c8391 fix: handle clone and rename properly 2020-11-28 00:39:28 -05:00
Jose Diaz-Gonzalez
fceb412fb1 fix: reference extracted Procfile
Rather than attempting to always extract the Procfile, reference the one that was extracted by the last deploy. This fixes issues where 'docker container cp' may fail intermittently for lord knows what reason.

Closes #4083
2020-11-22 17:14:18 -05:00
Jose Diaz-Gonzalez
ab0cc6c444 fix: implement ps:restore
Also add all the niceties around parallelism that were introduced for the other commands.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
8ae597ad1d fix: correct help output 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
28a36c4908 feat: add proper parallel support 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
b44bc686a1 docs: update docs for ps commands 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
037b99865d fix: use CamelCase for constants 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
23ad4bb230 refactor: add ability to skip deploys and fix process scaling 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
f9969a0e61 refactor: drop extra args from procfile-extract
They were not necessary.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
06ce3dfadb fix: remove unused variable 2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
ab1d15216c refactor: drop the last argument from procfile-get-command
No external plugin should need to know the internals of where processes are.
2020-11-21 20:57:33 -05:00
Jose Diaz-Gonzalez
e7ee7a1781 refactor: implement most of ps plugin in golang 2020-11-21 20:57:33 -05:00