Skip to content

Commit 449bcc2

Browse files
Andrea FalzettifelladriniQQBot
authored andcommitted
chore(jetbrains): update nightly gha job
Co-authored-by: Victor Nogueira <[email protected]> Co-authored-by: Pudong <[email protected]>
1 parent 740ca09 commit 449bcc2

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

.github/workflows/jetbrains-auto-update-template.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,26 @@ jobs:
4141
uses: google-github-actions/setup-gcloud@v0
4242
with:
4343
project_id: ${{ secrets.projectId }}
44+
- name: Get Current Platform Version
45+
id: current-version
46+
run: |
47+
CURRENT_VERSION=$(cat ./components/ide/jetbrains/backend-plugin/gradle-latest.properties | grep platformVersion= | sed 's/platformVersion=//')
48+
echo "::set-output name=result::$CURRENT_VERSION"
49+
echo $CURRENT_VERSION
50+
- name: Find next version
51+
id: ide-version
52+
run: |
53+
curl -sL https://www.jetbrains.com/intellij-repository/snapshots/index.json > index.json
54+
IDE_VERSION=$(cat index.json| jq -r -c '.artifacts[] | select(.content | . != null and . != "") | select(.groupId | . == "com.jetbrains.intellij.idea") | select(.version | . == "${{ steps.current-version.outputs.result }}") | .content')
55+
echo "::set-output name=result::$IDE_VERSION"
56+
echo $IDE_VERSION
4457
- name: Leeway build
58+
if: ${{ steps.ide-version.outputs.result }}
4559
run: |
4660
gcloud auth configure-docker --quiet
4761
export LEEWAY_WORKSPACE_ROOT=$(pwd)
4862
cd components/ide/jetbrains/image
49-
leeway build -Dversion=latest -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build .:${{ inputs.productId }}-latest
63+
leeway build -Dversion=latest -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build -DbuildNumber=${{ steps.ide-version.outputs.result }} .:${{ inputs.productId }}-latest
5064
- name: Get previous job's status
5165
id: lastrun
5266
uses: filiptronicek/get-last-job-status@main

components/ide/jetbrains/image/BUILD.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ const generateIDEDownloadPackage = function (ideConfig, qualifier) {
7676
if (qualifier === "stable") {
7777
pkg.env.push(`JETBRAINS_BACKEND_URL=${args[`${ideConfig.name}DownloadUrl`]}`);
7878
} else {
79-
pkg.env.push(
80-
`JETBRAINS_BACKEND_URL=${`https://download.jetbrains.com/product?type=release,rc,eap&distribution=linux&code=${ideConfig.productCode}`}`,
81-
);
79+
let url = `https://download.jetbrains.com/product?type=release,rc,eap&distribution=linux&code=${ideConfig.productCode}`;
80+
if (args["buildNumber"]) {
81+
url = `${url}&build=${args["buildNumber"]}`;
82+
}
83+
pkg.env.push(`JETBRAINS_BACKEND_URL=${url}`);
8284
}
8385
return pkg;
8486
};

0 commit comments

Comments
 (0)