Skip to content

Commit

Permalink
Merge pull request #99 from InseeFr/develop
Browse files Browse the repository at this point in the history
feat: modularization and add questioning communications
  • Loading branch information
BettyB979 authored Jan 8, 2025
2 parents bb15118 + 38df44c commit 7bb7dbb
Show file tree
Hide file tree
Showing 338 changed files with 3,408 additions and 2,682 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/ci-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Build with Maven
run: mvn -B clean package
run: mvn -B clean package --no-transfer-progress
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
Expand All @@ -26,10 +26,10 @@ jobs:
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
- name: Upload jar
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: jar
path: target/*.jar
name: app-jar
path: platine-management-api/target/*.jar

get_version:
needs: build
Expand All @@ -40,7 +40,7 @@ jobs:
version: ${{steps.version.outputs.version}}
steps:
- name: Checkout current branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Get current version
Expand All @@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: softprops/action-gh-release@v1
Expand All @@ -72,15 +72,15 @@ jobs:
needs: get_version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Download jar
id: download
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: jar
path: target
name: app-jar
path: platine-management-api/target
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
Expand All @@ -90,7 +90,7 @@ jobs:
- uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: .
context: platine-management-api
push: true
tags: |
inseefr/platine-management-back-office:${{ needs.get_version.outputs.version }}-rc
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Build with Maven
run: mvn -B clean package
run: mvn -B clean package --no-transfer-progress
- name: Upload jar
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: jar
path: target/*.jar
name: app-jar
path: platine-management-api/target/*.jar

get_version:
needs: build
Expand All @@ -32,7 +32,7 @@ jobs:
version: ${{steps.version.outputs.version}}
steps:
- name: Checkout current branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Get current version
Expand All @@ -45,7 +45,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout current branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: softprops/action-gh-release@v1
Expand All @@ -62,15 +62,15 @@ jobs:
needs: get_version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Download jar
id: download
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: jar
path: target
name: app-jar
path: platine-management-api/target
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
Expand All @@ -80,7 +80,7 @@ jobs:
- uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: .
context: platine-management-api
push: true
tags: |
inseefr/platine-management-back-office:${{ needs.get_version.outputs.version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
name: Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,21 @@ jobs:
name: Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 21
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
uses: aquasecurity/[email protected]
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
with:
format: 'table'
scan-type: 'repo'
exit-code: '1'
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
severity: 'CRITICAL,HIGH'
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ build/

### VS Code ###
.vscode/
src/main/resources/application-*.properties

logs
**/.flattened-pom.xml
**/src/main/resources/application-*.yaml
**/src/main/resources/application-*.yml
**/src/main/resources/application-*.properties
14 changes: 0 additions & 14 deletions Dockerfile

This file was deleted.

Binary file removed docs/MDD Platine.pdf
Binary file not shown.
Binary file added docs/di_pg_sicpilbo_dv03 - MDD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/metadata.jpg
Binary file not shown.
Binary file removed docs/questioning.jpg
Binary file not shown.
Binary file removed docs/user.jpg
Binary file not shown.
Binary file removed docs/view.jpg
Binary file not shown.
20 changes: 20 additions & 0 deletions platine-management-api/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM eclipse-temurin:21.0.4_7-jre-alpine

ENV PATH_TO_JAR=/opt/app/app.jar
WORKDIR /opt/app/
COPY ./target/*.jar $PATH_TO_JAR

ENV JAVA_TOOL_OPTIONS_DEFAULT \
-XX:MaxRAMPercentage=75

# Setup a non-root user context (security)
RUN addgroup -g 1000 tomcatgroup
RUN adduser -D -s / -u 1000 tomcatuser -G tomcatgroup
RUN mkdir /opt/app/temp-files
RUN chown -R 1000:1000 /opt/app

USER 1000

ENTRYPOINT [ "/bin/sh", "-c", \
"export JAVA_TOOL_OPTIONS=\"$JAVA_TOOL_OPTIONS_DEFAULT $JAVA_TOOL_OPTIONS\"; \
exec java -jar $PATH_TO_JAR" ]
Loading

0 comments on commit 7bb7dbb

Please sign in to comment.