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

Launching vscode with some default extensions installed #424

Merged
merged 17 commits into from
Nov 1, 2024

Conversation

vitaliy-guliy
Copy link
Contributor

@vitaliy-guliy vitaliy-guliy commented Sep 23, 2024

What does this PR do?

Allows to start the editor with some default extensions.

The idea is to upload the extension binary to the container (using a post start command for instance) and then define DEFAULT_EXTENSIONS environment variable to allow the editor use the extension on the startup.

What issues does this PR fix?

https://issues.redhat.com/browse/CRW-7246

How to test this PR?

once workspace started, ensure no extensions are installed (except built-in)

  • open the devfile, add post start command to download the extensions and then restart the workspace from local devfile
  - id: add-default-extensions
    exec:
      # put your tooling container name here
      component: runtime
      commandLine: |
        # download regular binary
        curl https://open-vsx.org/api/atlassian/atlascode/3.0.10/file/atlassian.atlascode-3.0.10.vsix --location -o /tmp/atlassian.atlascode-3.0.10.vsix
        curl https://open-vsx.org/api/snowflake/snowflake-vsc/1.9.1/file/snowflake.snowflake-vsc-1.9.1.vsix --location -o /tmp/snowflake.snowflake-vsc-1.9.1.vsix

events:
  postStart:
    - add-default-extensions
  • add the configmap, the workspace should be restarted
kind: ConfigMap
apiVersion: v1
metadata:
  name: default-extensions
  labels:
    controller.devfile.io/mount-to-devworkspace: 'true'
    controller.devfile.io/watch-configmap: 'true'
  annotations:
    controller.devfile.io/mount-as: env
data:
  DEFAULT_EXTENSIONS: '/tmp/atlassian.atlascode-3.0.10.vsix;/tmp/snowflake.snowflake-vsc-1.9.1.vsix'
  • refresh the editor page, both extensions should be installed.

Does this PR contain changes that override default upstream Code-OSS behavior?

  • the PR contains changes in the code folder (you can skip it if your changes are placed in a che extension )
  • the corresponding items were added to the CHANGELOG.md file
  • rules for automatic git rebase were added to the .rebase folder

Copy link

github-actions bot commented Sep 23, 2024

Click here to review and test in web IDE: Contribute

Signed-off-by: vitaliy-guliy <[email protected]>
Copy link

Signed-off-by: vitaliy-guliy <[email protected]>
Signed-off-by: vitaliy-guliy <[email protected]>
Signed-off-by: vitaliy-guliy <[email protected]>
Signed-off-by: vitaliy-guliy <[email protected]>
Signed-off-by: vitaliy-guliy <[email protected]>
Copy link

Signed-off-by: vitaliy-guliy <[email protected]>
Copy link

Signed-off-by: vitaliy-guliy <[email protected]>
Signed-off-by: vitaliy-guliy <[email protected]>
Copy link

Signed-off-by: vitaliy-guliy <[email protected]>
Copy link

Signed-off-by: vitaliy-guliy <[email protected]>
Copy link

@vitaliy-guliy vitaliy-guliy added the made-with-che Changes made with Che-Code label Oct 23, 2024
Signed-off-by: vitaliy-guliy <[email protected]>
Signed-off-by: vitaliy-guliy <[email protected]>
Signed-off-by: vitaliy-guliy <[email protected]>
@vitaliy-guliy vitaliy-guliy marked this pull request as ready for review October 23, 2024 12:46
Copy link

Signed-off-by: vitaliy-guliy <[email protected]>
Copy link

@vitaliy-guliy vitaliy-guliy changed the title Test launching the vscode with preinstalled extension Launching vscode with some default extensions installed Oct 31, 2024
@vitaliy-guliy vitaliy-guliy merged commit 7441cdb into main Nov 1, 2024
7 checks passed
@vitaliy-guliy vitaliy-guliy deleted the test-add-builtin-extension branch November 1, 2024 10:18
@devstudio-release
Copy link

Build 3.18 :: code_3.x/1492: Console, Changes, Git Data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
made-with-che Changes made with Che-Code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants