mirror of
https://github.com/kochetkov-ma/allure-server.git
synced 2024-11-28 08:38:44 +02:00
fix Dockerfile and fix AboutView
This commit is contained in:
parent
e0aeac0b26
commit
cb1a022cdc
@ -1,5 +1,6 @@
|
||||
FROM gradle:jdk11 as build
|
||||
COPY . .
|
||||
ENV RELEASE_VERSION=${RELEASE_VERSION:-0.0.0}
|
||||
RUN gradle -Pversion=docker --no-daemon -PnodeVersion=12.16.3 vaadinPrepareNode bootJar
|
||||
|
||||
FROM openjdk:11-jre-slim as production
|
||||
|
@ -9,7 +9,6 @@ import com.vaadin.flow.component.html.Paragraph;
|
||||
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
|
||||
import com.vaadin.flow.router.PageTitle;
|
||||
import com.vaadin.flow.router.Route;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import lombok.NonNull;
|
||||
@ -52,9 +51,9 @@ public class AboutView extends VerticalLayout {
|
||||
public static String getVersionOrDefault(@NonNull String defaultVersion) {
|
||||
try (final InputStream inputStream = ResourceUtil.getResourceAsStream("version.info")) {
|
||||
var version = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
|
||||
log.info("App version from version.info = " + version);
|
||||
log.info("App version from version.info = " + version); //NOPMD
|
||||
return StringUtils.isBlank(version) ? defaultVersion : version;
|
||||
} catch (IOException e) {
|
||||
} catch (Exception e) { //NOPMD
|
||||
log.error("Version error", e);
|
||||
return defaultVersion;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user