Skip to content

Commit 0ab7d65

Browse files
authored
Merge pull request #171 from PublicisSapient/qa-master
Qa master to master
2 parents f639f72 + 41ad92f commit 0ab7d65

File tree

332 files changed

+37417
-11918
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

332 files changed

+37417
-11918
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Global rule:
2-
* @aksshriv1 @shunaray @kunkambl @vladinu @prabasak23 @brahmanand1 @mampacch @nehgupta13 @ananthpal @manoj-srivastava
2+
* @aksshriv1 @shunaray @kunkambl @vladinu @gurdeep-singh-49 @anamitra1-ps @prabasak23 @brahmanand1 @andrada-mihai @mampacch @nehgupta13 @Theo-Constantin @ananthpal @manoj-srivastava

.github/workflows/Processors_CI_CD_Prod_Workflow.yaml

Lines changed: 483 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/Processors_CI_CD_Workflow.yaml

Lines changed: 150 additions & 47 deletions
Large diffs are not rendered by default.

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/gitguardian/ggshield
3+
rev: v1.45.0
4+
hooks:
5+
- id: ggshield
6+
language_version: python3
7+
stages: [pre-commit]

ai-data-processor/Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Use a base image
2+
FROM amazoncorretto:17
3+
4+
# Create a non-root user
5+
ARG USER=knowhowuser
6+
ARG UID=1000
7+
ARG GID=1000
8+
9+
# Set the working directory
10+
WORKDIR /app
11+
12+
# Set the ownership of the working directory to the non-root user
13+
RUN ln -sf /bin/bash /bin/sh \
14+
&& yum install -y shadow-utils \
15+
&& groupadd -g $GID $USER \
16+
&& useradd -u $UID -g $GID -m -s /bin/bash $USER \
17+
&& yum clean all -y
18+
19+
# Set environment variables for volumes
20+
21+
ENV APP_DIR="/app" \
22+
JAVA_OPTS="" \
23+
keytoolalias="myknowhow" \
24+
keystorefile="/usr/lib/jvm/java-17-amazon-corretto/lib/security/cacerts"
25+
26+
# Set the JAR file variable
27+
ARG JAR_FILE=target/ai-data-processor-exec.jar
28+
ADD ${JAR_FILE} $APP_DIR/ai-data-processor-exec.jar
29+
30+
# Expose port
31+
EXPOSE 50026
32+
33+
# Set permissions for the JAR file
34+
RUN chown -R $USER:$USER /app \
35+
&& chmod 766 $keystorefile
36+
37+
# Switch to the non-root user
38+
USER $USER:$GID
39+
40+
# Entrypoint command
41+
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar ai-data-processor-exec.jar"]

ai-data-processor/pom.xml

Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,272 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright 2024 <Sapient Corporation>
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License");
6+
~ you may not use this file except in compliance with the License.
7+
~ You may obtain a copy of the License at
8+
~
9+
~ http://www.apache.org/licenses/LICENSE-2.0
10+
~
11+
~ Unless required by applicable law or agreed to in writing, software
12+
~ distributed under the License is distributed on an "AS IS" BASIS,
13+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
~ See the License for the specific language governing permissions and limitations under the
15+
~ License.
16+
-->
17+
18+
<project xmlns="http://maven.apache.org/POM/4.0.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
21+
<modelVersion>4.0.0</modelVersion>
22+
23+
<parent>
24+
<groupId>com.publicissapient.kpidashboard</groupId>
25+
<artifactId>processors</artifactId>
26+
<version>14.1.0-SNAPSHOT</version>
27+
<relativePath>../pom.xml</relativePath>
28+
</parent>
29+
30+
<artifactId>ai-data-processor</artifactId>
31+
<version>14.1.0-SNAPSHOT</version>
32+
<description>Microservice used for preparing, enriching and storing data used by the AI components of the platform
33+
</description>
34+
35+
<properties>
36+
<final.name>ai-data-processor</final.name>
37+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38+
</properties>
39+
40+
<dependencies>
41+
<dependency>
42+
<groupId>org.springframework.boot</groupId>
43+
<artifactId>spring-boot-starter-webflux</artifactId>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.springframework.boot</groupId>
47+
<artifactId>spring-boot-starter-batch</artifactId>
48+
</dependency>
49+
<dependency>
50+
<groupId>org.springframework.batch</groupId>
51+
<artifactId>spring-batch-core</artifactId>
52+
</dependency>
53+
<dependency>
54+
<groupId>org.springframework.batch</groupId>
55+
<artifactId>spring-batch-integration</artifactId>
56+
</dependency>
57+
<dependency>
58+
<groupId>com.h2database</groupId>
59+
<artifactId>h2</artifactId>
60+
</dependency>
61+
62+
<dependency>
63+
<groupId>com.fasterxml.jackson.datatype</groupId>
64+
<artifactId>jackson-datatype-joda</artifactId>
65+
<version>2.14.2</version>
66+
</dependency>
67+
<dependency>
68+
<groupId>com.fasterxml.jackson.core</groupId>
69+
<artifactId>jackson-databind</artifactId>
70+
<version>2.16.1</version>
71+
<scope>compile</scope>
72+
</dependency>
73+
<dependency>
74+
<groupId>com.fasterxml.jackson.core</groupId>
75+
<artifactId>jackson-core</artifactId>
76+
<version>2.16.1</version>
77+
</dependency>
78+
79+
<!-- Logging dependencies> -->
80+
<dependency>
81+
<groupId>ch.qos.logback</groupId>
82+
<artifactId>logback-core</artifactId>
83+
<version>1.4.14</version>
84+
</dependency>
85+
<dependency>
86+
<groupId>ch.qos.logback</groupId>
87+
<artifactId>logback-classic</artifactId>
88+
<version>1.4.14</version>
89+
<exclusions>
90+
<exclusion>
91+
<groupId>ch.qos.logback</groupId>
92+
<artifactId>logback-core</artifactId>
93+
</exclusion>
94+
</exclusions>
95+
</dependency>
96+
97+
<dependency>
98+
<groupId>org.apache.commons</groupId>
99+
<artifactId>commons-math3</artifactId>
100+
<version>3.6.1</version>
101+
</dependency>
102+
103+
<dependency>
104+
<groupId>org.apache.commons</groupId>
105+
<artifactId>commons-collections4</artifactId>
106+
</dependency>
107+
108+
<dependency>
109+
<groupId>org.apache.commons</groupId>
110+
<artifactId>commons-lang3</artifactId>
111+
</dependency>
112+
113+
<dependency>
114+
<groupId>org.mapstruct</groupId>
115+
<artifactId>mapstruct</artifactId>
116+
<version>1.6.3</version>
117+
</dependency>
118+
119+
<!-- Testing dependencies -->
120+
<dependency>
121+
<groupId>org.springframework.batch</groupId>
122+
<artifactId>spring-batch-test</artifactId>
123+
<scope>test</scope>
124+
</dependency>
125+
<dependency>
126+
<groupId>org.mockito</groupId>
127+
<artifactId>mockito-core</artifactId>
128+
<version>5.8.0</version>
129+
<scope>test</scope>
130+
</dependency>
131+
<dependency>
132+
<groupId>org.hamcrest</groupId>
133+
<artifactId>hamcrest-all</artifactId>
134+
<version>1.3</version>
135+
<scope>test</scope>
136+
</dependency>
137+
<dependency>
138+
<groupId>org.springframework.boot</groupId>
139+
<artifactId>spring-boot-test</artifactId>
140+
<scope>test</scope>
141+
</dependency>
142+
<dependency>
143+
<groupId>org.junit.jupiter</groupId>
144+
<artifactId>junit-jupiter-api</artifactId>
145+
<scope>test</scope>
146+
</dependency>
147+
<dependency>
148+
<groupId>com.knowhow.retro</groupId>
149+
<artifactId>ai-gateway-client</artifactId>
150+
<version>1.0.0</version>
151+
</dependency>
152+
153+
<!--Logging dependencies-->
154+
<dependency>
155+
<groupId>net.logstash.logback</groupId>
156+
<artifactId>logstash-logback-encoder</artifactId>
157+
<version>7.4</version>
158+
</dependency>
159+
<dependency>
160+
<groupId>org.springframework.boot</groupId>
161+
<artifactId>spring-boot-starter-actuator</artifactId>
162+
</dependency>
163+
<dependency>
164+
<groupId>org.springframework.metrics</groupId>
165+
<artifactId>spring-metrics</artifactId>
166+
<version>0.5.1.RELEASE</version>
167+
</dependency>
168+
<dependency>
169+
<groupId>org.springdoc</groupId>
170+
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
171+
<version>2.2.0</version>
172+
</dependency>
173+
</dependencies>
174+
<build>
175+
<finalName>${final.name}</finalName>
176+
<testResources>
177+
<testResource>
178+
<directory>src/test/resources</directory>
179+
</testResource>
180+
</testResources>
181+
<plugins>
182+
<plugin>
183+
<groupId>org.springframework.boot</groupId>
184+
<artifactId>spring-boot-maven-plugin</artifactId>
185+
<executions>
186+
<execution>
187+
<id>repackage</id>
188+
<configuration>
189+
<classifier>exec</classifier>
190+
</configuration>
191+
</execution>
192+
</executions>
193+
</plugin>
194+
<plugin>
195+
<groupId>com.spotify</groupId>
196+
<artifactId>dockerfile-maven-plugin</artifactId>
197+
<version>1.4.13</version>
198+
<executions>
199+
<execution>
200+
<id>build</id>
201+
<goals>
202+
<goal>build</goal>
203+
</goals>
204+
<phase>install</phase>
205+
<configuration>
206+
<dockerfile>Dockerfile</dockerfile>
207+
<repository>${final.name}</repository>
208+
<tag>${project.version}</tag>
209+
<buildArgs>
210+
<JAR_FILE>target/${project.build.finalName}-exec.jar</JAR_FILE>
211+
</buildArgs>
212+
</configuration>
213+
</execution>
214+
</executions>
215+
</plugin>
216+
<plugin>
217+
<groupId>org.jacoco</groupId>
218+
<artifactId>jacoco-maven-plugin</artifactId>
219+
<version>0.8.11</version>
220+
<executions>
221+
<execution>
222+
<goals>
223+
<goal>prepare-agent</goal>
224+
</goals>
225+
</execution>
226+
<execution>
227+
<id>report</id>
228+
<goals>
229+
<goal>report</goal>
230+
</goals>
231+
<phase>verify</phase>
232+
</execution>
233+
</executions>
234+
</plugin>
235+
<plugin>
236+
<groupId>org.apache.maven.plugins</groupId>
237+
<artifactId>maven-javadoc-plugin</artifactId>
238+
<executions>
239+
<execution>
240+
<id>attach-javadocs</id>
241+
<goals>
242+
<goal>jar</goal>
243+
</goals>
244+
</execution>
245+
</executions>
246+
</plugin>
247+
<plugin>
248+
<groupId>org.apache.maven.plugins</groupId>
249+
<artifactId>maven-compiler-plugin</artifactId>
250+
<version>3.13.0</version>
251+
<configuration>
252+
<annotationProcessorPaths>
253+
<path>
254+
<groupId>org.mapstruct</groupId>
255+
<artifactId>mapstruct-processor</artifactId>
256+
<version>1.6.3</version>
257+
</path>
258+
<path>
259+
<groupId>org.projectlombok</groupId>
260+
<artifactId>lombok</artifactId>
261+
<version>1.18.32</version>
262+
</path>
263+
</annotationProcessorPaths>
264+
<compilerArgs>
265+
<arg>-Amapstruct.defaultComponentModel=spring</arg>
266+
</compilerArgs>
267+
</configuration>
268+
</plugin>
269+
</plugins>
270+
</build>
271+
272+
</project>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.publicissapient.kpidashboard;
2+
3+
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;
4+
import org.springframework.boot.SpringApplication;
5+
import org.springframework.boot.autoconfigure.SpringBootApplication;
6+
import org.springframework.context.annotation.ComponentScan;
7+
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
8+
import org.springframework.scheduling.annotation.EnableAsync;
9+
import org.springframework.scheduling.annotation.EnableScheduling;
10+
11+
@SpringBootApplication
12+
@ComponentScan(basePackages = { "com.publicissapient", "com.knowhow.retro.notifications",
13+
"com.knowhow.retro.aigatewayclient" })
14+
@EnableMongoRepositories(basePackages = { "com.publicissapient.**.repository" })
15+
@EnableBatchProcessing
16+
@EnableAsync
17+
@EnableScheduling
18+
public class AiDataProcessorApplication {
19+
20+
public static void main(String[] args) {
21+
SpringApplication.run(AiDataProcessorApplication.class, args);
22+
}
23+
}

0 commit comments

Comments
 (0)