20 Commits

Author SHA1 Message Date
Jose Diaz-Gonzalez
bb5ab0a777 refactor: use CallPlugnTrigger instead of PlugnTrigger
Refs #6422
2024-03-14 03:11:37 -04:00
Jose Diaz-Gonzalez
cdff4ae867 refactor: use CallPlugnTrigger instead of PlugnTriggerOutput
Refs #6422
2024-03-14 01:18:28 -04:00
Jose Diaz-Gonzalez
f0c6f45596 fix: correctly namespace the lock file 2024-02-09 14:38:43 -05:00
Jose Diaz-Gonzalez
e61421b53b refactor: migrate the app deploy lock to the data directory
This removes it from the app path, hopefully making backups a bit easier to perform.
2024-02-09 14:34:32 -05:00
Jose Diaz-Gonzalez
5dc2f20432 fix: remove all containers and images by label on app destroy
Previously, we would filter containers and images by name, which could be fail if the app was renamed or no longer was tagged "correctly" due to a rebuild. Now, we filter by label, ensuring an app is completely cleaned up on deletion.

Also:

- Move docker image cleanup from apps plugin to builder plugin: This isn't where it belongs - images should be cleaned up in a builder plugin (or the builders plugin) and not in the apps plugin, which has nothing to do with docker images anyways.
- Remove the code from the scheduler plugin, as that will only do anything if the scheduler is enabled for the app.
- Bypass image removal if there are no images to remove
- Always delete app containers: The herokuish builder creates intermediate build containers - something that should be refactored - and ideally this gets run in that builder plugin, but keeping the logic here ensures we don't have code duplication. This is otherwise safe as it will be a no-op if there are no containers to clean up.
2023-08-05 10:58:57 -04:00
esir
9506ba727e Use property system to set when an app has been created 2022-11-22 20:47:29 -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
72eb61d1fc feat: call scheduler-retire when destroying an app
This helps ensure we don't keep around old containers related to a given app.
2021-08-08 03:04:50 -04:00
Jose Diaz-Gonzalez
03e80a76b6 fix: add missing argument.. 2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
65d7fd9cce refactor: drop extra internal calls to VerifyAppName
These are duplicative of the checks that happen at the subcommand level.
2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
e0570be562 refactor: use common.VerifyAppName for appExists
The duplicative logic didn't make much sense.
2020-12-27 15:14:11 -05:00
Jose Diaz-Gonzalez
d7b23b84f0 fix: allow renaming old applications to new format
0.22.0 changed allowed values for app names, making it more difficult for users to fix their app names - you need to either downgrade+rename or recreate the app. The `apps:rename`  command can now rename these old applications to the new standard.

Also drop some app name verification from internal commands. Duplicate verification doesn't help much, and though it isn't excessively slow, it does prevent us from running commands against old apps that exist.

Refs #4267
2020-12-22 13:29:32 -05:00
Jose Diaz-Gonzalez
8c14bb9aeb fix: ensure all byte output is trimmed of whitespace
This otherwise causes issues when interpreting the output as part of a variable, such as when constructing the deploying app image.

Closes #4229
2020-12-13 02:04:35 -05:00
Jose Diaz-Gonzalez
ce154aff09 feat: simplify flag parsing in apps plugin
Commands should be written such that they take arguments as is.
2020-05-29 01:59:50 -04:00
Jose Diaz-Gonzalez
057c418be4 feat: implement :clone and :rename 2020-03-11 01:19:01 -04:00
Jose Diaz-Gonzalez
0be0ad7ef7 fix: correct issue with app autocreation 2020-03-11 01:00:10 -04:00
Jose Diaz-Gonzalez
7fa9b72144 feat: suppress the output of createApp
A git push requires that the first four bytes should be the line length, so not suppressing the output results in a partially failed deploy.

https://stackoverflow.com/a/8175315/1515875
2020-03-10 23:06:00 -04:00
Jose Diaz-Gonzalez
b881be1cfe fix: validate name 2020-03-10 22:18:01 -04:00
Jose Diaz-Gonzalez
6d62835734 fix: correct issues in app creation and deletion 2020-03-10 15:10:19 -04:00
Jose Diaz-Gonzalez
b968ced6e9 refactor: first pass at rewriting apps plugin in go 2020-03-10 14:14:37 -04:00