Merge pull request #4999 from elhu/4990-set-stack-global-cache
Purge cache for all apps when calling buildpacks:set-property with --global flag
This commit is contained in:
2 files changed
+20
-1
No files matched your search
@@ -148,7 +148,19 @@ func CommandSetProperty(appName string, property string, value string) error {
|
|||||||
|
|
||||||
common.CommandPropertySet("buildpacks", appName, property, value, DefaultProperties, GlobalProperties)
|
common.CommandPropertySet("buildpacks", appName, property, value, DefaultProperties, GlobalProperties)
|
||||||
if property == "stack" && oldStack != value {
|
if property == "stack" && oldStack != value {
|
||||||
return common.PlugnTrigger("post-stack-set", []string{appName, value}...)
|
if appName != "--global" {
|
||||||
|
return common.PlugnTrigger("post-stack-set", []string{appName, value}...)
|
||||||
|
}
|
||||||
|
|
||||||
|
apps, err := common.DokkuApps()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
for _, app := range apps {
|
||||||
|
if err := common.PlugnTrigger("post-stack-set", []string{app, value}...); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -184,6 +184,13 @@ teardown() {
|
|||||||
assert_output "https://github.com/heroku/heroku-buildpack-golang.git https://github.com/heroku/heroku-buildpack-python.git https://github.com/heroku/heroku-buildpack-php.git"
|
assert_output "https://github.com/heroku/heroku-buildpack-golang.git https://github.com/heroku/heroku-buildpack-python.git https://github.com/heroku/heroku-buildpack-php.git"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "(buildpacks) buildpacks:set-property" {
|
||||||
|
run /bin/bash -c "dokku buildpacks:set-property --global stack gliderlabs/herokuish:latest"
|
||||||
|
echo "output: $output"
|
||||||
|
echo "status: $status"
|
||||||
|
assert_success
|
||||||
|
}
|
||||||
|
|
||||||
@test "(buildpacks) buildpacks:remove" {
|
@test "(buildpacks) buildpacks:remove" {
|
||||||
run /bin/bash -c "dokku buildpacks:set $TEST_APP heroku/nodejs"
|
run /bin/bash -c "dokku buildpacks:set $TEST_APP heroku/nodejs"
|
||||||
echo "output: $output"
|
echo "output: $output"
|
||||||
|
|||||||
Reference in new issue
Block a user