Skip to content
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

version placeholder #2513

Merged
merged 1 commit into from
Apr 17, 2024
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
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
Loading