Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Generic way to run extension commands when creating projects #442

Closed
makandre opened this issue Sep 13, 2019 · 2 comments
Closed

Generic way to run extension commands when creating projects #442

makandre opened this issue Sep 13, 2019 · 2 comments
Assignees
Labels

Comments

@makandre
Copy link
Contributor

makandre commented Sep 13, 2019

**Codewind version:**0.4.0
OS:

Che version:
IDE extension version:
IDE version:
Kubernetes cluster:

Description of the enhancement:

This item is a follow-up to #270. For 0.4.0 due to time constraints the call to extension command appsody (as well as the detection of appsody projects (see: #445)) was hardcoded into the CLI.

This should be made generic to avoid hardcoding appsody logic into the CLI, which would also benefit future extensions. It is also a requirement for #292, because we will need to define an additional way to run appsody init, with arguments for the binding a vanilla project scenario.

Proposed solution:

As proposed in #270, we would allow an extension to define commands in its commands array:

commands:
  - name: postProjectValidate
    command: appsody
    args:
      - init

Then in the validate method of the CLI, it retrieves the extensions info PFE has loaded via GET /api/v1/extensions API. CLI then uses this to (in a generic manner) detect whether a project is an appsody project, and if so, run any applicable commands defined by the extension.

@makandre
Copy link
Contributor Author

This would fix bug #445 in the process

@sghung
Copy link
Contributor

sghung commented Sep 23, 2019

Closing as it has been implemented

@sghung sghung closed this as completed Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants