Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/dependatbot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#schedule-
schedule:
interval: "weekly"

- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "weekly"
51 changes: 37 additions & 14 deletions .github/workflows/java-continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,52 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11' ]
java: [ '8', '11', '17', '21' ]
name: Java ${{ matrix.Java }} CI
steps:
# the latest version at https://github.com/marketplace/actions/checkout
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
# the latest version at https://github.com/marketplace/actions/setup-java-jdk
- name: Setup java
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: ${{ matrix.java }}
- name: Cache Maven packages
uses: actions/cache@v2
cache: 'maven'
# the latest version at https://github.com/actions/cache
- name: Cache target folders
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Cache node_modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
path: "**/target/"
key: ${{ runner.os }}-cache-java-${{ matrix.java }}-${{ github.sha }}
- name: Build with Maven
run: mvn -B clean install
quality:
runs-on: ubuntu-latest
needs: build
steps:
# the latest version at https://github.com/marketplace/actions/checkout
- name: Check out repository code
uses: actions/checkout@v4
with:
fetch-depth: 0
# the latest version at https://github.com/actions/cache
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: "**/target/"
fail-on-cache-miss: true
key: ${{ runner.os }}-cache-java-21-${{ github.sha }}
# the latest version at https://github.com/marketplace/actions/official-sonarqube-scan
# Triggering SonarQube analysis as results of it are required by Quality Gate check.
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v4
with:
args: >
-Dsonar.qualitygate.wait=true
-Dsonar.qualitygate.timeout=600
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/push-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Description
# ===========
# This workflow is triggered each time a release is created
# It push I-Code to github repository
---
name: Push release

on:
release:
types: [created]

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Publish on github repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn --batch-mode deploy


104 changes: 104 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Description
# ===========
# This workflow is triggered each time a milestone is closed
# It builds the jar, generates release notes, pushes a new tag
# and makes a draft release with these elements.
---
name: Release

on:
workflow_dispatch:
inputs:
draft:
description: 'Est-ce que la release doit être en brouillon?'
default: true
required: false
type: boolean
prerelease:
description: "Est-ce que c'est une pre-release?"
default: true
required: false
type: boolean
tag:
description: "Spécifier le tag git?"
required: true
type: string
maven_release_version:
description: "Spécifier la version de release? Conseil: Utiliser la même version que le tag"
required: true
type: string
maven_development_version:
description: "Spécifier la nouvelle version de développement après la release? Ex : X.X.X-SNAPSHOT"
required: true
type: string


jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
- name: Maven install with new version
run: |
mvn -B versions:set-property -Dproperty=revision -DnewVersion="${{ inputs.maven_release_version }}"
mvn -B -P prod install
# the latest version at https://github.com/marketplace/actions/official-sonarqube-scan
# Triggering SonarQube analysis as results of it are required by Quality Gate check.
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v4.2.1
with:
args: >
-Dsonar.qualitygate.wait=true
-Dsonar.qualitygate.timeout=600
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Commit and tag project
run: |
git config --global user.name "GitHub Actions"
git config --global user.email catlab@cnes.fr
git add pom.xml
git commit -m "Release ${{ inputs.tag }}"
git push
git tag ${{ inputs.tag }} -m "Release ${{ inputs.tag }}"
git push origin ${{ inputs.tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Maven deploy
run: |
mvn -B -P prod deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Bump up version in branch to next development version
run: |
git config --global user.name "GitHub Actions"
git config --global user.email catlab@cnes.frs
mvn -B versions:set-property -Dproperty=revision -DnewVersion=${{ inputs.maven_development_version }}
git add pom.xml
git commit -m "Next development version is ${{ inputs.maven_development_version }}"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set project values
run: |
echo "project=$(echo ${{ github.repository }} | awk -F '/' '{print $2}')" >> $GITHUB_ENV
- name: Create GitHub Release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
artifacts: "icode-app/target/icode-*.zip"
tag: ${{ inputs.tag }}
name: ${{ env.project }} ${{ inputs.tag }}
draft: ${{inputs.draft}}
generateReleaseNotes: true
prerelease: ${{inputs.prerelease}}
token: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions export-csv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>parent</artifactId>
<version>dev</version>
<version>${revision}</version>
</parent>

<artifactId>export-csv</artifactId>
<version>${icode.version}</version>
<packaging>jar</packaging>

<name>Export CSV</name>
Expand All @@ -20,7 +19,7 @@
<dependency>
<groupId>fr.cnes.icode</groupId>
<artifactId>icode-core</artifactId>
<version>${icode.version}</version>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
5 changes: 2 additions & 3 deletions export-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>parent</artifactId>
<version>dev</version>
<version>${revision}</version>
</parent>

<artifactId>export-xml</artifactId>
<version>${icode.version}</version>
<packaging>jar</packaging>

<name>Export XML</name>
Expand All @@ -20,7 +19,7 @@
<dependency>
<groupId>fr.cnes.icode</groupId>
<artifactId>icode-core</artifactId>
<version>${icode.version}</version>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
7 changes: 3 additions & 4 deletions fortran77-language/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>parent</artifactId>
<version>dev</version>
<version>${revision}</version>
</parent>

<artifactId>fortran77-language</artifactId>
<version>${icode.version}</version>
<packaging>jar</packaging>

<name>Fortran 77 language</name>
Expand All @@ -20,9 +19,9 @@
<dependency>
<groupId>fr.cnes.icode</groupId>
<artifactId>icode-core</artifactId>
<version>${icode.version}</version>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>

</project>
5 changes: 2 additions & 3 deletions fortran77-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>parent</artifactId>
<version>dev</version>
<version>${revision}</version>
</parent>

<artifactId>fortran77-metrics</artifactId>
<version>${icode.version}</version>
<packaging>jar</packaging>

<name>Fortran 77 metrics</name>
Expand All @@ -20,7 +19,7 @@
<dependency>
<groupId>fr.cnes.icode</groupId>
<artifactId>fortran77-language</artifactId>
<version>${icode.version}</version>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
5 changes: 2 additions & 3 deletions fortran77-rules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>parent</artifactId>
<version>dev</version>
<version>${revision}</version>
</parent>

<artifactId>fortran77-rules</artifactId>
<version>${icode.version}</version>
<packaging>jar</packaging>

<name>Fortran 77 rules</name>
Expand All @@ -20,7 +19,7 @@
<dependency>
<groupId>fr.cnes.icode</groupId>
<artifactId>fortran77-language</artifactId>
<version>${icode.version}</version>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
7 changes: 3 additions & 4 deletions fortran90-language/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>parent</artifactId>
<version>dev</version>
<version>${revision}</version>
</parent>

<artifactId>fortran90-language</artifactId>
<version>${icode.version}</version>
<packaging>jar</packaging>

<name>Fortran 90 language</name>
Expand All @@ -20,9 +19,9 @@
<dependency>
<groupId>fr.cnes.icode</groupId>
<artifactId>icode-core</artifactId>
<version>${icode.version}</version>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>

</project>
5 changes: 2 additions & 3 deletions fortran90-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
<parent>
<groupId>fr.cnes.icode</groupId>
<artifactId>parent</artifactId>
<version>dev</version>
<version>${revision}</version>
</parent>

<artifactId>fortran90-metrics</artifactId>
<version>${icode.version}</version>
<packaging>jar</packaging>

<name>Fortran 90 metrics</name>
Expand All @@ -20,7 +19,7 @@
<dependency>
<groupId>fr.cnes.icode</groupId>
<artifactId>fortran90-language</artifactId>
<version>${icode.version}</version>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Loading
Loading