Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[github action] Fix a bug which can cover build image #10647

Merged
merged 1 commit into from
Jun 15, 2022
Merged

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Jun 14, 2022

Description

This PR fix a problem which can cover build image
This is because leeway always upload image using commit-{commitID}

- ${imageRepoBase}/ide/intellij:commit-${__git_commit}

At before, we only checkout main branch and run leeway command, it will cause cover image build with same tag

This PR add a commit before run leeway, so it never effect main branch
This PR using suffix -latest as build target, so it never affect stable branch

Related Issue(s)

Fixes #

How to test

Release Notes

NONE

Documentation

@@ -37,13 +37,19 @@ jobs:
with:
distribution: zulu
java-version: "11"
- name: Leeway build
- name: Change build hash
- run: |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- before run should be removed

- name: Leeway build
- name: Change build hash
- run: |
echo Jetbrains nightly build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

echo into README.md?

@iQQBot iQQBot force-pushed the pd/fix-build-task branch 2 times, most recently from 2f92401 to 91e24ed Compare June 14, 2022 10:56
@iQQBot
Copy link
Contributor Author

iQQBot commented Jun 14, 2022

image
I test it via start a new Github action from this branch, test work, now it only affect with -latest suffix

@iQQBot iQQBot requested a review from a team June 14, 2022 16:03
@roboquat roboquat added size/M and removed size/XS labels Jun 14, 2022
@iQQBot
Copy link
Contributor Author

iQQBot commented Jun 14, 2022

/hold

@iQQBot
Copy link
Contributor Author

iQQBot commented Jun 15, 2022

After discuss with @akosyakov , we change ${IDE_NAME}-latest package use (for build nightly job and preview environment latest version)

- ${imageRepoBase}/ide/idename:${version}
- ${imageRepoBase}/ide/idename:commit-${__git_commit}-latest

and ${IDE_NAME} package use (for stable version)

- ${imageRepoBase}/ide/idename:commit-${__git_commit}

This way the latest version and the stable version do not overwrite each other, i.e. they do not have same image tag

Another thing is to remove the jetbrainsBackendQualifier variable, because we don't use the same package build nightly and stable anymore

@mustard-mh Could you have a look again? If it is good, we should merge this to main branch.

@mustard-mh
Copy link
Contributor

mustard-mh commented Jun 15, 2022

/werft run

👍 started the job as gitpod-build-pd-fix-build-task.8
(with .werft/ from main)

Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test good, but have some problem about cache

gcloud auth configure-docker --quiet
export LEEWAY_WORKSPACE_ROOT=$(pwd)
data=$(curl -sSL "https://data.services.jetbrains.com/products?code=${{ inputs.productCode }}&fields=distributions%2Clink%2Cname%2Creleases&_=$(date +%s)000")
link=$(echo "$data" | jq -r '.[0].releases[0].downloads.linux.link')
cd components/ide/jetbrains/image
leeway build -Dversion=latest -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build -DjetbrainsBackendQualifier=latest -D${{ inputs.productId }}DownloadUrl=$link .:${{ inputs.productId }}
leeway build -Dversion=latest -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build -D${{ inputs.productId }}DownloadUrl=$link .:${{ inputs.productId }}-latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I look at leeway package with suffix -latest, it doesn't use ${{ inputs.productId }}DownloadUrl, it is a fixed url, so If we want to make sure this always latest version, we should not use cache

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️ Ah... didn't notice this

Copy link
Contributor

@mustard-mh mustard-mh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mustard-mh
Copy link
Contributor

/unhold

@roboquat roboquat merged commit 58bd41f into main Jun 15, 2022
@roboquat roboquat deleted the pd/fix-build-task branch June 15, 2022 16:32
@roboquat roboquat added deployed: IDE IDE change is running in production deployed Change is completely running in production labels Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: IDE IDE change is running in production deployed Change is completely running in production release-note-none size/M team: IDE
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants