-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Joris Mancini <joris.mancini_externe@rte-france.com>
- Loading branch information
1 parent
5324845
commit cc23459
Showing
4 changed files
with
113 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
tags: | ||
- 'v[0-9]*' | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 17 | ||
|
||
- name: Checkout sources | ||
uses: actions/checkout@v1 | ||
|
||
- name: Build with Maven | ||
run: mvn --batch-mode -P jacoco verify | ||
|
||
- name: Run SonarCloud analysis | ||
run: > | ||
mvn --batch-mode -DskipTests sonar:sonar | ||
-Dsonar.host.url=https://sonarcloud.io | ||
-Dsonar.organization=gridsuite | ||
-Dsonar.projectKey=org.gridsuite:directory-server | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
|
||
- name: Build Docker image - Main | ||
if: github.ref == 'refs/heads/main' | ||
run: > | ||
mvn --batch-mode deploy -DskipTests -Dmaven.install.skip -Dmaven.deploy.skip -Dpowsybl.docker.deploy | ||
-Djib.httpTimeout=60000 | ||
-Djib.to.image=docker.io/gridsuite/directory-server | ||
-Djib.to.auth.username=gridsuiteci | ||
-Djib.to.auth.password=${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build Docker image - Tag | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: > | ||
mvn --batch-mode deploy -DskipTests -Dmaven.install.skip -Dmaven.deploy.skip -Dpowsybl.docker.deploy | ||
-Djib.httpTimeout=60000 | ||
-Djib.to.image=docker.io/gridsuite/directory-server:${GITHUB_REF_NAME#v} | ||
-Djib.to.auth.username=gridsuiteci | ||
-Djib.to.auth.password=${{ secrets.DOCKERHUB_TOKEN }} | ||
build-native-image: | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') | ||
|
||
steps: | ||
- name: Setup GraalVM | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
java-version: '17' | ||
distribution: 'graalvm' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout sources | ||
uses: actions/checkout@v1 | ||
|
||
- name: Build Docker Native image - Main | ||
if: github.ref == 'refs/heads/main' | ||
run: > | ||
mvn --batch-mode spring-boot:build-image -Pnative -DskipTests | ||
-Ddocker.publishRegistry.username=gridsuiteci | ||
-Ddocker.publishRegistry.password=${{ secrets.DOCKERHUB_TOKEN }} | ||
-Dspring-boot.build-image.imageName=docker.io/gridsuite/directory-server-native | ||
-Dspring-boot.build-image.publish=true | ||
- name: Build Docker Native image - Tag | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: > | ||
mvn --batch-mode spring-boot:build-image -Pnative -DskipTests | ||
-Ddocker.publishRegistry.username=gridsuiteci | ||
-Ddocker.publishRegistry.password=${{ secrets.DOCKERHUB_TOKEN }} | ||
-Dspring-boot.build-image.imageName=docker.io/gridsuite/directory-server-native:${GITHUB_REF_NAME#v} | ||
-Dspring-boot.build-image.publish=true | ||
- name: Broadcast update event | ||
if: github.ref == 'refs/heads/main' | ||
uses: gridsuite/broadcast-event@main | ||
with: | ||
token: ${{ secrets.REPO_ACCESS_TOKEN }} | ||
event-type: directory_server_updated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/main/resources/db/changelog/changesets/changelog_20240503T080101Z.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.1" encoding="UTF-8" standalone="no"?> | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd"> | ||
<changeSet author="mancinijor (generated)" id="1714723274545-1"> | ||
<dropDefaultValue columnDataType="boolean" columnName="stashed" tableName="element"/> | ||
</changeSet> | ||
<changeSet author="mancinijor (generated)" id="1714723274545-2"> | ||
<dropDefaultValue columnDataType="boolean" columnName="stashed" tableName="element"/> | ||
</changeSet> | ||
</databaseChangeLog> |
9 changes: 9 additions & 0 deletions
9
src/main/resources/db/changelog/changesets/changelog_20240503T080242Z.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.1" encoding="UTF-8" standalone="no"?> | ||
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:pro="http://www.liquibase.org/xml/ns/pro" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-latest.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd"> | ||
<changeSet author="mancinijor (generated)" id="1714723375724-1"> | ||
<dropDefaultValue columnDataType="boolean" columnName="stashed" tableName="element"/> | ||
</changeSet> | ||
<changeSet author="mancinijor (generated)" id="1714723375724-2"> | ||
<dropDefaultValue columnDataType="boolean" columnName="stashed" tableName="element"/> | ||
</changeSet> | ||
</databaseChangeLog> |