Skip to content

Support the Devfile Composite Commands in VS Code #21859

@azatsarynnyy

Description

@azatsarynnyy

Is your enhancement related to a problem? Please describe

Devfile has a notion of Composite Commands. It allows connecting multiple Commands together by defining a single Composite Command. E.g.:

commands:
  - id: package
    exec:
      component: tools
      commandLine: 'mvn package'
      group:
        kind: build
  - id: install
    exec:
      component: tools
      commandLine: 'mvn install'
      group:
        kind: build
        isDefault: true
  - id: installAndPackage
    composite:
      commands:
        - install
        - package
      parallel: false

Currently, VS Code editor in Che doesn't support the Devfile Composite Commands. So, the user isn't able to use them in any way.

Describe the solution you'd like

VS Code has a notion of the Compound Tasks which we can rely on when translating the Devfile's Composite Commands.
The example above can be translated to something like:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "package",
      "command": "mvn",
      "args": ["package"]
    },
    {
      "label": "Install",
      "command": "mvn",
      "args": ["install"]
    },
    {
      "label": "installAndPackage",
      "dependsOn": ["package", "Install"]
    }
  ]
}

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Labels

area/editor/vscodeIssues related to the Code OSS editor of Chekind/enhancementA feature request - must adhere to the feature request template.severity/P1Has a major impact to usage or development of the system.

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions