Skip to content

Commit e8376b7

Browse files
filiptronicekakosyakoviQQBot
committed
Tag VS Code images with version
Co-authored-by: Anton Kosyakov <[email protected]> Co-authored-by: iQQBot <[email protected]>
1 parent 91dea2e commit e8376b7

File tree

16 files changed

+39
-25
lines changed

16 files changed

+39
-25
lines changed

.github/workflows/code-nightly.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ jobs:
3333
export LEEWAY_WORKSPACE_ROOT=$(pwd)
3434
headCommit=$(curl -H 'Accept: application/vnd.github.VERSION.sha' https://api.github.com/repos/gitpod-io/openvscode-server/commits/gp-code/main)
3535
cd components/ide/code
36-
leeway build -Dversion=nightly -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build -DcodeCommit=$headCommit -DcodeQuality=insider .:docker
36+
codeVersion=$(curl https://raw.githubusercontent.com/gitpod-io/openvscode-server/$headCommit/package.json | jq .version)
37+
leeway build -Dversion=nightly -DimageRepoBase=eu.gcr.io/gitpod-core-dev/build -DcodeCommit=$headCommit -DcodeVersion=$codeVersion -DcodeQuality=insider .:docker
3738
- name: Get previous job's status
3839
id: lastrun
3940
uses: filiptronicek/get-last-job-status@main

WORKSPACE.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ defaultArgs:
88
publishToJBMarketplace: true
99
localAppVersion: unknown
1010
codeCommit: f604b771695de9ac3744a1aec9d32112c8873843
11+
codeVersion: 1.73.0
1112
codeQuality: stable
1213
noVerifyJBPlugin: false
1314
intellijDownloadUrl: "https://download.jetbrains.com/idea/ideaIU-2022.2.3.tar.gz"

components/ide/code/BUILD.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ packages:
1010
- imageRepoBase
1111
- codeCommit
1212
- codeQuality
13+
- codeVersion
1314
config:
1415
dockerfile: leeway.Dockerfile
1516
metadata:
1617
helm-component: workspace.codeImage
1718
buildArgs:
1819
CODE_COMMIT: ${codeCommit}
1920
CODE_QUALITY: ${codeQuality}
21+
CODE_VERSION: ${codeVersion}
2022
image:
2123
- ${imageRepoBase}/ide/code:${version}
22-
- ${imageRepoBase}/ide/code:commit-${__git_commit}
24+
- ${imageRepoBase}/ide/code:commit-${__git_commit}

components/ide/code/leeway.Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ FROM gitpod/openvscode-server-linux-build-agent:bionic-x64 as code_builder
2020

2121
ARG CODE_COMMIT
2222
ARG CODE_QUALITY
23+
ARG CODE_VERSION
2324

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

50+
# check that the provided codeVersion is the correct one for the given codeCommit
51+
RUN commitVersion=$(cat package.json | jq -r .version) \
52+
&& if [ "$commitVersion" != "$CODE_VERSION" ]; then echo "Code version mismatch: $commitVersion != $CODE_VERSION"; exit 1; fi
53+
4954
# update product.json
5055
RUN nameShort=$(jq --raw-output '.nameShort' product.json) && \
5156
nameLong=$(jq --raw-output '.nameLong' product.json) && \
@@ -98,3 +103,8 @@ ENV GITPOD_ENV_SET_GP_OPEN_EDITOR="$GITPOD_ENV_SET_EDITOR"
98103
ENV GITPOD_ENV_SET_GIT_EDITOR="$GITPOD_ENV_SET_EDITOR --wait"
99104
ENV GITPOD_ENV_SET_GP_PREVIEW_BROWSER="/ide/bin/remote-cli/gitpod-code --preview"
100105
ENV GITPOD_ENV_SET_GP_EXTERNAL_BROWSER="/ide/bin/remote-cli/gitpod-code --openExternal"
106+
107+
ARG CODE_VERSION
108+
ARG CODE_COMMIT
109+
LABEL "io.gitpod.ide.version"=$CODE_VERSION
110+
LABEL "io.gitpod.ide.commit"=$CODE_COMMIT

install/installer/cmd/testdata/render/aws-setup/output.golden

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/azure-setup/output.golden

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/customization/output.golden

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/external-registry/output.golden

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/gcp-setup/output.golden

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

install/installer/cmd/testdata/render/http-proxy/output.golden

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)