-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add profile flag to commands to allow running profiles at the same time #1368
Conversation
if profile.ProfileName == "default" { | ||
return baseComposeProjectName | ||
} |
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.
If this condition is added, the resulting container names would be the same as previously keeping backwards compatibility.
GCP test package is failing, investigating it here #1366 |
/test |
💚 Build Succeeded
History
cc @mrodm |
@@ -248,6 +251,11 @@ func systemCommandAction(cmd *cobra.Command, args []string) error { | |||
return fmt.Errorf("locating package root failed: %w", err) | |||
} | |||
|
|||
profile, err := cobraext.GetProfileFlag(cmd) | |||
if err != nil { | |||
return nil |
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.
I have seen this now while updating #1230, shouldn't this be return err
?
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.
That's right, it should return the error.
Thanks for the heads up!
Opened a PR for this: #1370
@@ -58,8 +60,14 @@ func upCommandAction(cmd *cobra.Command, args []string) error { | |||
|
|||
variantFlag, _ := cmd.Flags().GetString(cobraext.VariantFlagName) | |||
|
|||
profile, err := cobraext.GetProfileFlag(cmd) | |||
if err != nil { | |||
return nil |
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.
Also here.
Based on #1230
This allows us to use the profile information to be able to start different profiles at the same time. Profile information is used to set a different name for the Docker Compose Project.
This PR also adds profile flag to these commands:
How to test