-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Move herokuish app cache from the filesystem into a docker volume #5495
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c361379
refactor: move herokuish app cache from the filesystem into a docker …
josegonzalez 0368ff4
fix: silence volume creation
josegonzalez 40926f0
fix: immediately remove the temporary build container so repo:gc works
josegonzalez aed5708
feat: expose the ExitError from NewShellCmd
josegonzalez 540ee7e
fix: remove the unnecessary directory check
josegonzalez e1107f0
tests: split up repo tests and ensure they test the current running e…
josegonzalez e623f38
docs: fix docblock
josegonzalez dff2799
tests: refactor test to use the generic python app for testing purposes
josegonzalez b3ac28f
fix: handle case where subprocess error is not an exit error
josegonzalez af0ea7d
chore: remove extra retire calls for TAR_CID
josegonzalez 7a6273b
refactor: do not delete cache until after any app containers are removed
josegonzalez f666a4d
fix: remove all build containers when purging build cache
josegonzalez f30cfce
docs: add docblock
josegonzalez e6883b3
docs: add docblock
josegonzalez d879451
fix: add the missing label identifier to the filter
josegonzalez 6fcbaf3
docs: move migration note to 0.31.x doc
josegonzalez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # 0.30.0 Migration Guide | ||
|
|
||
| ## Changes | ||
|
|
||
| - Herokuish build cache is now mounted from a docker volume - eg. `cache-node-js-app` - instead of the local filesystem. All existing app cache will be cleared upon upgrading past 0.29.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,28 @@ | ||
| #!/usr/bin/env bash | ||
| source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" | ||
| source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions" | ||
| set -eo pipefail | ||
| [[ $DOKKU_TRACE ]] && set -x | ||
|
|
||
| fn-builder-herokuish-remove-old-cache() { | ||
| for app in $(dokku_apps "false" 2>/dev/null); do | ||
| local DOKKU_APP_CACHE_DIR="$DOKKU_ROOT/$APP/cache" | ||
| local DOKKU_APP_HOST_CACHE_DIR="$DOKKU_HOST_ROOT/$APP/cache" | ||
| if [[ ! -d "$DOKKU_APP_CACHE_DIR" ]]; then | ||
| continue | ||
| fi | ||
|
|
||
| "$DOCKER_BIN" container run --rm --label=dokku --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku "--label=com.dokku.app-name=$APP" -v "$DOKKU_APP_HOST_CACHE_DIR:/cache" "$DOKKU_IMAGE" "find /cache -depth -mindepth 1 -maxdepth 1 -exec rm -Rf {} ;" | ||
| rm -rf "$DOKKU_APP_CACHE_DIR" | ||
| done | ||
| } | ||
|
|
||
| trigger-builder-herokuish-install() { | ||
| declare desc="installs the builder-herokuish plugin" | ||
| declare trigger="install" | ||
|
|
||
| fn-plugin-property-setup "builder-herokuish" | ||
| fn-builder-herokuish-remove-old-cache | ||
| } | ||
|
|
||
| trigger-builder-herokuish-install "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,5 +2,4 @@ | |
| /subcommands/* | ||
| /triggers/* | ||
| /triggers | ||
| /pre-delete | ||
| /post-stack-set | ||
| /post-* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.