Skip to content

Commit

Permalink
Auto-update also the Stable Gateway Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
felladrin authored and roboquat committed Nov 16, 2022
1 parent 17424c9 commit 7b29c97
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/jetbrains-update-plugin-platform-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
git diff
- name: Create Pull Request for Gateway Plugin
id: create-gateway-pr
if: ${{ inputs.pluginId == 'gateway-plugin' && steps.latest-version.outputs.result != steps.current-version.outputs.result }}
if: ${{ contains(inputs.pluginId, 'gateway-plugin') && steps.latest-version.outputs.result != steps.current-version.outputs.result }}
uses: peter-evans/create-pull-request@v4
with:
title: "[JetBrains] Update Platform Version from ${{ inputs.pluginName }}"
Expand All @@ -79,7 +79,7 @@ jobs:
This PR updates the Platform Version from ${{ inputs.pluginName }} to the latest version.
## How to test
1. Ensure you have the [latest JetBrains Gateway](https://www.jetbrains.com/remote-development/gateway/) installed.
1. Ensure you have the Gateway installed from [JetBrains Toolbox App](https://www.jetbrains.com/toolbox-app/) and have it up-to-date.
2. Download the plugin build related to this branch in [Dev Versions](https://plugins.jetbrains.com/plugin/18438-gitpod-gateway/versions/dev), and [install it on the Gateway](https://www.jetbrains.com/help/idea/managing-plugins.html#install_plugin_from_disk).
3. Create a new workspace from the Gateway (it's ok to use the pre-selected IDE and Repository) and confirm if JetBrains Client can connect to it.
Expand All @@ -101,14 +101,14 @@ jobs:
token: ${{ secrets.roboquatRepoPat }}
committer: Robo Quat <[email protected]>
author: Robo Quat <[email protected]>
- name: Approve Pull Request for Gateway Plugin
if: ${{ steps.create-gateway-pr.outputs.pull-request-number }}
- name: Approve Pull Request for Gateway Plugin (EAP)
if: ${{ inputs.pluginId == 'latest-gateway-plugin' && steps.create-gateway-pr.outputs.pull-request-number }}
uses: hmarr/auto-approve-action@v3
with:
pull-request-number: ${{ steps.create-gateway-pr.outputs.pull-request-number }}
- name: Create Pull Request for Backend Plugin
id: create-backend-pr
if: ${{ inputs.pluginId == 'backend-plugin' && steps.latest-version.outputs.result != steps.current-version.outputs.result }}
if: ${{ contains(inputs.pluginId, 'backend-plugin') && steps.latest-version.outputs.result != steps.current-version.outputs.result }}
uses: peter-evans/create-pull-request@v4
with:
title: "[JetBrains] Update Platform Version from ${{ inputs.pluginName }}"
Expand Down
22 changes: 16 additions & 6 deletions .github/workflows/jetbrains-update-plugin-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,33 @@ on:
# At 11:00 on every day-of-week from Monday through Friday.
- cron: "0 11 * * 1-5"
jobs:
update-backend-plugin-platform:
update-latest-backend-plugin:
uses: ./.github/workflows/jetbrains-update-plugin-platform-template.yml
with:
pluginName: JetBrains Backend Plugin
pluginId: backend-plugin
pluginName: JetBrains Backend Plugin (EAP)
pluginId: latest-backend-plugin
xpath: "(/html/body/table[preceding::h2/text()='com.jetbrains.intellij.idea'][1]/tbody/tr/td[contains(text(),'-EAP-CANDIDATE-SNAPSHOT') and starts-with(text(),'MAJOR_VERSION_PLACEHOLDER')]/text())[1]"
gradlePropertiesPath: components/ide/jetbrains/backend-plugin/gradle-latest.properties
secrets:
slackWebhook: ${{ secrets.IDE_SLACK_WEBHOOK }}
roboquatRepoPat: ${{ secrets.ROBOQUAT_REPO_PAT }}
update-gateway-plugin-platform:
update-latest-gateway-plugin:
uses: ./.github/workflows/jetbrains-update-plugin-platform-template.yml
with:
pluginName: JetBrains Gateway Plugin
pluginId: gateway-plugin
pluginName: JetBrains Gateway Plugin (EAP)
pluginId: latest-gateway-plugin
xpath: "(/html/body/table[preceding::h2/text()='com.jetbrains.gateway'][1]/tbody/tr/td[contains(text(),'-CUSTOM-SNAPSHOT') and starts-with(text(),'MAJOR_VERSION_PLACEHOLDER') and not(contains(text(),'-NIGHTLY'))]/text())[1]"
gradlePropertiesPath: components/ide/jetbrains/gateway-plugin/gradle-latest.properties
secrets:
slackWebhook: ${{ secrets.IDE_SLACK_WEBHOOK }}
roboquatRepoPat: ${{ secrets.ROBOQUAT_REPO_PAT }}
update-stable-gateway-plugin:
uses: ./.github/workflows/jetbrains-update-plugin-platform-template.yml
with:
pluginName: JetBrains Gateway Plugin (Stable)
pluginId: stable-gateway-plugin
xpath: "(/html/body/table[preceding::h2/text()='com.jetbrains.gateway'][1]/tbody/tr/td[contains(text(),'-CUSTOM-SNAPSHOT') and starts-with(text(),'MAJOR_VERSION_PLACEHOLDER') and not(contains(text(),'-NIGHTLY'))]/text())[1]"
gradlePropertiesPath: components/ide/jetbrains/gateway-plugin/gradle-stable.properties
secrets:
slackWebhook: ${{ secrets.IDE_SLACK_WEBHOOK }}
roboquatRepoPat: ${{ secrets.ROBOQUAT_REPO_PAT }}

0 comments on commit 7b29c97

Please sign in to comment.