Skip to content

Commit

Permalink
feat: update docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejpetras committed Feb 5, 2024
1 parent 6d0e3f8 commit 152ee04
Show file tree
Hide file tree
Showing 15 changed files with 56 additions and 61 deletions.
8 changes: 7 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ updates:
schedule:
interval: daily
labels:
- dependencies
- dependencies
- package-ecosystem: "docker"
directory: "/src/main/docker"
schedule:
interval: daily
labels:
- docker-image
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ on:
branches:
- 'main'
- 'fix/[0-9]+.[0-9]+.x'
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'

jobs:
build:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/create-new-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Create new build

on:
workflow_dispatch:

jobs:
build:
uses: onecx/ci-common/.github/workflows/create-new-build.yml@v1
secrets: inherit
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.github.onecx</groupId>
<groupId>org.tkit.onecx</groupId>
<artifactId>onecx-quarkus3-parent</artifactId>
<version>0.25.0</version>
<version>0.32.0</version>
</parent>

<artifactId>onecx-theme-bff</artifactId>
Expand Down Expand Up @@ -105,8 +105,8 @@
</goals>
<configuration>
<inputSpec>src/main/openapi/openapi-bff.yaml</inputSpec>
<apiPackage>gen.io.github.onecx.theme.bff.rs.internal</apiPackage>
<modelPackage>gen.io.github.onecx.theme.bff.rs.internal.model</modelPackage>
<apiPackage>gen.org.tkit.onecx.theme.bff.rs.internal</apiPackage>
<modelPackage>gen.org.tkit.onecx.theme.bff.rs.internal.model</modelPackage>
</configuration>
</execution>
</executions>
Expand Down
8 changes: 1 addition & 7 deletions src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
FROM registry.access.redhat.com/ubi9/openjdk-17:1.15

ENV LANGUAGE='en_US:en'
FROM ghcr.io/onecx/docker-quarkus-jvm:0.4.0

COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/
COPY --chown=185 target/quarkus-app/*.jar /deployments/
COPY --chown=185 target/quarkus-app/app/ /deployments/app/
COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/

EXPOSE 8080
USER 185
ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
12 changes: 2 additions & 10 deletions src/main/docker/Dockerfile.native
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.2
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
COPY --chown=1001:root target/*-runner /work/application

EXPOSE 8080
USER 1001
FROM ghcr.io/onecx/docker-quarkus-native:0.2.0

CMD ["./application", "-Dquarkus.http.host=0.0.0.0"]
COPY --chown=1001:root target/*-runner /work/application
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.themes.bff.rs.controllers;
package org.tkit.onecx.themes.bff.rs.controllers;

import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
Expand All @@ -10,17 +10,17 @@
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.jboss.resteasy.reactive.RestResponse;
import org.jboss.resteasy.reactive.server.ServerExceptionMapper;
import org.tkit.onecx.themes.bff.rs.mappers.ExceptionMapper;
import org.tkit.onecx.themes.bff.rs.mappers.ProblemDetailMapper;
import org.tkit.onecx.themes.bff.rs.mappers.ThemeMapper;
import org.tkit.quarkus.log.cdi.LogService;

import gen.io.github.onecx.theme.bff.clients.api.ThemesExportImportApi;
import gen.io.github.onecx.theme.bff.clients.api.ThemesInternalApi;
import gen.io.github.onecx.theme.bff.clients.api.WorkspaceExternalApi;
import gen.io.github.onecx.theme.bff.clients.model.*;
import gen.io.github.onecx.theme.bff.rs.internal.ThemesApiService;
import gen.io.github.onecx.theme.bff.rs.internal.model.*;
import io.github.onecx.themes.bff.rs.mappers.ExceptionMapper;
import io.github.onecx.themes.bff.rs.mappers.ProblemDetailMapper;
import io.github.onecx.themes.bff.rs.mappers.ThemeMapper;
import gen.org.tkit.onecx.theme.bff.clients.api.ThemesExportImportApi;
import gen.org.tkit.onecx.theme.bff.clients.api.ThemesInternalApi;
import gen.org.tkit.onecx.theme.bff.clients.api.WorkspaceExternalApi;
import gen.org.tkit.onecx.theme.bff.clients.model.*;
import gen.org.tkit.onecx.theme.bff.rs.internal.ThemesApiService;
import gen.org.tkit.onecx.theme.bff.rs.internal.model.*;

@ApplicationScoped
@Transactional(value = Transactional.TxType.NOT_SUPPORTED)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package io.github.onecx.themes.bff.rs.log;
package org.tkit.onecx.themes.bff.rs.log;

import java.util.List;

import jakarta.enterprise.context.ApplicationScoped;

import org.tkit.quarkus.log.cdi.LogParam;

import gen.io.github.onecx.theme.bff.rs.internal.model.*;
import gen.org.tkit.onecx.theme.bff.rs.internal.model.*;

@ApplicationScoped
public class ThemeLog implements LogParam {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.themes.bff.rs.mappers;
package org.tkit.onecx.themes.bff.rs.mappers;

import java.util.List;
import java.util.Map;
Expand All @@ -14,9 +14,9 @@
import org.mapstruct.Mapping;
import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper;

import gen.io.github.onecx.theme.bff.rs.internal.model.ProblemDetailInvalidParamDTO;
import gen.io.github.onecx.theme.bff.rs.internal.model.ProblemDetailParamDTO;
import gen.io.github.onecx.theme.bff.rs.internal.model.ProblemDetailResponseDTO;
import gen.org.tkit.onecx.theme.bff.rs.internal.model.ProblemDetailInvalidParamDTO;
import gen.org.tkit.onecx.theme.bff.rs.internal.model.ProblemDetailParamDTO;
import gen.org.tkit.onecx.theme.bff.rs.internal.model.ProblemDetailResponseDTO;

@Mapper(uses = { OffsetDateTimeMapper.class })
public interface ExceptionMapper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.github.onecx.themes.bff.rs.mappers;
package org.tkit.onecx.themes.bff.rs.mappers;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper;

import gen.io.github.onecx.theme.bff.clients.model.ProblemDetailResponse;
import gen.io.github.onecx.theme.bff.rs.internal.model.ProblemDetailResponseDTO;
import gen.org.tkit.onecx.theme.bff.clients.model.ProblemDetailResponse;
import gen.org.tkit.onecx.theme.bff.rs.internal.model.ProblemDetailResponseDTO;

@Mapper(uses = { OffsetDateTimeMapper.class })
public interface ProblemDetailMapper {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.github.onecx.themes.bff.rs.mappers;
package org.tkit.onecx.themes.bff.rs.mappers;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.tkit.quarkus.rs.mappers.OffsetDateTimeMapper;

import gen.io.github.onecx.theme.bff.clients.model.*;
import gen.io.github.onecx.theme.bff.rs.internal.model.*;
import gen.org.tkit.onecx.theme.bff.clients.model.*;
import gen.org.tkit.onecx.theme.bff.rs.internal.model.*;

@Mapper(uses = { OffsetDateTimeMapper.class })
public interface ThemeMapper {
Expand Down
8 changes: 5 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ org.eclipse.microprofile.rest.client.propagateHeaders=apm-principal-token
# BUILD
quarkus.openapi-generator.codegen.input-base-dir=target/tmp/openapi
quarkus.openapi-generator.codegen.spec.onecx_theme_svc_yaml.config-key=onecx_theme_svc
quarkus.openapi-generator.codegen.spec.onecx_theme_svc_yaml.base-package=gen.io.github.onecx.theme.bff.clients
quarkus.openapi-generator.codegen.spec.onecx_theme_svc_yaml.base-package=gen.org.tkit.onecx.theme.bff.clients
quarkus.openapi-generator.codegen.spec.onecx_theme_svc_yaml.return-response=true
quarkus.openapi-generator.codegen.spec.onecx_theme_svc_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
quarkus.openapi-generator.codegen.spec.onecx_theme_svc_exim_v1_yaml.config-key=onecx_theme_svc
quarkus.openapi-generator.codegen.spec.onecx_theme_svc_exim_v1_yaml.base-package=gen.io.github.onecx.theme.bff.clients
quarkus.openapi-generator.codegen.spec.onecx_theme_svc_exim_v1_yaml.base-package=gen.org.tkit.onecx.theme.bff.clients
quarkus.openapi-generator.codegen.spec.onecx_theme_svc_exim_v1_yaml.return-response=true
quarkus.openapi-generator.codegen.spec.onecx_theme_svc_exim_v1_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
quarkus.openapi-generator.codegen.spec.onecx_workspace_svc_v1_yaml.config-key=onecx_workspace_svc_v1
quarkus.openapi-generator.codegen.spec.onecx_workspace_svc_v1_yaml.base-package=gen.io.github.onecx.theme.bff.clients
quarkus.openapi-generator.codegen.spec.onecx_workspace_svc_v1_yaml.base-package=gen.org.tkit.onecx.theme.bff.clients
quarkus.openapi-generator.codegen.spec.onecx_workspace_svc_v1_yaml.return-response=true
quarkus.openapi-generator.codegen.spec.onecx_workspace_svc_v1_yaml.additional-api-type-annotations=@org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;

Expand All @@ -41,3 +41,5 @@ quarkus.test.integration-test-profile=test
%test.quarkus.rest-client.onecx_workspace_svc_v1.url=${quarkus.mockserver.endpoint}

# PIPE CONFIG


Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.themes.bff.rs;
package org.tkit.onecx.themes.bff.rs;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.themes.bff.rs;
package org.tkit.onecx.themes.bff.rs;

import io.quarkus.test.junit.QuarkusIntegrationTest;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.github.onecx.themes.bff.rs;
package org.tkit.onecx.themes.bff.rs;

import static io.restassured.RestAssured.given;
import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON;
Expand All @@ -16,11 +16,11 @@
import org.mockserver.client.MockServerClient;
import org.mockserver.model.JsonBody;
import org.mockserver.model.MediaType;
import org.tkit.onecx.themes.bff.rs.controllers.ThemeRestController;
import org.tkit.quarkus.log.cdi.LogService;

import gen.io.github.onecx.theme.bff.clients.model.*;
import gen.io.github.onecx.theme.bff.rs.internal.model.*;
import io.github.onecx.themes.bff.rs.controllers.ThemeRestController;
import gen.org.tkit.onecx.theme.bff.clients.model.*;
import gen.org.tkit.onecx.theme.bff.rs.internal.model.*;
import io.quarkiverse.mockserver.test.InjectMockServerClient;
import io.quarkus.test.common.http.TestHTTPEndpoint;
import io.quarkus.test.junit.QuarkusTest;
Expand Down

0 comments on commit 152ee04

Please sign in to comment.