Skip to content

Commit 2adc9a0

Browse files
authored
Merge pull request #92 from PublicisSapient/DTS-48150_NEW_SCM_processor_kk
Dts 48150 new scm processor kk
2 parents 967ae35 + 62ecc87 commit 2adc9a0

File tree

60 files changed

+14558
-4
lines changed

Some content is hidden

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

60 files changed

+14558
-4
lines changed

.github/workflows/Processors_CI_CD_Workflow.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ jobs:
209209
if: ${{ github.event.inputs.processor == 'all' || github.event.inputs.processor == 'scm-processor' }}
210210
run: |
211211
docker login $ACR_LOGIN_SERVER --username ${{ secrets.SPEEDTOOLS_ACR_USERNAME }} --password ${{ secrets.SPEEDTOOLS_ACR_PASSWORD }}
212-
docker build -t $ACR_LOGIN_SERVER/$SCM_IMAGE_NAME:$IMAGE_TAG .
212+
docker build -t $ACR_LOGIN_SERVER/$SCM_IMAGE_NAME:$IMAGE_TAG knowhow-scm-processor/.
213213
docker push $ACR_LOGIN_SERVER/$SCM_IMAGE_NAME:$IMAGE_TAG
214214
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
215215

knowhow-scm-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/knowhow-scm-processor-exec.jar
28+
ADD ${JAR_FILE} $APP_DIR/knowhow-scm-processor.jar
29+
30+
# Expose port
31+
EXPOSE 50025
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 knowhow-scm-processor.jar"]

0 commit comments

Comments
 (0)