Eclipse Che: Unable to add plug-in automatically in workspace using Devfile
Summary
I created a simple devfile and tried to add "redhat.java", plug-in in the dev workspace automatically while creating the workspace, but it is not added automatically. Any clue where I am doing wrong. I have installed eclipse che on vanilla k8s I have followed the below link: https://medium.com/eclipse-che-blog/devfile-v2-and-ide-plug-ins-in-eclipse-che-7a560ae724b1 and here is my simple devfile:
---*****----------------
schemaVersion: 2.2.0 metadata: name: helloworld-example attributes: .vscode/extensions.json: | { "recommendations": [ "redhat.java" ] } components:
- name: dev-tooling container: image: quay.io/devfile/universal-developer-image:ubi8-latest endpoints: - name: http-3000 targetPort: 3000 commands:
- id: install exec: commandLine: npm install component: dev-tooling workingDir: ${PROJECT_SOURCE} group: isDefault: true kind: build
- id: run exec: commandLine: node app.js component: dev-tooling workingDir: ${PROJECT_SOURCE} group: isDefault: true kind: run
Relevant information
No response
Also followed this link below: https://devfile.io/docs/2.0.0/adding-plugin-component
@debkantap in order to install extensions automatically just add .vscode/extensions.json to the root of the repository e.g. https://github.com/che-incubator/quarkus-api-example/blob/main/.vscode/extensions.json
@ibuziuk ..Thanks for your reply. I did added the extensions.json in my devfile repo, but not lucky. My devfile is very simple and attached. The devfile repo screenshot is also attached. May be doing some mistake, can you please help.
Thanks
Debkanta
----Devfile---
schemaVersion: 2.2.0 metadata: name: helloworld-example attributes: .vscode/extensions.json: | { "recommendations": [ "redhat.java" ] } components:
- name: dev-tooling container: image: quay.io/devfile/universal-developer-image:ubi8-latest endpoints: - name: http-3000 targetPort: 3000
- name: sonarlint-vscode plugin: reference: https://github.com/sainirijul/che-plugin-registry/blob/master/v3/plugins/sonarsource/sonarlint-vscode/1.13.0/meta.yaml commands:
- id: install exec: commandLine: npm install component: dev-tooling workingDir: ${PROJECT_SOURCE} group: isDefault: true kind: build
- id: run exec: commandLine: node app.js component: dev-tooling workingDir: ${PROJECT_SOURCE} group: isDefault: true kind: run
@ibuziuk thanks for your help..Now I am able to install plug-in automatically in workspace. Not sure what the issue was, but just added one more plug-ins in the extensions.json and it started working!!
{ "recommendations": [ "github.vscode-pull-request-github", "redhat.java" ] }
Now adding plug-ins/extensions for Intellij based editor is same? pls guide.
Thanks & Regards Debkanta
Closing the issue at it is resolved for VS Code Editor