-
Notifications
You must be signed in to change notification settings - Fork 0
chore: artisan add trigger lagoon deploy and run lagoon commands on app instances #56
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
base: main
Are you sure you want to change the base?
Conversation
| // We escape the project and branch, but we assume the command is provided as desired. | ||
| // Note: If the command contains quotes, the user should escape them or wrap the whole arg in quotes in the shell. | ||
|
|
||
| $fullCommand = sprintf('lagoon ssh -p %s -e %s -- %s', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I suppose that we know that the lagoon cli is installed in the php container. But this does introduce a potentially unneeded requirement, given that we actually have a way of executing shell commands in the upstream library - https://github.com/amazeeio/polydock-lagoon-php-lib/blob/main/src/Ssh.php#L47
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Futher, I'm not sure this will even simply run ...
| $bar = $this->output->createProgressBar($count); | ||
| $bar->start(); | ||
|
|
||
| foreach ($instances as $instance) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered making this optionally able to run these concurrently? Running them serially might become a problem with long running commands.
| ); | ||
|
|
||
| // Log what we are doing | ||
| // $this->line("\nExecuting on {$projectName} ({$branch})..."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extraneous comments.
| // Construct Lagoon CLI command | ||
| // lagoon deploy -p <project> -e <branch> | ||
|
|
||
| $fullCommand = sprintf('lagoon deploy -p %s -e %s', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be done with the php library.
No description provided.