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
|
FROM gradle:jdk11 as build
|
||||||
COPY . .
|
COPY . .
|
||||||
|
ENV RELEASE_VERSION=${RELEASE_VERSION:-0.0.0}
|
||||||
RUN gradle -Pversion=docker --no-daemon -PnodeVersion=12.16.3 vaadinPrepareNode bootJar
|
RUN gradle -Pversion=docker --no-daemon -PnodeVersion=12.16.3 vaadinPrepareNode bootJar
|
||||||
|
|
||||||
FROM openjdk:11-jre-slim as production
|
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.component.orderedlayout.VerticalLayout;
|
||||||
import com.vaadin.flow.router.PageTitle;
|
import com.vaadin.flow.router.PageTitle;
|
||||||
import com.vaadin.flow.router.Route;
|
import com.vaadin.flow.router.Route;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import lombok.NonNull;
|
import lombok.NonNull;
|
||||||
@ -52,9 +51,9 @@ public class AboutView extends VerticalLayout {
|
|||||||
public static String getVersionOrDefault(@NonNull String defaultVersion) {
|
public static String getVersionOrDefault(@NonNull String defaultVersion) {
|
||||||
try (final InputStream inputStream = ResourceUtil.getResourceAsStream("version.info")) {
|
try (final InputStream inputStream = ResourceUtil.getResourceAsStream("version.info")) {
|
||||||
var version = IOUtils.toString(inputStream, StandardCharsets.UTF_8);
|
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;
|
return StringUtils.isBlank(version) ? defaultVersion : version;
|
||||||
} catch (IOException e) {
|
} catch (Exception e) { //NOPMD
|
||||||
log.error("Version error", e);
|
log.error("Version error", e);
|
||||||
return defaultVersion;
|
return defaultVersion;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user