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

support jb plugins from image #18732

Merged
merged 1 commit into from
Sep 18, 2023
Merged

support jb plugins from image #18732

merged 1 commit into from
Sep 18, 2023

Conversation

akosyakov
Copy link
Member

@akosyakov akosyakov commented Sep 18, 2023

Description

It allows to distribute JB plugins (similarly how we do it for options) as part of the image instead of using JB marketplace or custom repositories. It is helpful in case of proprietary plugins which should be distributed org wide.

Summary generated by Copilot

🤖 Generated by Copilot at 7ba9460

This pull request enhances the JetBrains IDE integration by enabling plugin synchronization. It extracts common logic for syncing files from the workspace context to the IDE and applies it to both options and plugins. It also handles the necessary steps for unpacking plugin archives and updating the system path.

Related Issue(s)

fix EXP-626

How to test

Screenshot 2023-09-18 at 14 07 23 Screenshot 2023-09-18 at 14 07 17

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

Sorry, something went wrong.

@akosyakov akosyakov force-pushed the ak/jb_initial_image_plugins branch from 7ba9460 to f29fa90 Compare September 18, 2023 12:08
@akosyakov akosyakov changed the title initial JB image plugins support jb plugins from image Sep 18, 2023
@akosyakov
Copy link
Member Author

akosyakov commented Sep 18, 2023

/gh run recreate-vm=true

Comment triggered a workflow run

Started workflow run: 6222345290

  • recreate_vm: true

@akosyakov akosyakov marked this pull request as ready for review September 18, 2023 12:16
@akosyakov akosyakov requested a review from a team as a code owner September 18, 2023 12:16
@mustard-mh
Copy link
Contributor

Proxy Pre-configured JPA Plugin Installed JPA Plugin Enabled
image image image

Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

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

Code LGTM

log.WithField("plugin", file.Name()).Info("plugin is already synced, skipping")
return nil
}
return exec.Command("cp", "-rf", filepath.Join(srcDir, file.Name()), destDir).Run()
Copy link
Contributor

Choose a reason for hiding this comment

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

(not-blocking): Use golang instead of exec cp command (most images should have cp so it's a nit-suggestion)

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, i think we discussed when we introduced options, and decided just to use cp

but just of curiosity what would use if you go with golang

Copy link
Contributor

Choose a reason for hiding this comment

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

filepath.Walk or lib like github.com/otiai10/copy, but cp can be a good option too

@akosyakov
Copy link
Member Author

@mustard-mh you need to approve it 🙏

@akosyakov
Copy link
Member Author

/unhold

@roboquat roboquat merged commit 5303260 into main Sep 18, 2023
@roboquat roboquat deleted the ak/jb_initial_image_plugins branch September 18, 2023 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants