Skip to content

Commit

Permalink
[JetBrains] upgrade EAP version to 2024.1.2 (#19780)
Browse files Browse the repository at this point in the history
* Update Platform Version of JetBrains Backend Plugin (EAP) to 242.10180-EAP-CANDIDATE-SNAPSHOT

* Update EAP to use latest 2024.1

* fixup

* resolve jetbrains eap images

* fix preview no EAP

* fixup

* fix base image

* fixup

---------

Co-authored-by: Robo Quat <[email protected]>
  • Loading branch information
mustard-mh and roboquat authored May 27, 2024
1 parent 984fbea commit a2110ce
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 13 deletions.
7 changes: 7 additions & 0 deletions components/ide/jetbrains/backend-plugin/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,10 @@ packages:
config:
commands:
- ["./build.sh"]
- name: latest-info
type: generic
srcs:
- "gradle-latest.properties"
config:
commands:
- ["echo", "hello"]
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild=241.15989
pluginSinceBuild=241.17011
pluginUntilBuild=241.*
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
# See https://jb.gg/intellij-platform-builds-list for available build versions.
pluginVerifierIdeVersions=2024.1
# Version from "com.jetbrains.intellij.idea" which can be found at https://www.jetbrains.com/intellij-repository/snapshots
platformVersion=241.15989-EAP-CANDIDATE-SNAPSHOT
platformVersion=241.17011-EAP-CANDIDATE-SNAPSHOT
6 changes: 6 additions & 0 deletions components/ide/jetbrains/image/BUILD.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,19 @@ const generateIDEDownloadPackage = function (ideConfig, qualifier) {
config: {
commands: [["./download.sh"]],
},
deps: [],
};
if (qualifier === "stable") {
pkg.env.push(`JETBRAINS_BACKEND_URL=${args[`${ideConfig.name}DownloadUrl`]}`);
} else {
let url = `https://download.jetbrains.com/product?type=release,rc,eap&distribution=linux&code=${ideConfig.productCode}`;
if (args["buildNumber"]) {
url = `${url}&build=${args["buildNumber"]}`;
} else {
pkg.srcs.push("resolve-latest-ide-version.sh");
pkg.deps.push("components/ide/jetbrains/backend-plugin:latest-info");
pkg.env.push("PRODUCT_CODE=" + ideConfig.productCode);
pkg.env.push("PARSE_URL_FROM_LATEST_INFO=true");
}
pkg.env.push(`JETBRAINS_BACKEND_URL=${url}`);
}
Expand Down
19 changes: 19 additions & 0 deletions components/ide/jetbrains/image/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@
# See License.AGPL.txt in the project root for license information.

mkdir backend && cd backend || exit

# get latest info from latest properties file for preview env
if [ "$PARSE_URL_FROM_LATEST_INFO" = "true" ]; then
TEMP_FILENAME=$(mktemp)
PLUGIN_PLATFORM_VERSION=$(grep platformVersion= "../components-ide-jetbrains-backend-plugin--latest-info/gradle-latest.properties" | sed 's/platformVersion=//' | sed 's/-EAP-CANDIDATE-SNAPSHOT//') # Example: PLUGIN_PLATFORM_VERSION: 223.7571

curl -sL "https://data.services.jetbrains.com/products/releases?code=$PRODUCT_CODE&type=eap,rc,release&platform=linux" > "$TEMP_FILENAME"
IDE_BUILD_VERSION=$(jq -r -c "first(.${PRODUCT_CODE}[] | select(.build | contains(\"$PLUGIN_PLATFORM_VERSION\")) | .build)" < "$TEMP_FILENAME") # Example: IDE_BUILD_VERSION: 223.7571.176
rm "$TEMP_FILENAME"

if [ -n "$IDE_BUILD_VERSION" ]; then
JETBRAINS_BACKEND_URL="https://download.jetbrains.com/product?type=release,rc,eap&distribution=linux&code=$PRODUCT_CODE&build=$IDE_BUILD_VERSION"
else
JETBRAINS_BACKEND_URL="https://download.jetbrains.com/product?type=release,rc,eap&distribution=linux&code=$PRODUCT_CODE"
fi
fi

echo "Downloading from $JETBRAINS_BACKEND_URL"

curl -sSLo backend.tar.gz "$JETBRAINS_BACKEND_URL" && tar -xf backend.tar.gz --strip-components=1 && rm backend.tar.gz
# enable shared indexes by default
printf '\nshared.indexes.download.auto.consent=true' >> "bin/idea.properties"
4 changes: 2 additions & 2 deletions components/ide/jetbrains/image/leeway.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the GNU Affero General Public License (AGPL).
# See License.AGPL.txt in the project root for license information.

FROM cgr.dev/chainguard/wolfi-base:latest@sha256:c6064a4b8a3ee16cf99084aa4071057ba2cb168fe83252b493dddf8e72d96b48 as base_builder
FROM cgr.dev/chainguard/wolfi-base:latest@sha256:97a9dd83b120b33159b94f79db90cd51a205363305818f737605354b54311974 as base_builder
ARG JETBRAINS_DOWNLOAD_QUALIFIER
ARG SUPERVISOR_IDE_CONFIG
ARG JETBRAINS_BACKEND_VERSION
Expand All @@ -19,7 +19,7 @@ RUN mkdir /ide-desktop \
&& cp /tmp/supervisor-ide-config.json /ide-desktop/${JETBRAINS_DOWNLOAD_QUALIFIER}/supervisor-ide-config.json

# for debugging
# FROM cgr.dev/chainguard/wolfi-base:latest@sha256:c6064a4b8a3ee16cf99084aa4071057ba2cb168fe83252b493dddf8e72d96b48
# FROM cgr.dev/chainguard/wolfi-base:latest@sha256:97a9dd83b120b33159b94f79db90cd51a205363305818f737605354b54311974
FROM scratch
ARG JETBRAINS_BACKEND_VERSION
ARG JETBRAINS_DOWNLOAD_QUALIFIER
Expand Down
1 change: 0 additions & 1 deletion dev/preview/workflow/preview/patch-ide-configmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function replaceImage(image) {

for (let ide in json.ideOptions.options) {
if (["clion", "goland", "intellij", "phpstorm", "pycharm", "rider", "rubymine", "webstorm"].includes(ide)) {
json.ideOptions.options[ide].latestImage = replaceImage(json.ideOptions.options[ide].latestImage);
json.ideOptions.options[ide].versions = json.ideOptions.options[ide].versions?.map((version) => {
version.image = replaceImage(version.image);
version.imageLayers = version.imageLayers.map(replaceImage);
Expand Down
16 changes: 8 additions & 8 deletions install/installer/pkg/components/ide-service/ide-configmap.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"logo": "{{.IdeLogoBase}}/intellijIdeaLogo.svg",
"label": "Ultimate",
"image": "{{.Repository}}/ide/intellij:{{.WorkspaceVersions.Workspace.DesktopIdeImages.IntelliJImage.Version}}",
"latestImage": "{{.Repository}}/ide/intellij:latest",
"latestImage": "{{.ResolvedJBImageLatest.IntelliJ}}",
"pluginImage": "{{.JetBrainsPluginImage}}",
"pluginLatestImage": "{{.JetBrainsPluginLatestImage}}",
"imageLayers": [
Expand Down Expand Up @@ -160,7 +160,7 @@
"type": "desktop",
"logo": "{{.IdeLogoBase}}/golandLogo.svg",
"image": "{{.Repository}}/ide/goland:{{.WorkspaceVersions.Workspace.DesktopIdeImages.GoLandImage.Version}}",
"latestImage": "{{.Repository}}/ide/goland:latest",
"latestImage": "{{.ResolvedJBImageLatest.GoLand}}",
"pluginImage": "{{.JetBrainsPluginImage}}",
"pluginLatestImage": "{{.JetBrainsPluginLatestImage}}",
"imageLayers": [
Expand Down Expand Up @@ -205,7 +205,7 @@
"logo": "{{.IdeLogoBase}}/pycharmLogo.svg",
"label": "Professional",
"image": "{{.Repository}}/ide/pycharm:{{.WorkspaceVersions.Workspace.DesktopIdeImages.PyCharmImage.Version}}",
"latestImage": "{{.Repository}}/ide/pycharm:latest",
"latestImage": "{{.ResolvedJBImageLatest.PyCharm}}",
"pluginImage": "{{.JetBrainsPluginImage}}",
"pluginLatestImage": "{{.JetBrainsPluginLatestImage}}",
"imageLayers": [
Expand Down Expand Up @@ -249,7 +249,7 @@
"type": "desktop",
"logo": "{{.IdeLogoBase}}/phpstormLogo.svg",
"image": "{{.Repository}}/ide/phpstorm:{{.WorkspaceVersions.Workspace.DesktopIdeImages.PhpStormImage.Version}}",
"latestImage": "{{.Repository}}/ide/phpstorm:latest",
"latestImage": "{{.ResolvedJBImageLatest.PhpStorm}}",
"pluginImage": "{{.JetBrainsPluginImage}}",
"pluginLatestImage": "{{.JetBrainsPluginLatestImage}}",
"imageLayers": [
Expand Down Expand Up @@ -293,7 +293,7 @@
"type": "desktop",
"logo": "{{.IdeLogoBase}}/rubymineLogo.svg",
"image": "{{.Repository}}/ide/rubymine:{{.WorkspaceVersions.Workspace.DesktopIdeImages.RubyMineImage.Version}}",
"latestImage": "{{.Repository}}/ide/rubymine:latest",
"latestImage": "{{.ResolvedJBImageLatest.RubyMine}}",
"pluginImage": "{{.JetBrainsPluginImage}}",
"pluginLatestImage": "{{.JetBrainsPluginLatestImage}}",
"imageLayers": [
Expand Down Expand Up @@ -337,7 +337,7 @@
"type": "desktop",
"logo": "{{.IdeLogoBase}}/webstormLogo.svg",
"image": "{{.Repository}}/ide/webstorm:{{.WorkspaceVersions.Workspace.DesktopIdeImages.WebStormImage.Version}}",
"latestImage": "{{.Repository}}/ide/webstorm:latest",
"latestImage": "{{.ResolvedJBImageLatest.WebStorm}}",
"pluginImage": "{{.JetBrainsPluginImage}}",
"pluginLatestImage": "{{.JetBrainsPluginLatestImage}}",
"imageLayers": [
Expand Down Expand Up @@ -389,7 +389,7 @@
"type": "desktop",
"logo": "{{.IdeLogoBase}}/riderLogo.svg",
"image": "{{.Repository}}/ide/rider:{{.WorkspaceVersions.Workspace.DesktopIdeImages.RiderImage.Version}}",
"latestImage": "{{.Repository}}/ide/rider:latest",
"latestImage": "{{.ResolvedJBImageLatest.Rider}}",
"pluginImage": "{{.JetBrainsPluginImage}}",
"pluginLatestImage": "{{.JetBrainsPluginLatestImage}}",
"imageLayers": [
Expand Down Expand Up @@ -433,7 +433,7 @@
"type": "desktop",
"logo": "{{.IdeLogoBase}}/clionLogo.svg",
"image": "{{.Repository}}/ide/clion:{{.WorkspaceVersions.Workspace.DesktopIdeImages.CLionImage.Version}}",
"latestImage": "{{.Repository}}/ide/clion:latest",
"latestImage": "{{.ResolvedJBImageLatest.CLion}}",
"pluginImage": "{{.JetBrainsPluginImage}}",
"pluginLatestImage": "{{.JetBrainsPluginLatestImage}}",
"imageLayers": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ func ideConfigConfigmap(ctx *common.RenderContext) ([]runtime.Object, error) {
return ctx.ImageName(ctx.Config.Repository, name, bundledLatest.Version)
}

type JBImages struct {
IntelliJ string
GoLand string
PyCharm string
PhpStorm string
RubyMine string
WebStorm string
Rider string
CLion string
}

type ConfigTemplate struct {
Repository string
IdeLogoBase string
Expand All @@ -50,6 +61,7 @@ func ideConfigConfigmap(ctx *common.RenderContext) ([]runtime.Object, error) {
JetBrainsLauncherImage string
JetBrainsPluginImagePrevious string
JetBrainsLauncherImagePrevious string
ResolvedJBImageLatest JBImages

WorkspaceVersions versions.Components
}
Expand All @@ -67,6 +79,16 @@ func ideConfigConfigmap(ctx *common.RenderContext) ([]runtime.Object, error) {
JetBrainsLauncherImage: ctx.ImageName(ctx.Config.Repository, ide.JetBrainsLauncherImage, ctx.VersionManifest.Components.Workspace.DesktopIdeImages.JetBrainsLauncherImage.Version),
JetBrainsPluginImagePrevious: ctx.ImageName(ctx.Config.Repository, ide.JetBrainsBackendPluginImage, "commit-e7eb44545510a8293c5c6aa814a0ad4e81852e5f"),
JetBrainsLauncherImagePrevious: ctx.ImageName(ctx.Config.Repository, ide.JetBrainsLauncherImage, "commit-92fccc81ef03c56615d0b14c49a7ac6ddd9216e6"),
ResolvedJBImageLatest: JBImages{
IntelliJ: resolveLatestImage(ide.IntelliJDesktopIDEImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.IntelliJLatestImage),
GoLand: resolveLatestImage(ide.GoLandDesktopIdeImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.GoLandLatestImage),
PyCharm: resolveLatestImage(ide.PyCharmDesktopIdeImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.PyCharmLatestImage),
PhpStorm: resolveLatestImage(ide.PhpStormDesktopIdeImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.PhpStormLatestImage),
RubyMine: resolveLatestImage(ide.RubyMineDesktopIdeImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.RubyMineLatestImage),
WebStorm: resolveLatestImage(ide.WebStormDesktopIdeImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.WebStormLatestImage),
Rider: resolveLatestImage(ide.RiderDesktopIdeImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.RiderLatestImage),
CLion: resolveLatestImage(ide.CLionDesktopIdeImage, "latest", ctx.VersionManifest.Components.Workspace.DesktopIdeImages.CLionLatestImage),
},

WorkspaceVersions: ctx.VersionManifest.Components,
}
Expand Down

0 comments on commit a2110ce

Please sign in to comment.