Skip to content

Commit 3632d72

Browse files
committed
Run leeway build
1 parent bce6ae4 commit 3632d72

File tree

2 files changed

+7
-40
lines changed

2 files changed

+7
-40
lines changed

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

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
task: ${{ inputs.productId }}
2222

23-
draft-script:
23+
update-jetbrains:
2424
runs-on: ${{ needs.create-runner.outputs.label }}
2525
container:
2626
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
@@ -39,58 +39,24 @@ jobs:
3939
yarn
4040
npm i -g bun
4141
- name: Find Nightly Target
42-
id: target
42+
id: find-target
4343
run: |
4444
cd ./components/ide/gha-update-image/
4545
bun run index-jb-nightly.ts --task=1 --productCode=${{ inputs.productCode }}
4646
4747
if [ -f /tmp/__gh_output.txt ]
4848
then
4949
cat /tmp/__gh_output.txt >> $GITHUB_OUTPUT
50-
cat /tmp/__gh_output.txt >> $GITHUB_STEP_SUMMARY
5150
fi
52-
53-
update-jetbrains:
54-
runs-on: ${{ needs.create-runner.outputs.label }}
55-
container:
56-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:pd-test-new-preview-gha.24525
57-
needs: [ create-runner ]
58-
steps:
59-
- uses: actions/checkout@v2
60-
- name: Setup Environment
61-
uses: ./.github/actions/setup-environment
62-
with:
63-
identity_provider: ${{ github.ref == 'refs/heads/main' && secrets.CORE_DEV_PROVIDER || secrets.DEV_PREVIEW_PROVIDER }}
64-
service_account: ${{ github.ref == 'refs/heads/main' && secrets.CORE_DEV_SA || secrets.DEV_PREVIEW_SA }}
65-
leeway_segment_key: ${{ secrets.LEEWAY_SEGMENT_KEY }}
66-
- name: Find downloadUrl
67-
id: download-url
68-
run: |
69-
downloadUrl=$(cat WORKSPACE.yaml | yq r - 'defaultArgs.${{ inputs.productId }}DownloadUrl')
70-
echo "::set-output name=downloadUrl::$downloadUrl"
71-
- name: Find IDE version to download
72-
id: ide-version
73-
run: |
74-
IDE_VERSIONS_JSON=$(bash ./components/ide/jetbrains/image/resolve-latest-ide-version.sh ${{ inputs.productCode }} ${{ steps.download-url.outputs.downloadUrl }})
75-
IDE_BUILD_VERSION=$(echo "$IDE_VERSIONS_JSON" | jq -r .IDE_BUILD_VERSION)
76-
IDE_VERSION=$(echo "$IDE_VERSIONS_JSON" | jq -r .IDE_VERSION)
77-
echo "IDE_BUILD_VERSION: $IDE_BUILD_VERSION"
78-
echo "IDE_VERSION: $IDE_VERSION"
79-
echo "::set-output name=ideBuildVersion::$IDE_BUILD_VERSION"
80-
echo "::set-output name=ideVersion::$IDE_VERSION"
8151
- name: Leeway build
82-
if: ${{ steps.ide-version.outputs.ideBuildVersion }}
52+
if: ${{ steps.find-target.outputs.buildNumber }}
8353
env:
8454
LEEWAY_MAX_PROVENANCE_BUNDLE_SIZE: "8388608"
8555
LEEWAY_REMOTE_CACHE_BUCKET: ${{ github.ref == 'refs/heads/main' && 'leeway-cache-main-c514a01' || 'leeway-cache-dev-3ac8ef5' }}
8656
run: |
8757
imageRepoBase=${{ github.ref == 'refs/heads/main' && 'eu.gcr.io/gitpod-core-dev/build' || 'eu.gcr.io/gitpod-dev-artifact/build' }}
88-
echo "leeway build -Dversion=latest -DimageRepoBase=$imageRepoBase -DbuildNumber=${{ steps.ide-version.outputs.ideBuildVersion }} components/ide/jetbrains/image:${{ inputs.productId }}-latest -DjbBackendVersion=${{ steps.ide-version.outputs.ideVersion }}"
89-
echo "leeway build -Dversion=latest -DimageRepoBase=$imageRepoBase -DbuildNumber=${{ steps.ide-version.outputs.ideBuildVersion }} components/ide/jetbrains/image:${{ inputs.productId }}-latest -DjbBackendVersion=${{ steps.ide-version.outputs.ideVersion }}" >> $GITHUB_STEP_SUMMARY
90-
- name: Mock slack content
91-
run: |
92-
content=$(cat $GITHUB_STEP_SUMMARY)
93-
echo "Content from summary: $content"
58+
echo "Upgrade latest ${{ inputs.productId }} image with ${{ steps.find-target.outputs.editorSummary }}" >> $GITHUB_STEP_SUMMARY
59+
leeway build -Dversion=latest -DimageRepoBase=$imageRepoBase -DbuildNumber=${{ steps.find-target.outputs.buildNumber }} components/ide/jetbrains/image:${{ steps.find-target.outputs.image }}-latest -DjbBackendVersion=${{ steps.find-target.outputs.jbBackendVersion }}
9460
# - name: Get previous job's status
9561
# id: lastrun
9662
# uses: filiptronicek/get-last-job-status@main
@@ -100,7 +66,7 @@ jobs:
10066
# env:
10167
# SLACK_WEBHOOK: ${{ secrets.IDE_SLACK_WEBHOOK }}
10268
# SLACK_COLOR: ${{ job.status }}
103-
# SLACK_TITLE: ${{ inputs.productId }}
69+
# SLACK_TITLE: Upgrade latest ${{ inputs.productId }} image with ${{ steps.find-target.outputs.editorSummary }}
10470
# SLACK_FOOTER: "<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Workflow logs>"
10571

10672
delete-runner:

components/ide/gha-update-image/index-jb-nightly.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,4 @@ console.log(
7474
appendGitHubOutput(`buildNumber=${targetConfig.platformVersion}`);
7575
appendGitHubOutput(`image=${task.productId}`);
7676
appendGitHubOutput(`jbBackendVersion=${targetRelease.version}`);
77+
appendGitHubOutput(`editorSummary=${releaseItemStr(targetRelease)}`);

0 commit comments

Comments
 (0)