Skip to content

Tag VS Code images with version #14055

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

Merged
merged 1 commit into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/code-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
export LEEWAY_WORKSPACE_ROOT=$(pwd)
headCommit=$(curl -H 'Accept: application/vnd.github.VERSION.sha' https://api.github.com/repos/gitpod-io/openvscode-server/commits/gp-code/main)
cd components/ide/code
leeway build -Dversion=nightly -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build -DcodeCommit=$headCommit -DcodeQuality=insider .:docker
codeVersion=$(curl https://raw.githubusercontent.com/gitpod-io/openvscode-server/$headCommit/package.json | jq .version)
leeway build -Dversion=nightly -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build -DcodeCommit=$headCommit -DcodeVersion=$codeVersion -DcodeQuality=insider .:docker
- name: Get previous job's status
id: lastrun
uses: filiptronicek/get-last-job-status@main
Expand Down
1 change: 1 addition & 0 deletions WORKSPACE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ defaultArgs:
publishToJBMarketplace: true
localAppVersion: unknown
codeCommit: 4eb2aeb56544f66b029ff76d46e2fa5f863fbb6c
codeVersion: 1.72.3
codeQuality: stable
noVerifyJBPlugin: false
intellijDownloadUrl: "https://download.jetbrains.com/idea/ideaIU-2022.2.3.tar.gz"
Expand Down
4 changes: 3 additions & 1 deletion components/ide/code/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ packages:
- imageRepoBase
- codeCommit
- codeQuality
- codeVersion
config:
dockerfile: leeway.Dockerfile
metadata:
helm-component: workspace.codeImage
buildArgs:
CODE_COMMIT: ${codeCommit}
CODE_QUALITY: ${codeQuality}
CODE_VERSION: ${codeVersion}
image:
- ${imageRepoBase}/ide/code:${version}
- ${imageRepoBase}/ide/code:commit-${__git_commit}
- ${imageRepoBase}/ide/code:commit-${__git_commit}
10 changes: 10 additions & 0 deletions components/ide/code/leeway.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ FROM gitpod/openvscode-server-linux-build-agent:bionic-x64 as code_builder

ARG CODE_COMMIT
ARG CODE_QUALITY
ARG CODE_VERSION

ARG NODE_VERSION=16.16.0
ARG NVM_DIR="/root/.nvm"
Expand All @@ -46,6 +47,10 @@ RUN yarn --frozen-lockfile --network-timeout 180000
RUN rm -rf remote/node_modules/
COPY --from=dependencies_builder /gp-code/remote/node_modules/ /gp-code/remote/node_modules/

# check that the provided codeVersion is the correct one for the given codeCommit
RUN commitVersion=$(cat package.json | jq -r .version) \
&& if [ "$commitVersion" != "$CODE_VERSION" ]; then echo "Code version mismatch: $commitVersion != $CODE_VERSION"; exit 1; fi

# update product.json
RUN nameShort=$(jq --raw-output '.nameShort' product.json) && \
nameLong=$(jq --raw-output '.nameLong' product.json) && \
Expand Down Expand Up @@ -98,3 +103,8 @@ ENV GITPOD_ENV_SET_GP_OPEN_EDITOR="$GITPOD_ENV_SET_EDITOR"
ENV GITPOD_ENV_SET_GIT_EDITOR="$GITPOD_ENV_SET_EDITOR --wait"
ENV GITPOD_ENV_SET_GP_PREVIEW_BROWSER="/ide/bin/remote-cli/gitpod-code --preview"
ENV GITPOD_ENV_SET_GP_EXTERNAL_BROWSER="/ide/bin/remote-cli/gitpod-code --openExternal"

ARG CODE_VERSION
ARG CODE_COMMIT
LABEL "io.gitpod.ide.version"=$CODE_VERSION
LABEL "io.gitpod.ide.commit"=$CODE_COMMIT