-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: [#28] First integration workflow
- Build and dockerise application - add actuator with liveness/readiness
- Loading branch information
Showing
7 changed files
with
176 additions
and
95 deletions.
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,57 @@ | ||
name: V2 Build Docker | ||
|
||
on: push | ||
|
||
env: | ||
PE_BRANCH: feature/ci | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release-version: ${{ steps.version-step.outputs.pe-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: "17" | ||
|
||
- name: Get current version | ||
id: version-step | ||
run: echo "::set-output name=pe-version::$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)" | ||
|
||
- name: Print PE Version | ||
run: echo ${{ steps.version-step.outputs.pe-version }} | ||
|
||
- name: Build PE | ||
run: mvn package --no-transfer-progress | ||
|
||
- name: Upload PE jar | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pe-jar | ||
path: target/*.jar | ||
|
||
docker: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download PE jar | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: pe-jar | ||
path: target/ | ||
|
||
- name: Publish to Docker Hub | ||
uses: elgohr/Publish-Docker-Github-Action@v5 | ||
with: | ||
name: inseefr/public-enemy-back-office | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
default_branch: feature/ci | ||
tags: ${{ needs.build.outputs.release-version }} |
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,4 @@ | ||
FROM eclipse-temurin:17-jre-alpine | ||
WORKDIR /opt/pe/ | ||
COPY ./target/*.jar /opt/pe/pe.jar | ||
ENTRYPOINT ["java", "-jar", "/opt/pe/pe.jar"] |
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
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
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
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 |
---|---|---|
@@ -1,4 +1,64 @@ | ||
<?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-4.6.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.6.xsd"> | ||
|
||
<changeSet author="SC7DS3 (generated)" id="1671097612135-1"> | ||
<createTable tableName="campaign"> | ||
<column autoIncrement="true" name="id" type="INTEGER"> | ||
<constraints nullable="false" primaryKey="true" primaryKeyName="campaign_pkey"/> | ||
</column> | ||
<column name="label" type="VARCHAR"/> | ||
</createTable> | ||
</changeSet> | ||
<changeSet author="SC7DS3 (generated)" id="1671097612135-2"> | ||
<createTable tableName="context"> | ||
<column autoIncrement="true" name="id" type="INTEGER"> | ||
<constraints nullable="false" primaryKey="true" primaryKeyName="context_pkey"/> | ||
</column> | ||
<column name="name" type="VARCHAR"/> | ||
<column name="value" type="VARCHAR"/> | ||
</createTable> | ||
</changeSet> | ||
<changeSet author="SC7DS3 (generated)" id="1671097612135-3"> | ||
<createTable tableName="questionnaire"> | ||
<column autoIncrement="true" name="id" type="INTEGER"> | ||
<constraints nullable="false" primaryKey="true" primaryKeyName="questionnaire_pkey"/> | ||
</column> | ||
<column name="label" type="VARCHAR"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="campaign_id" type="INTEGER"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="creation_date" type="date"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="updated_date" type="date"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="questionnaire_pogues_id" type="VARCHAR"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="survey_unit_data" type="TEXT"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="context" type="VARCHAR"> | ||
<constraints nullable="false"/> | ||
</column> | ||
</createTable> | ||
</changeSet> | ||
<changeSet author="SC7DS3 (generated)" id="1671097612135-4"> | ||
<createTable tableName="questionnaire_mode"> | ||
<column name="questionnaire_id" type="INTEGER"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="mode" type="VARCHAR"> | ||
<constraints nullable="false"/> | ||
</column> | ||
</createTable> | ||
</changeSet> | ||
<changeSet author="SC7DS3 (generated)" id="1671097612135-5"> | ||
<addForeignKeyConstraint baseColumnNames="campaign_id" baseTableName="questionnaire" constraintName="campaign_id_fk" deferrable="false" initiallyDeferred="false" onDelete="CASCADE" onUpdate="NO ACTION" referencedColumnNames="id" referencedTableName="campaign" validate="true"/> | ||
</changeSet> | ||
<changeSet author="SC7DS3 (generated)" id="1671097612135-6"> | ||
<addForeignKeyConstraint baseColumnNames="questionnaire_id" baseTableName="questionnaire_mode" constraintName="questionnaire_id_fk2" deferrable="false" initiallyDeferred="false" onDelete="CASCADE" onUpdate="NO ACTION" referencedColumnNames="id" referencedTableName="questionnaire" validate="true"/> | ||
</changeSet> | ||
</databaseChangeLog> |
This file was deleted.
Oops, something went wrong.