Skip to content

Commit 257a1f3

Browse files
Andrea Falzettifelladrin
authored andcommitted
refactor(jetbrains): gha workflow to update ide images
Co-authored-by: Victor Nogueira <[email protected]>
1 parent ebc01f0 commit 257a1f3

File tree

5 files changed

+323
-169
lines changed

5 files changed

+323
-169
lines changed

.github/workflows/jetbrains-updates-template.yml

Lines changed: 0 additions & 104 deletions
This file was deleted.
Lines changed: 71 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,74 @@
1-
name: JB Releases
1+
name: JB Stable IDEs Update
22
on:
3-
workflow_dispatch:
4-
schedule:
5-
# At 11:00 on every day-of-week from Monday through Friday.
6-
- cron: "0 11 * * 1-5"
3+
workflow_dispatch:
4+
schedule:
5+
# At 11:00 on every day-of-week from Monday through Friday.
6+
- cron: "0 11 * * 1-5"
77

88
jobs:
9-
intellij:
10-
uses: ./.github/workflows/jetbrains-updates-template.yml
11-
with:
12-
productName: IntelliJ IDEA
13-
productId: intellij
14-
productCode: IIU
15-
productType: release
16-
exampleRepo: https://github.com/gitpod-io/spring-petclinic
17-
secrets:
18-
slackWebhook: ${{ secrets.IDE_SLACK_WEBHOOK }}
19-
goland:
20-
uses: ./.github/workflows/jetbrains-updates-template.yml
21-
with:
22-
productName: GoLand
23-
productId: goland
24-
productCode: GO
25-
productType: release
26-
exampleRepo: https://github.com/gitpod-io/template-golang-cli
27-
secrets:
28-
slackWebhook: ${{ secrets.IDE_SLACK_WEBHOOK }}
29-
pycharm:
30-
uses: ./.github/workflows/jetbrains-updates-template.yml
31-
with:
32-
productName: PyCharm
33-
productId: pycharm
34-
productCode: PCP
35-
productType: release
36-
exampleRepo: https://github.com/gitpod-io/template-python-django
37-
secrets:
38-
slackWebhook: ${{ secrets.IDE_SLACK_WEBHOOK }}
39-
phpstorm:
40-
uses: ./.github/workflows/jetbrains-updates-template.yml
41-
with:
42-
productName: PhpStorm
43-
productId: phpstorm
44-
productCode: PS
45-
productType: release
46-
exampleRepo: https://github.com/gitpod-io/template-php-laravel-mysql
47-
secrets:
48-
slackWebhook: ${{ secrets.IDE_SLACK_WEBHOOK }}
49-
rubymine:
50-
uses: ./.github/workflows/jetbrains-updates-template.yml
51-
with:
52-
productName: RubyMine
53-
productId: rubymine
54-
productCode: RM
55-
productType: release
56-
exampleRepo: https://github.com/gitpod-io/template-jetbrains-rubymine
57-
secrets:
58-
slackWebhook: ${{ secrets.IDE_SLACK_WEBHOOK }}
59-
webstorm:
60-
uses: ./.github/workflows/jetbrains-updates-template.yml
61-
with:
62-
productName: WebStorm
63-
productId: webstorm
64-
productCode: WS
65-
productType: release
66-
exampleRepo: https://github.com/gitpod-io/template-jetbrains-webstorm
67-
secrets:
68-
slackWebhook: ${{ secrets.IDE_SLACK_WEBHOOK }}
9+
update-jetbrains:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Check for updates
14+
run: |
15+
cd ./components/ide/jetbrains/image/gha-update-image
16+
yarn install
17+
node index.js
18+
git diff
19+
20+
- name: Detect file changes
21+
id: changes
22+
run: |
23+
echo "::set-output name=gradle-stable::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep backend-plugin/gradle-stable.properties$ | xargs)"
24+
echo "::set-output name=workspaceYaml::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep WORKSPACE.yaml$ | xargs)"
25+
- name: Create Pull Request
26+
if: ${{steps.changes.outputs.gradle-stable || steps.changes.outputs.workspaceYaml}}
27+
uses: peter-evans/create-pull-request@v4
28+
with:
29+
title: "[JetBrains] Update IDE images to new build version"
30+
body: |
31+
## Description
32+
This PR updates the JetBrains IDE images to the most recent `stable` version.
33+
34+
## How to test
35+
1. For each IDE changed on this PR, follow these steps:
36+
1. Open the preview environment generated for this branch
37+
1. Choose the stable version of the IDE that you're testing as your default editor
38+
1. Start a workspace using any repository (e.g: `https://github.com/gitpod-io/empty`)
39+
1. Verify that the workspace starts successfully
40+
1. Verify that the IDE opens successfully
41+
1. Verify that the version of the IDE corresponds to the one being updated in this PR
42+
43+
The following resources should help, in case something goes wrong (e.g. workspaces don't start):
44+
45+
- https://www.gitpod.io/docs/troubleshooting#gitpod-logs-in-jetbrains-gateway
46+
- https://docs.google.com/document/d/1K9PSB0G6NwX2Ns_SX_HEgMYTKYsgMJMY2wbh0p6t3lQ
47+
48+
## Release Notes
49+
```release-note
50+
Update JetBrains IDE images to most recent stable version.
51+
```
52+
53+
## Werft options:
54+
<!--
55+
Optional annotations to add to the werft job.
56+
* with-preview - whether to create a preview environment for this PR
57+
-->
58+
- [x] /werft with-preview
59+
- [x] /werft with-large-vm
60+
61+
_This PR was created automatically with GitHub Actions using [this](https://github.com/gitpod-io/gitpod/blob/main/.github/workflows/jetbrains-updates.yml) GHA_
62+
commit-message: "[JetBrains] Update IDE images to new build version"
63+
branch: "jetbrains/update-stable-ides"
64+
labels: "team: IDE,editor: jetbrains"
65+
- name: Get previous job's status
66+
id: lastrun
67+
uses: filiptronicek/get-last-job-status@main
68+
- name: Slack Notification
69+
if: ${{ (success() && steps.lastrun.outputs.status == 'failed') || failure() }}
70+
uses: rtCamp/action-slack-notify@v2
71+
env:
72+
SLACK_WEBHOOK: ${{ secrets.IDE_SLACK_WEBHOOK }}
73+
SLACK_COLOR: ${{ job.status }}
74+
SLACK_TITLE: ${{ inputs.productName }}

0 commit comments

Comments
 (0)