Skip to content

Commit

Permalink
feat: dynamic unit (#333)
Browse files Browse the repository at this point in the history
* feat(dynamic unit): update pogues-model to 1.5.0

* ci: local install of pogues-model

Maven repos are temporary broken

* chore: release version 4.10.0
  • Loading branch information
nsenave authored Dec 18, 2024
1 parent 759e081 commit 85ca2d6
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 9 deletions.
45 changes: 43 additions & 2 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,36 @@ on:
["docs/**", "Dockerfile", "LICENSE", "CHANGELOG.md", "README.md"]

jobs:

pogues-model:
name: Check Pogues-Model lib version exists
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@v4

- name: Get Pogues-Model Version
id: get-version
run: echo "version=$(mvn help:evaluate -Dexpression='pogues-model.version' -q -DforceStdout)" >> $GITHUB_OUTPUT

- name: Check Pogues-Model lib tag ${{ steps.get-version.outputs.version }} existence
id: check-tag-exists
uses: mukunku/[email protected]
with:
repo: InseeFr/Pogues-Model
tag: ${{ steps.get-version.outputs.version }}

- name: Pogues-Model lib tag verification
id: check-tag
run: |
if [[ "${{ steps.check-tag-exists.outputs.exists }}" == "false" ]]; then
echo "The tag v${{ steps.get-version.outputs.version }} doesn't exist in Eno lib repo."
exit 1
fi
check-version:
needs: pogues-model
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.version-step.outputs.version }}
Expand Down Expand Up @@ -49,7 +78,7 @@ jobs:
fi
build-sources:
needs: check-version
needs: [pogues-model, check-version]
runs-on: ubuntu-latest
steps:
- name: Set up JDK
Expand All @@ -58,9 +87,21 @@ jobs:
distribution: "temurin"
java-version: "21"

- name: Checkout Pogues-Model lib repo
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ needs.pogues-model.outputs.version }}
repository: InseeFr/Pogues-Model
path: Pogues-Model

- name: Build Pogues-Model lib
working-directory: ./Pogues-Model
run: mvn install --no-transfer-progress -DskipTests=true -Dmaven.javadoc.skip=true

- uses: actions/checkout@v4
- name: Build Pogues-Back-Office with Maven
run: mvn clean package -B -V --file pom.xml --no-transfer-progress
run: mvn package -B -V --file pom.xml --no-transfer-progress

- name: Upload jar
uses: actions/upload-artifact@v4
Expand Down
43 changes: 41 additions & 2 deletions .github/workflows/create-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,33 @@ jobs:
with:
labels: 'deploy-snapshot'

pogues-model:
name: Check Pogues-Model lib version exists
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@v4

- name: Get Pogues-Model Version
id: get-version
run: echo "version=$(mvn help:evaluate -Dexpression='pogues-model.version' -q -DforceStdout)" >> $GITHUB_OUTPUT

- name: Check Pogues-Model lib tag ${{ steps.get-version.outputs.version }} existence
id: check-tag-exists
uses: mukunku/[email protected]
with:
repo: InseeFr/Pogues-Model
tag: ${{ steps.get-version.outputs.version }}

- name: Pogues-Model lib tag verification
id: check-tag
run: |
if [[ "${{ steps.check-tag-exists.outputs.exists }}" == "false" ]]; then
echo "The tag v${{ steps.get-version.outputs.version }} doesn't exist in Eno lib repo."
exit 1
fi
check-version:
needs: remove-deploy-label
runs-on: ubuntu-latest
Expand Down Expand Up @@ -58,7 +85,7 @@ jobs:
fi
build-sources:
needs: check-version
needs: [check-version, pogues-model]
runs-on: ubuntu-latest
steps:
- name: Set up JDK
Expand All @@ -67,9 +94,21 @@ jobs:
distribution: 'temurin'
java-version: '21'

- name: Checkout Pogues-Model lib repo
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ needs.pogues-model.outputs.version }}
repository: InseeFr/Pogues-Model
path: Pogues-Model

- name: Build Pogues-Model lib
working-directory: ./Pogues-Model
run: mvn install --no-transfer-progress -DskipTests=true -Dmaven.javadoc.skip=true

- uses: actions/checkout@v4
- name: Build Pogues-Back-Office with Maven
run: mvn clean package -B -V --file pom.xml --no-transfer-progress
run: mvn package -B -V --file pom.xml --no-transfer-progress

- name: Upload jar
uses: actions/upload-artifact@v4
Expand Down
47 changes: 44 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,36 @@ on:
paths-ignore: ['docs/**', 'Dockerfile', 'LICENSE', 'CHANGELOG.md', 'README.md']

jobs:

pogues-model:
name: Check Pogues-Model lib version exists
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get-version.outputs.version }}
steps:
- uses: actions/checkout@v4

- name: Get Pogues-Model Version
id: get-version
run: echo "version=$(mvn help:evaluate -Dexpression='pogues-model.version' -q -DforceStdout)" >> $GITHUB_OUTPUT

- name: Check Pogues-Model lib tag ${{ steps.get-version.outputs.version }} existence
id: check-tag-exists
uses: mukunku/[email protected]
with:
repo: InseeFr/Pogues-Model
tag: ${{ steps.get-version.outputs.version }}

- name: Pogues-Model lib tag verification
id: check-tag
run: |
if [[ "${{ steps.check-tag-exists.outputs.exists }}" == "false" ]]; then
echo "The tag v${{ steps.get-version.outputs.version }} doesn't exist in Eno lib repo."
exit 1
fi
test:
needs: pogues-model
if: ${{ (github.event.pull_request.draft == false) && !contains(github.event.pull_request.labels.*.name, 'deploy-snapshot') }}
runs-on: ubuntu-latest
steps:
Expand All @@ -15,11 +44,23 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
distribution: "temurin"
java-version: "21"

- name: Checkout Pogues-Model lib repo
uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ needs.pogues-model.outputs.version }}
repository: InseeFr/Pogues-Model
path: Pogues-Model

- name: Build Pogues-Model lib
working-directory: ./Pogues-Model
run: mvn install --no-transfer-progress -DskipTests=true -Dmaven.javadoc.skip=true

- name: Run tests with Maven
run: mvn clean test --no-transfer-progress
run: mvn test --no-transfer-progress

# - name: Test, package and analyze with maven & SonarCloud
# run: mvn --no-transfer-progress verify sonar:sonar -Dsonar.projectKey=InseeFr_Pogues-Back-Office -Dsonar.organization=inseefr -Dsonar.host.url=https://sonarcloud.io
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
<groupId>fr.insee</groupId>
<artifactId>Pogues-BO</artifactId>
<packaging>jar</packaging>
<version>4.9.5</version>
<version>4.10.0</version>
<name>Pogues-Back-Office</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>21</java.version>
<final.asset.name>pogues-bo</final.asset.name>
<pogues-model.version>1.4.2</pogues-model.version>
<pogues-model.version>1.5.0</pogues-model.version>
<fop.version>2.10</fop.version>
<springdoc-openapi-ui.version>2.7.0</springdoc-openapi-ui.version>
<jacoco.version>0.8.12</jacoco.version>
Expand Down

0 comments on commit 85ca2d6

Please sign in to comment.