Skip to content

Commit 0e8d1c0

Browse files
authored
Merge pull request #2709 from hongwei1/obp-develop
refactor/secuty fix
2 parents 52ecf47 + 9f5635d commit 0e8d1c0

28 files changed

+1287
-291
lines changed

.github/Dockerfile_PreBuild

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
FROM jetty:9.4-jdk11-alpine
1+
FROM gcr.io/distroless/java:11
22

3-
ENV JMX_EXPORTER_VERSION=1.2.0
4-
5-
# To enable add "-javaagent:$JETTY_BASE/jmx-exporter.jar=8090:$JETTY_BASE/prometheus_config.yml" to the JAVA_OPTIONS
6-
RUN wget https://github.com/prometheus/jmx_exporter/releases/download/$JMX_EXPORTER_VERSION/jmx_prometheus_javaagent-$JMX_EXPORTER_VERSION.jar -o /var/lib/jetty/jmx-exporter.jar
7-
COPY .github/jmx_exporter.config /var/lib/jetty/prometheus_config.yml
83
# Copy OBP source code
94
# Copy build artifact (.war file) into jetty from 'maven' stage.
10-
COPY /obp-api/target/obp-api-1.*.war /var/lib/jetty/webapps/ROOT.war
5+
COPY /obp-http4s-runner/target/obp-http4s-runner.jar /app/obp-http4s-runner.jar
6+
WORKDIR /app
7+
CMD ["obp-http4s-runner.jar"]

.github/Dockerfile_PreBuild_Jmx

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/workflows/build_container.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,11 @@ jobs:
107107
**/target/site/surefire-report.html
108108
**/target/site/surefire-report/*
109109
110-
- name: Save .war artifact
110+
- name: Save .jar artifact
111+
continue-on-error: true
111112
run: |
112113
mkdir -p ./push
113-
cp obp-api/target/obp-api-1.*.war ./push/
114+
cp obp-http4s-runner/target/obp-http4s-runner.jar ./push/
114115
- uses: actions/upload-artifact@v4
115116
with:
116117
name: ${{ github.sha }}

.github/workflows/build_pull_request.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ jobs:
111111
**/target/site/surefire-report.html
112112
**/target/site/surefire-report/*
113113
114-
- name: Save .war artifact
114+
- name: Save .jar artifact
115115
run: |
116116
mkdir -p ./pull
117-
cp obp-api/target/obp-api-1.*.war ./pull/
117+
cp obp-http4s-runner/target/obp-http4s-runner.jar ./pull/
118118
- uses: actions/upload-artifact@v4
119119
with:
120120
name: ${{ github.sha }}

0 commit comments

Comments
 (0)