-
Notifications
You must be signed in to change notification settings - Fork 4
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
Generate alias file #15
base: master
Are you sure you want to change the base?
Conversation
Thanks @tobybellwood - should all be sorted now |
src/LagoonCommands.php
Outdated
|
||
foreach ($response->data->project->environments as $env) { | ||
$details = [ | ||
"host" => $env->kubernetes->sshHost, |
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.
we need to handle existing deploytargets here that have no specific ssh host set - otherwise they will return null
as the host?
I'm just not sure where to read it from - we could fall back to the lagoon aliases (or a hard coded default?
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.
@tobybellwood - I think that should do it.
…pal-integrations into feature/generate_alias_file
src/LagoonCommands.php
Outdated
@@ -67,11 +77,10 @@ public function __construct() { | |||
// Get default config. | |||
$lagoonyml = $this->getLagoonYml(); | |||
$this->api = $lagoonyml['api'] ?? 'https://api.lagoon.amazeeio.cloud/graphql'; |
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.
to accommodate uselagoon/build-deploy-tool#193
$this->api = $lagoonyml['api'] ?? 'https://api.lagoon.amazeeio.cloud/graphql'; | |
$this->api = getenv('LAGOON_CONFIG_API_HOST') ?? $lagoonyml['api'] ?? 'https://api.lagoon.amazeeio.cloud/graphql'; |
/** | ||
* Default ssh host, used for fallback | ||
*/ | ||
const DEFAULT_SSH_HOST = 'ssh.lagoon.amazeeio.cloud'; | ||
|
||
/** | ||
* Default ssh port, used for fallback | ||
*/ | ||
const DEFAULT_SSH_PORT = 32222; | ||
|
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.
we'd ideally make a function here to handle uselagoon/build-deploy-tool#193 and fallback defaults to use in a chained null coalesce as per the api. We can probably assume that the last chance fallback doesn't need to be host and port configurable though?
also getting failures on drush 12 (but not drush 11) trying to use one of the
|
This introduces a command to generate a file of aliases - this is particularly useful when dealing with sites that live on separate clusters when accessing via the ssh-portal