Skip to content

Conversation

@dan2k3k4
Copy link
Member

No description provided.

@dan2k3k4 dan2k3k4 requested a review from bomoko December 24, 2025 20:14
// 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',
Copy link
Contributor

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

Copy link
Contributor

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) {
Copy link
Contributor

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})...");
Copy link
Contributor

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',
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants