From 17ff4eb7142252cce82ebee9e836616f77581d98 Mon Sep 17 00:00:00 2001 From: amvanbaren Date: Wed, 17 Apr 2024 14:30:30 +0300 Subject: [PATCH] version placeholder --- Dockerfile | 12 +++++++++--- configuration/application.yml | 2 +- kubernetes/open-vsx.org.libsonnet | 6 ------ 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 577dc5b0..a1bba57b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +ARG SERVER_VERSION=dbbaff4 + # Builder image to compile the website FROM ubuntu as builder @@ -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/ \ No newline at end of file +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/g" config/application.yml \ No newline at end of file diff --git a/configuration/application.yml b/configuration/application.yml index 173b6adc..9b469b99 100644 --- a/configuration/application.yml +++ b/configuration/application.yml @@ -168,4 +168,4 @@ ovsx: integrity: key-pair: create registry: - version: ${SERVER_VERSION} \ No newline at end of file + version: \ No newline at end of file diff --git a/kubernetes/open-vsx.org.libsonnet b/kubernetes/open-vsx.org.libsonnet index 0a5ac118..e58c5eab 100644 --- a/kubernetes/open-vsx.org.libsonnet +++ b/kubernetes/open-vsx.org.libsonnet @@ -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, @@ -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: [