Skip to content

Commit

Permalink
Merge pull request #33 from pagopa/PAGOPA-1135-sviluppo-migrazione-ap…
Browse files Browse the repository at this point in the history
…i-config-cache

[PAGOPA-1135] new GHA
  • Loading branch information
pasqualespica authored Aug 25, 2023
2 parents 6e83b1c + 4e31f4f commit 63e1a10
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 77 deletions.
67 changes: 0 additions & 67 deletions .devops/code-review-pipelines.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/deploy_with_github_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
cluster_name: ${{ vars.CLUSTER_NAME }}
resource_group: ${{ vars.CLUSTER_RESOURCE_GROUP }}
app_name: ${{ env.APP_NAME }}
helm_upgrade_options: "--debug --set postgresql.enabled=\"true\" --set oracle.enabled=\"true\" --set oracledev.enabled=\"true\" --set oracleprod.enabled=\"true\""
helm_upgrade_options: "--debug --set postgresql.enabled=true --set oracle.enabled=true --set oracledev.enabled=true --set oracleprod.enabled=true"

cleanup_runner:
name: Cleanup Runner
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ RUN java -Djarmode=layertools -jar application.jar extract


FROM ghcr.io/pagopa/docker-base-springboot-openjdk11:v1.0.1@sha256:bbbe948e91efa0a3e66d8f308047ec255f64898e7f9250bdb63985efd3a95dbf
ADD --chown=spring:spring https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.25.1/opentelemetry-javaagent.jar .

COPY --chown=spring:spring --from=builder dependencies/ ./
COPY --chown=spring:spring --from=builder snapshot-dependencies/ ./
Expand All @@ -22,3 +23,5 @@ COPY --chown=spring:spring --from=builder spring-boot-loader/ ./
COPY --chown=spring:spring --from=builder application/ ./

EXPOSE 8080

ENTRYPOINT ["java","-javaagent:opentelemetry-javaagent.jar","--enable-preview","org.springframework.boot.loader.JarLauncher"]
4 changes: 2 additions & 2 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: pagopa-api-cache-chart
description: Microservice that handles calculation for pagoPA Advanced Fees Management
type: application
version: 0.0.1
version: 0.1.0
dependencies:
- name: microservice-chart
version: 3.0.0
Expand All @@ -24,4 +24,4 @@ dependencies:
repository: "https://pagopa.github.io/aks-microservice-chart-blueprint"
alias: oracleprod
condition: oracleprod.enabled

appVersion: 0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache
7 changes: 7 additions & 0 deletions helm/weu-dev/values-dev.yaml → helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,10 @@ oracleprod:
envSecrets:
!!merge <<: *envSecret
DB_CONFIG_PASSWORD: "oracle-db-cfg-prod-password"
microservice-chart:
image:
tag: 0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache
canaryDelivery:
deployment:
image:
tag: 0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache
7 changes: 7 additions & 0 deletions helm/weu-prod/values-prod.yaml → helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,10 @@ oracleprod:
envSecrets:
!!merge <<: *envSecret
DB_CONFIG_PASSWORD: "oracle-db-cfg-password"
microservice-chart:
image:
tag: 0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache
canaryDelivery:
deployment:
image:
tag: 0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache
7 changes: 7 additions & 0 deletions helm/weu-uat/values-uat.yaml → helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,10 @@ oracledev:
enabled: false
oracleprod:
enabled: false
microservice-chart:
image:
tag: 0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache
canaryDelivery:
deployment:
image:
tag: 0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache
2 changes: 1 addition & 1 deletion openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "API-Config Cacher",
"description": "Generate cache for regarding Nodo dei Pagamenti configuration",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "0.6.0-3-NOD-383-jdbc-connection-error"
"version": "0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi_fdrv1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "API-Config Cacher",
"description": "Generate cache for regarding Nodo dei Pagamenti configuration",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "0.6.0-3-NOD-383-jdbc-connection-error"
"version": "0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi_nodev1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "API-Config Cacher",
"description": "Generate cache for regarding Nodo dei Pagamenti configuration",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "0.6.0-3-NOD-383-jdbc-connection-error"
"version": "0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache"
},
"servers": [
{
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi_verifierv1.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "API-Config Cacher",
"description": "Generate cache for regarding Nodo dei Pagamenti configuration",
"termsOfService": "https://www.pagopa.gov.it/",
"version": "0.6.0-3-NOD-383-jdbc-connection-error"
"version": "0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache"
},
"servers": [
{
Expand Down
9 changes: 6 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>it.gov.pagopa.api-config</groupId>
<artifactId>cache</artifactId>
<version>0.6.0-3-NOD-383-jdbc-connection-error</version>
<version>0.6.0-10-PAGOPA-1135-sviluppo-migrazione-api-config-cache</version>
<name>API-Config Cacher</name>
<description>Generate cache for regarding Nodo dei Pagamenti configuration</description>

Expand Down Expand Up @@ -115,8 +115,11 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>


<dependency>
<groupId>co.elastic.logging</groupId>
<artifactId>logback-ecs-encoder</artifactId>
<version>1.5.0</version>
</dependency>
</dependencies>

<profiles>
Expand Down
36 changes: 36 additions & 0 deletions src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<springProfile name="local">
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />

<appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>
%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m %clr(%mdc){magenta}%n%wEx
</Pattern>
</layout>
</appender>

<root level="INFO">
<appender-ref ref="stdout"/>
</root>
</springProfile>

<springProfile name="!local">
<springProperty name="ECS_SERVICE_VERSION" source="info.application.version"/>
<appender name="ECS_JSON_CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="co.elastic.logging.logback.EcsEncoder">
<serviceName>${OTEL_SERVICE_NAME}</serviceName>
<serviceVersion>${ECS_SERVICE_VERSION}</serviceVersion>
<serviceEnvironment>${ENV}</serviceEnvironment>
</encoder>
</appender>

<root level="INFO">
<appender-ref ref="ECS_JSON_CONSOLE"/>
</root>
</springProfile>

</configuration>

0 comments on commit 63e1a10

Please sign in to comment.