diff --git a/docs/appendices/0.22.0-migration-guide.md b/docs/appendices/0.22.0-migration-guide.md index ca5b96cbe..f520a56de 100644 --- a/docs/appendices/0.22.0-migration-guide.md +++ b/docs/appendices/0.22.0-migration-guide.md @@ -17,3 +17,4 @@ The `ps` command has had a few removals as a result of a rewrite to Golang: - The `ps:stopall` command has been removed in favor of calling the `ps:stop` with the `--all` flag instead of an app name. - The `ps:startall` command has been removed in favor of calling the `ps:start` with the `--all` flag instead of an app name. - The `DOKKU_PROCFILE` file is no longer located in the git directory for a given app on the server. It's location is currently not exposed. +- The `procfile-get-command` plugin trigger no longer takes a `procfile path` as the final argument. diff --git a/docs/development/plugin-triggers.md b/docs/development/plugin-triggers.md index 92c356654..fd3c6fb10 100644 --- a/docs/development/plugin-triggers.md +++ b/docs/development/plugin-triggers.md @@ -1496,7 +1496,7 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x - Description: Fetches the command for a specific process type - Invoked by: `internally` -- Arguments: `$APP $PROCESS_TYPE $PORT $PROCFILE_PATH` +- Arguments: `$APP $PROCESS_TYPE $PORT` - Example: ```shell diff --git a/plugins/ps/src/triggers/triggers.go b/plugins/ps/src/triggers/triggers.go index 3ded508cb..6618178b0 100644 --- a/plugins/ps/src/triggers/triggers.go +++ b/plugins/ps/src/triggers/triggers.go @@ -62,7 +62,7 @@ func main() { processType := flag.Arg(1) port := common.ToInt(flag.Arg(2), 5000) procfilePath := flag.Arg(3) - err = ps.TriggerProcfileGetCommand(appName, processType, port, procfilePath) + err = ps.TriggerProcfileGetCommand(appName, processType, port) case "procfile-remove": appName := flag.Arg(0) procfilePath := flag.Arg(1) diff --git a/plugins/ps/triggers.go b/plugins/ps/triggers.go index 201ea22ef..656d2d603 100644 --- a/plugins/ps/triggers.go +++ b/plugins/ps/triggers.go @@ -162,11 +162,8 @@ func TriggerProcfileExtract(appName string, image string, forceExtract bool, pro return extractProcfile(appName, image, procfilePath) } -func TriggerProcfileGetCommand(appName string, processType string, port int, procfilePath string) error { - if procfilePath == "" { - procfilePath = getProcfilePath(appName) - } - +func TriggerProcfileGetCommand(appName string, processType string, port int) error { + procfilePath := getProcfilePath(appName) command, err := getProcfileCommand(procfilePath, processType, port) if err != nil { return err diff --git a/tests/unit/ps-general.bats b/tests/unit/ps-general.bats index 99bc2bea6..534966d42 100644 --- a/tests/unit/ps-general.bats +++ b/tests/unit/ps-general.bats @@ -44,12 +44,12 @@ teardown() { web: node web.js --port \$PORT worker: node worker.js EOF - run get_cmd_from_procfile "$TEST_APP" web 5001 + run plugn trigger procfile-get-command "$TEST_APP" web 5001 echo "output: $output" echo "status: $status" assert_output "node web.js --port 5001" - run get_cmd_from_procfile "$TEST_APP" worker + run plugn trigger procfile-get-command "$TEST_APP" worker echo "output: $output" echo "status: $status" assert_output "node worker.js"