You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.
I'm not sure if there's an official way, but I can think of two:
Create a connections folder inside .rocketeer and a new folder for each connection, then place a hooks.php inside each with the specific rules (example: .rocketeer/connections/staging/hooks.php). I haven't tried it for hooks but I do it for SCM with all my projects and it works perfectly.
The second way is using getConnection() inside a Task. So for instance, in anafter-deploy hook you can do this:
'after' => [
'deploy' => [
function ($task) {
$env = $task->connections->getConnection();
if ($env === "staging") {
// do staging-specific stuff
}
}
],
],```
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Is it possible to define different hooks for each connection?
The text was updated successfully, but these errors were encountered: