Skip to content
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

feat(cli): add ability to create multiple services #2118

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Surbhi-sharma1
Copy link
Contributor

@Surbhi-sharma1 Surbhi-sharma1 commented Jun 26, 2024

add ability to create multiple services

GH-2112

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #2112

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Intermediate change (work in progress)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • Performed a self-review of my own code
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Any dependent changes have been merged and published in downstream modules

@Surbhi-sharma1 Surbhi-sharma1 requested a review from a team as a code owner June 26, 2024 12:27
@Surbhi-sharma1 Surbhi-sharma1 force-pushed the GH-2112 branch 4 times, most recently from 4c29899 to 88fb2f1 Compare June 27, 2024 05:35
Comment on lines +51 to +68
const baseService = (inputs.flags as AnyObject).baseService;
if (
type === 'microservice' &&
Array.isArray(baseService) &&
baseService.length > 0
) {
for (const service of baseService) {
const envS = this.getEnv(process.cwd(), 'microservice');
const currentInputs = {...inputs};
currentInputs.flags = {...inputs.flags, baseService: service};

await this.runWithEnv(envS, type, [service], {
...currentInputs.args,
...currentInputs.flags,
});
}
} else {
this.env.register(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if by default we are passing the name of the service then why are we taking it from the user
same for other default parameters

Copy link

sonarqubecloud bot commented Jul 2, 2024

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.

add command in sourceloop cli for control plane services
2 participants