Skip to content

Commit

Permalink
Merge pull request #2513 from amvanbaren/test-server-version
Browse files Browse the repository at this point in the history
version placeholder
  • Loading branch information
amvanbaren authored Apr 17, 2024
2 parents ea6da09 + 17ff4eb commit 5e94fab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG SERVER_VERSION=dbbaff4

# Builder image to compile the website
FROM ubuntu as builder

Expand Down Expand Up @@ -26,9 +28,13 @@ RUN /usr/bin/yarn --cwd website \
&& /usr/bin/yarn --cwd website compile \
&& /usr/bin/yarn --cwd website build

# Main image derived from openvsx-server
FROM ghcr.io/eclipse/openvsx-server:dbbaff4
# Main image derived from openvsx-server
FROM ghcr.io/eclipse/openvsx-server:${SERVER_VERSION}
ARG SERVER_VERSION

COPY --from=builder --chown=openvsx:openvsx /workdir/website/static/ BOOT-INF/classes/static/
COPY --from=builder --chown=openvsx:openvsx /workdir/configuration/ config/
COPY --from=builder --chown=openvsx:openvsx /workdir/logging/logback-spring.xml BOOT-INF/classes/
COPY --from=builder --chown=openvsx:openvsx /workdir/logging/logback-spring.xml BOOT-INF/classes/

# Replace version placeholder with arg value
RUN sed -i "s/<SERVER_VERSION>/$SERVER_VERSION/g" config/application.yml
2 changes: 1 addition & 1 deletion configuration/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,4 @@ ovsx:
integrity:
key-pair: create
registry:
version: ${SERVER_VERSION}
version: <SERVER_VERSION>
6 changes: 0 additions & 6 deletions kubernetes/open-vsx.org.libsonnet
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
local utils = import "utils.libsonnet";

local serverVersion(dockerImage) =
local pieces = std.split(dockerImage, ":");
local lastIndex = std.length(pieces) - 1;
pieces[lastIndex];

local labels(env) = {
app: env.appName,
environment: env.envName,
Expand Down Expand Up @@ -197,7 +192,6 @@ local newDeployment(env, dockerImage) = {
_env:: {
JVM_ARGS: (if (env.envName == "staging") then "-Dspring.datasource.hikari.maximum-pool-size=5 -Xms512M -Xmx1536M" else "-Xms4G -Xmx6G") + jvmPerfOptions,
DEPLOYMENT_CONFIG: "%s/%s" % [ env.deploymentConfig.path, env.deploymentConfig.filename, ],
SERVER_VERSION: serverVersion(dockerImage),
ENVNAME: env.envName
},
envFrom: [
Expand Down

0 comments on commit 5e94fab

Please sign in to comment.