Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 7 additions & 3 deletions .github/workflows/docker-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,30 @@ jobs:
java-version: "21"

- name: Build API
working-directory: api
run: mvn package --no-transfer-progress

- name: Upload API jar
uses: actions/upload-artifact@v4
with:
name: app-jar
path: target/*.jar
path: api/target/*.jar

docker:
needs:
- build-snapshot
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v4

- name: Download uploaded jar
uses: actions/download-artifact@v4
with:
name: app-jar
path: target/
path: api/target/

- name: Create docker version tag
id: docker-version
Expand All @@ -64,4 +68,4 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
default_branch: ${{ github.ref }}
tags: "snapshot-${{ env.docker_tag }}"
workdir: .
workdir: api
3 changes: 3 additions & 0 deletions .github/workflows/pr-validity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
jobs:
check-version:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
jobs:
check-version:
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
outputs:
release-version: ${{ steps.version.outputs.version }}
steps:
Expand Down Expand Up @@ -54,17 +57,21 @@ jobs:
java-version: "21"

- name: Build API
working-directory: api
run: mvn package -Dchangelist=-rc --no-transfer-progress

- name: Upload API jar
uses: actions/upload-artifact@v4
with:
name: app-jar
path: target/*.jar
path: api/target/*.jar

create-release-candidate:
needs: [ check-version, build-sources ]
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -97,14 +104,17 @@ jobs:
docker:
needs: [ check-version, build-sources ]
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v4

- name: Download uploaded jar
uses: actions/download-artifact@v4
with:
name: app-jar
path: target/
path: api/target/

- name: Publish to Docker Hub
uses: elgohr/Publish-Docker-Github-Action@v5
Expand All @@ -113,4 +123,5 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
default_branch: ${{ github.ref }}
tags: ${{ needs.check-version.outputs.release-version }}
tags: ${{ needs.check-version.outputs.release-version }}
workdir: api
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:

- name: Get source version
id: version-step
working-directory: api
run: echo "version=$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT

- name: Print source version
Expand Down Expand Up @@ -57,17 +58,21 @@ jobs:

- uses: actions/checkout@v4
- name: Build app
working-directory: api
run: mvn package --no-transfer-progress

- name: Upload app jar
uses: actions/upload-artifact@v4
with:
name: app-jar
path: target/*.jar
path: api/target/*.jar

create-release:
needs: [ check-version, build-sources ]
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -99,14 +104,17 @@ jobs:
docker:
needs: [ check-version, build-sources ]
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v4

- name: Download uploaded jar
uses: actions/download-artifact@v4
with:
name: app-jar
path: target/
path: api/target/

- name: Publish to Docker Hub
uses: elgohr/Publish-Docker-Github-Action@v5
Expand All @@ -115,4 +123,5 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
default_branch: ${{ github.ref }}
tags: ${{ needs.check-version.outputs.release-version }}
tags: ${{ needs.check-version.outputs.release-version }}
workdir: api
16 changes: 13 additions & 3 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
check-version:
needs: verify-branch
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
outputs:
release-version: ${{ steps.version.outputs.version }}
steps:
Expand Down Expand Up @@ -52,6 +55,9 @@ jobs:
build-sources:
needs: check-version
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v4

Expand All @@ -68,19 +74,22 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: app-jar
path: target/*.jar
path: api/target/*.jar

publish-docker:
needs: [ check-version, build-sources ]
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v4

- name: Download uploaded jar
uses: actions/download-artifact@v4
with:
name: app-jar
path: target/
path: api/target/

- name: Publish to Docker Hub
uses: elgohr/Publish-Docker-Github-Action@v5
Expand All @@ -89,4 +98,5 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
default_branch: ${{ github.ref }}
tags: ${{ needs.check-version.outputs.release-version }}
tags: ${{ needs.check-version.outputs.release-version }}
workdir: api
3 changes: 3 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
defaults:
run:
working-directory: api
steps:
- uses: actions/checkout@v4
with:
Expand Down
5 changes: 5 additions & 0 deletions .env → api/.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ PEARL_DB=pearl

KEYCLOAK_PORT=7080
KEYCLOAK_ADMIN_PASSWORD=administrator

IMAGES_REGISTRY_DOCKER_IO=docker.io
IMAGE_ACTIVEMQ=apache/activemq-artemis:2.32.0-alpine
ARTEMIS_USER=insee
ARTEMIS_PASSWORD=lille
File renamed without changes.
16 changes: 15 additions & 1 deletion compose.yml → api/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,18 @@ services:
ports:
- "${KEYCLOAK_PORT}:8080"
volumes:
- ./container/keycloak/realms:/opt/keycloak/data/import
- ./container/keycloak/realms:/opt/keycloak/data/import
activemq:
image: ${IMAGES_REGISTRY_DOCKER_IO:-docker.io}/${IMAGE_ACTIVEMQ:-apache/activemq-artemis:2.32.0-alpine}
environment:
ARTEMIS_USER: ${ARTEMIS_USER:-insee}
ARTEMIS_PASSWORD: ${ARTEMIS_PASSWORD:-lille}
ports:
- "61616:61616"
- "8161:8161"
healthcheck:
test: ["CMD-SHELL", "nc -z localhost 61616 || exit 1"]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
Loading
Loading