Skip to content

Commit 9c1cf7f

Browse files
Test
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
1 parent 258e2e7 commit 9c1cf7f

3 files changed

Lines changed: 240 additions & 240 deletions

File tree

build/dockerfiles/linux-libc-ubi8.Dockerfile

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -59,87 +59,87 @@ RUN { if [[ $(uname -m) == "s390x" ]]; then LIBSECRET="\
5959
# Copy Che-Code to the container
6060
#
6161
#########################################################
62-
COPY code /checode-compilation
63-
WORKDIR /checode-compilation
64-
ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1 \
65-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
62+
# COPY code /checode-compilation
63+
# WORKDIR /checode-compilation
64+
# ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1 \
65+
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
6666

67-
# Initialize a git repository for code build tools
68-
RUN git init .
67+
# # Initialize a git repository for code build tools
68+
# RUN git init .
6969

70-
# change network timeout (slow using multi-arch build)
71-
RUN npm config set fetch-retry-mintimeout 100000 && npm config set fetch-retry-maxtimeout 600000
70+
# # change network timeout (slow using multi-arch build)
71+
# RUN npm config set fetch-retry-mintimeout 100000 && npm config set fetch-retry-maxtimeout 600000
7272

73-
# Grab dependencies (and force to rebuild them)
74-
RUN rm -rf /checode-compilation/node_modules && npm install --force
73+
# # Grab dependencies (and force to rebuild them)
74+
# # RUN rm -rf /checode-compilation/node_modules && npm install --force
7575

7676
# Compile
77-
RUN NODE_ARCH=$(echo "console.log(process.arch)" | node) \
78-
&& NODE_VERSION=$(cat /checode-compilation/remote/.npmrc | grep target | cut -d '=' -f 2 | tr -d '"') \
79-
# cache node from this image to avoid to grab it from within the build
80-
&& mkdir -p /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH} \
81-
&& echo "caching /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH}/node" \
82-
&& cp /usr/bin/node /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH}/node \
83-
&& NODE_OPTIONS="--max_old_space_size=8500" ./node_modules/.bin/gulp vscode-reh-web-linux-${NODE_ARCH}-min \
84-
&& cp -r ../vscode-reh-web-linux-${NODE_ARCH} /checode
85-
86-
RUN chmod a+x /checode/out/server-main.js \
87-
&& chgrp -R 0 /checode && chmod -R g+rwX /checode
77+
# RUN NODE_ARCH=$(echo "console.log(process.arch)" | node) \
78+
# && NODE_VERSION=$(cat /checode-compilation/remote/.npmrc | grep target | cut -d '=' -f 2 | tr -d '"') \
79+
# # cache node from this image to avoid to grab it from within the build
80+
# && mkdir -p /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH} \
81+
# && echo "caching /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH}/node" \
82+
# && cp /usr/bin/node /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH}/node \
83+
# && NODE_OPTIONS="--max_old_space_size=8500" ./node_modules/.bin/gulp vscode-reh-web-linux-${NODE_ARCH}-min \
84+
# && cp -r ../vscode-reh-web-linux-${NODE_ARCH} /checode
85+
86+
# RUN chmod a+x /checode/out/server-main.js \
87+
# && chgrp -R 0 /checode && chmod -R g+rwX /checode
8888

8989
### Beginning of tests
9090
# Do not change line above! It is used to cut this section to skip tests
9191

92-
# Compile tests
93-
RUN ./node_modules/.bin/gulp compile-extension:vscode-api-tests \
94-
compile-extension:markdown-language-features \
95-
compile-extension:typescript-language-features \
96-
compile-extension:emmet \
97-
compile-extension:git \
98-
compile-extension:ipynb \
99-
compile-extension-media \
100-
compile-extension:configuration-editing
101-
102-
# Compile test suites
103-
# https://github.com/microsoft/vscode/blob/cdde5bedbf3ed88f93b5090bb3ed9ef2deb7a1b4/test/integration/browser/README.md#compile
104-
RUN if [ "$(uname -m)" = "x86_64" ]; then npm --prefix test/smoke run compile && npm --prefix test/integration/browser run compile; fi
105-
106-
# install test dependencies
107-
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
108-
RUN if [ "$(uname -m)" = "x86_64" ]; then npm run playwright-install; fi
109-
# Install procps to manage to kill processes and centos stream repository
110-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
111-
ARCH=$(uname -m) && \
112-
yum install --nobest -y procps \
113-
https://vault.centos.org/centos/8/extras/${ARCH}/os/Packages/epel-release-8-11.el8.noarch.rpm \
114-
https://vault.centos.org/8-stream/BaseOS/${ARCH}/os/Packages/centos-gpg-keys-8-3.el8.noarch.rpm \
115-
https://vault.centos.org/8-stream/BaseOS/${ARCH}/os/Packages/centos-stream-repos-8-3.el8.noarch.rpm; \
116-
fi
117-
118-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
119-
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
120-
&& yum install -y chromium \
121-
&& PLAYWRIGHT_CHROMIUM_PATH=$(echo /opt/app-root/src/.cache/ms-playwright/chromium-*/) \
122-
&& rm "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome" \
123-
&& ln -s /usr/bin/chromium-browser "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome"; \
124-
fi
125-
126-
# use of retry and timeout
127-
COPY /build/scripts/helper/retry.sh /opt/app-root/src/retry.sh
128-
RUN chmod u+x /opt/app-root/src/retry.sh
129-
130-
# Run integration tests (Browser)
131-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
132-
NODE_ARCH=$(echo "console.log(process.arch)" | node) \
133-
VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
134-
/opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m ./scripts/test-web-integration.sh --browser chromium; \
135-
fi
136-
137-
# Run smoke tests (Browser)
138-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
139-
NODE_ARCH=$(echo "console.log(process.arch)" | node) \
140-
VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
141-
/opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m npm run smoketest-no-compile -- --web --headless --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader"; \
142-
fi
92+
# # Compile tests
93+
# RUN ./node_modules/.bin/gulp compile-extension:vscode-api-tests \
94+
# compile-extension:markdown-language-features \
95+
# compile-extension:typescript-language-features \
96+
# compile-extension:emmet \
97+
# compile-extension:git \
98+
# compile-extension:ipynb \
99+
# compile-extension-media \
100+
# compile-extension:configuration-editing
101+
102+
# # Compile test suites
103+
# # https://github.com/microsoft/vscode/blob/cdde5bedbf3ed88f93b5090bb3ed9ef2deb7a1b4/test/integration/browser/README.md#compile
104+
# RUN if [ "$(uname -m)" = "x86_64" ]; then npm --prefix test/smoke run compile && npm --prefix test/integration/browser run compile; fi
105+
106+
# # install test dependencies
107+
# ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
108+
# RUN if [ "$(uname -m)" = "x86_64" ]; then npm run playwright-install; fi
109+
# # Install procps to manage to kill processes and centos stream repository
110+
# RUN if [ "$(uname -m)" = "x86_64" ]; then \
111+
# ARCH=$(uname -m) && \
112+
# yum install --nobest -y procps \
113+
# https://vault.centos.org/centos/8/extras/${ARCH}/os/Packages/epel-release-8-11.el8.noarch.rpm \
114+
# https://vault.centos.org/8-stream/BaseOS/${ARCH}/os/Packages/centos-gpg-keys-8-3.el8.noarch.rpm \
115+
# https://vault.centos.org/8-stream/BaseOS/${ARCH}/os/Packages/centos-stream-repos-8-3.el8.noarch.rpm; \
116+
# fi
117+
118+
# RUN if [ "$(uname -m)" = "x86_64" ]; then \
119+
# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
120+
# && yum install -y chromium \
121+
# && PLAYWRIGHT_CHROMIUM_PATH=$(echo /opt/app-root/src/.cache/ms-playwright/chromium-*/) \
122+
# && rm "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome" \
123+
# && ln -s /usr/bin/chromium-browser "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome"; \
124+
# fi
125+
126+
# # use of retry and timeout
127+
# COPY /build/scripts/helper/retry.sh /opt/app-root/src/retry.sh
128+
# RUN chmod u+x /opt/app-root/src/retry.sh
129+
130+
# # Run integration tests (Browser)
131+
# RUN if [ "$(uname -m)" = "x86_64" ]; then \
132+
# NODE_ARCH=$(echo "console.log(process.arch)" | node) \
133+
# VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
134+
# /opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m ./scripts/test-web-integration.sh --browser chromium; \
135+
# fi
136+
137+
# # Run smoke tests (Browser)
138+
# RUN if [ "$(uname -m)" = "x86_64" ]; then \
139+
# NODE_ARCH=$(echo "console.log(process.arch)" | node) \
140+
# VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
141+
# /opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m npm run smoketest-no-compile -- --web --headless --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader"; \
142+
# fi
143143

144144
# Do not change line below! It is used to cut this section to skip tests
145145
### Ending of tests
@@ -152,7 +152,7 @@ RUN if [ "$(uname -m)" = "x86_64" ]; then \
152152
COPY launcher /checode-launcher
153153
WORKDIR /checode-launcher
154154
RUN npm install \
155-
&& mkdir /checode/launcher \
155+
&& mkdir -p /checode/launcher \
156156
&& cp -r out/src/*.js /checode/launcher \
157157
&& chgrp -R 0 /checode && chmod -R g+rwX /checode
158158

build/dockerfiles/linux-libc-ubi9.Dockerfile

Lines changed: 83 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -59,88 +59,88 @@ RUN { if [[ $(uname -m) == "s390x" ]]; then LIBSECRET="\
5959
# Copy Che-Code to the container
6060
#
6161
#########################################################
62-
COPY code /checode-compilation
63-
WORKDIR /checode-compilation
64-
ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1 \
65-
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
66-
67-
# Initialize a git repository for code build tools
68-
RUN git init .
69-
70-
# change network timeout (slow using multi-arch build)
71-
RUN npm config set fetch-retry-mintimeout 100000 && npm config set fetch-retry-maxtimeout 600000
72-
73-
# Grab dependencies (and force to rebuild them)
74-
RUN rm -rf /checode-compilation/node_modules && npm install --force
75-
76-
# Compile
77-
RUN NODE_ARCH=$(echo "console.log(process.arch)" | node) \
78-
&& NODE_VERSION=$(cat /checode-compilation/remote/.npmrc | grep target | cut -d '=' -f 2 | tr -d '"') \
79-
# cache node from this image to avoid to grab it from within the build
80-
&& mkdir -p /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH} \
81-
&& echo "caching /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH}/node" \
82-
&& cp /usr/bin/node /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH}/node \
83-
&& NODE_OPTIONS="--max_old_space_size=8500" ./node_modules/.bin/gulp vscode-reh-web-linux-${NODE_ARCH}-min \
84-
&& cp -r ../vscode-reh-web-linux-${NODE_ARCH} /checode \
85-
# cache libbrotli from this image to provide it to a user's container
86-
&& mkdir -p /checode/ld_libs && find /usr/lib64 -name 'libbrotli*' 2>/dev/null | xargs -I {} cp -t /checode/ld_libs {}
87-
88-
RUN chmod a+x /checode/out/server-main.js \
89-
&& chgrp -R 0 /checode && chmod -R g+rwX /checode
90-
91-
### Beginning of tests
92-
# Do not change line above! It is used to cut this section to skip tests
93-
94-
# Compile tests
95-
RUN ./node_modules/.bin/gulp compile-extension:vscode-api-tests \
96-
compile-extension:markdown-language-features \
97-
compile-extension:typescript-language-features \
98-
compile-extension:emmet \
99-
compile-extension:git \
100-
compile-extension:ipynb \
101-
compile-extension-media \
102-
compile-extension:configuration-editing
103-
104-
# # Compile test suites
105-
# https://github.com/microsoft/vscode/blob/cdde5bedbf3ed88f93b5090bb3ed9ef2deb7a1b4/test/integration/browser/README.md#compile
106-
RUN if [ "$(uname -m)" = "x86_64" ]; then npm --prefix test/smoke run compile && npm --prefix test/integration/browser run compile; fi
107-
108-
# install test dependencies
109-
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
110-
RUN if [ "$(uname -m)" = "x86_64" ]; then npm run playwright-install; fi
111-
# Install procps to manage to kill processes and centos stream repository
112-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
113-
ARCH=$(uname -m) && \
114-
yum install --nobest -y procps \
115-
https://rpmfind.net/linux/epel/9/Everything/${ARCH}/Packages/e/epel-release-9-9.el9.noarch.rpm \
116-
https://rpmfind.net/linux/centos-stream/9-stream/BaseOS/${ARCH}/os/Packages/centos-gpg-keys-9.0-23.el9.noarch.rpm \
117-
https://rpmfind.net/linux/centos-stream/9-stream/BaseOS/${ARCH}/os/Packages/centos-stream-repos-9.0-23.el9.noarch.rpm; \
118-
fi
119-
120-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
121-
yum install -y chromium && \
122-
PLAYWRIGHT_CHROMIUM_PATH=$(echo /opt/app-root/src/.cache/ms-playwright/chromium-*/) && \
123-
rm "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome" && \
124-
ln -s /usr/bin/chromium-browser "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome"; \
125-
fi
126-
127-
# use of retry and timeout
128-
COPY /build/scripts/helper/retry.sh /opt/app-root/src/retry.sh
129-
RUN chmod u+x /opt/app-root/src/retry.sh
130-
131-
# Run integration tests (Browser)
132-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
133-
NODE_ARCH=$(echo "console.log(process.arch)" | node) \
134-
VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
135-
/opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m ./scripts/test-web-integration.sh --browser chromium; \
136-
fi
137-
138-
# Run smoke tests (Browser)
139-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
140-
NODE_ARCH=$(echo "console.log(process.arch)" | node) \
141-
VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
142-
/opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m npm run smoketest-no-compile -- --web --headless --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader"; \
143-
fi
62+
# COPY code /checode-compilation
63+
# WORKDIR /checode-compilation
64+
# ENV ELECTRON_SKIP_BINARY_DOWNLOAD=1 \
65+
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
66+
67+
# # Initialize a git repository for code build tools
68+
# RUN git init .
69+
70+
# # change network timeout (slow using multi-arch build)
71+
# RUN npm config set fetch-retry-mintimeout 100000 && npm config set fetch-retry-maxtimeout 600000
72+
73+
# # Grab dependencies (and force to rebuild them)
74+
# RUN rm -rf /checode-compilation/node_modules && npm install --force
75+
76+
# # Compile
77+
# RUN NODE_ARCH=$(echo "console.log(process.arch)" | node) \
78+
# && NODE_VERSION=$(cat /checode-compilation/remote/.npmrc | grep target | cut -d '=' -f 2 | tr -d '"') \
79+
# # cache node from this image to avoid to grab it from within the build
80+
# && mkdir -p /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH} \
81+
# && echo "caching /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH}/node" \
82+
# && cp /usr/bin/node /checode-compilation/.build/node/v${NODE_VERSION}/linux-${NODE_ARCH}/node \
83+
# && NODE_OPTIONS="--max_old_space_size=8500" ./node_modules/.bin/gulp vscode-reh-web-linux-${NODE_ARCH}-min \
84+
# && cp -r ../vscode-reh-web-linux-${NODE_ARCH} /checode \
85+
# # cache libbrotli from this image to provide it to a user's container
86+
# && mkdir -p /checode/ld_libs && find /usr/lib64 -name 'libbrotli*' 2>/dev/null | xargs -I {} cp -t /checode/ld_libs {}
87+
88+
# RUN chmod a+x /checode/out/server-main.js \
89+
# && chgrp -R 0 /checode && chmod -R g+rwX /checode
90+
91+
# ### Beginning of tests
92+
# # Do not change line above! It is used to cut this section to skip tests
93+
94+
# # Compile tests
95+
# RUN ./node_modules/.bin/gulp compile-extension:vscode-api-tests \
96+
# compile-extension:markdown-language-features \
97+
# compile-extension:typescript-language-features \
98+
# compile-extension:emmet \
99+
# compile-extension:git \
100+
# compile-extension:ipynb \
101+
# compile-extension-media \
102+
# compile-extension:configuration-editing
103+
104+
# # # Compile test suites
105+
# # https://github.com/microsoft/vscode/blob/cdde5bedbf3ed88f93b5090bb3ed9ef2deb7a1b4/test/integration/browser/README.md#compile
106+
# RUN if [ "$(uname -m)" = "x86_64" ]; then npm --prefix test/smoke run compile && npm --prefix test/integration/browser run compile; fi
107+
108+
# # install test dependencies
109+
# ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
110+
# RUN if [ "$(uname -m)" = "x86_64" ]; then npm run playwright-install; fi
111+
# # Install procps to manage to kill processes and centos stream repository
112+
# RUN if [ "$(uname -m)" = "x86_64" ]; then \
113+
# ARCH=$(uname -m) && \
114+
# yum install --nobest -y procps \
115+
# https://rpmfind.net/linux/epel/9/Everything/${ARCH}/Packages/e/epel-release-9-9.el9.noarch.rpm \
116+
# https://rpmfind.net/linux/centos-stream/9-stream/BaseOS/${ARCH}/os/Packages/centos-gpg-keys-9.0-23.el9.noarch.rpm \
117+
# https://rpmfind.net/linux/centos-stream/9-stream/BaseOS/${ARCH}/os/Packages/centos-stream-repos-9.0-23.el9.noarch.rpm; \
118+
# fi
119+
120+
# RUN if [ "$(uname -m)" = "x86_64" ]; then \
121+
# yum install -y chromium && \
122+
# PLAYWRIGHT_CHROMIUM_PATH=$(echo /opt/app-root/src/.cache/ms-playwright/chromium-*/) && \
123+
# rm "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome" && \
124+
# ln -s /usr/bin/chromium-browser "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome"; \
125+
# fi
126+
127+
# # use of retry and timeout
128+
# COPY /build/scripts/helper/retry.sh /opt/app-root/src/retry.sh
129+
# RUN chmod u+x /opt/app-root/src/retry.sh
130+
131+
# # Run integration tests (Browser)
132+
# RUN if [ "$(uname -m)" = "x86_64" ]; then \
133+
# NODE_ARCH=$(echo "console.log(process.arch)" | node) \
134+
# VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
135+
# /opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m ./scripts/test-web-integration.sh --browser chromium; \
136+
# fi
137+
138+
# # Run smoke tests (Browser)
139+
# RUN if [ "$(uname -m)" = "x86_64" ]; then \
140+
# NODE_ARCH=$(echo "console.log(process.arch)" | node) \
141+
# VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
142+
# /opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m npm run smoketest-no-compile -- --web --headless --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader"; \
143+
# fi
144144

145145
# Do not change line below! It is used to cut this section to skip tests
146146
### Ending of tests
@@ -153,7 +153,7 @@ RUN if [ "$(uname -m)" = "x86_64" ]; then \
153153
COPY launcher /checode-launcher
154154
WORKDIR /checode-launcher
155155
RUN npm install \
156-
&& mkdir /checode/launcher \
156+
&& mkdir -p /checode/launcher \
157157
&& cp -r out/src/*.js /checode/launcher \
158158
&& chgrp -R 0 /checode && chmod -R g+rwX /checode
159159

0 commit comments

Comments
 (0)