Skip to content

Commit

Permalink
Merge branch 'fixlogging' into 'master'
Browse files Browse the repository at this point in the history
fix logging configuration

See merge request rapiddweller-solutions/benerator/rapiddweller-benerator-ce!1
  • Loading branch information
PeterBrinkhoff committed Dec 23, 2020
2 parents 64cdae6 + 3dbe4d0 commit f92b044
Show file tree
Hide file tree
Showing 5 changed files with 236 additions and 138 deletions.
77 changes: 66 additions & 11 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ stages:
# common vars for multiple stages/jobs
variables:
ARTIFACT_ID: "rapiddweller-benerator-ce"
ARTIFACT_VERSION_BASE: "1.0.0" # should be updated with the final release (tag release version)
ARTIFACT_VERSION_BASE: "1.0.1" # should be updated with the final release (tag release version)
MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository"
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/releases/${CI_COMMIT_TAG}"

cache:
paths:
- .m2/repository/

###################### Setup ######################

setup:jdk-8:
Expand Down Expand Up @@ -163,6 +167,8 @@ deploy:jdk-8:

.e2et-preparation: &e2et-preparation
<<: *update-mvn-project
stage: E2ET
image: springci/graalvm-ce:20.3-dev-java11
needs:
- job: setup:jdk-8
artifacts: true
Expand All @@ -177,16 +183,13 @@ deploy:jdk-8:
- benerator --version

E2ET:db:
stage: E2ET
image: maven:3.6.3-adoptopenjdk-8
<<: *e2et-preparation
script:
- cd $ARTIFACT_FULLNAME/demo/db
- benerator user.ben.xml
- benerator compositekey.ben.xml

E2ET:files:
stage: E2ET
image: maven:3.6.3-adoptopenjdk-8
<<: *e2et-preparation
script:
- cd $ARTIFACT_FULLNAME/demo/file
Expand All @@ -202,17 +205,13 @@ E2ET:files:
- benerator postprocess-import.ben.xml

E2ET:shop:hsqlmem:
stage: E2ET
image: maven:3.6.3-adoptopenjdk-8
<<: *e2et-preparation
script:
- cd $ARTIFACT_FULLNAME/demo/shop
- benerator shop-hsqlmem.ben.xml


E2ET:shop:mysql:
stage: E2ET
image: maven:3.6.3-adoptopenjdk-8
variables:
DB_HOST: "mysql"
DB_PORT: "3306"
Expand Down Expand Up @@ -247,8 +246,6 @@ E2ET:shop:mysql:
- mysql --user=$MYSQL_ROOT_USER --password=$MYSQL_ROOT_PASSWORD --database=$MYSQL_DATABASE --host=$DB_HOST --execute="SELECT count(*) FROM db_product"

E2ET:shop:postgres:
stage: E2ET
image: maven:3.6.3-adoptopenjdk-8
variables:
DB_HOST: postgres
DB_PORT: "5432"
Expand Down Expand Up @@ -288,6 +285,64 @@ E2ET:shop:postgres:

###################### Sonarqube ######################

.sonar-template: &sonar
<<: *update-mvn-project
stage: quality
when: manual
allow_failure: true
variables:
SONAR_ANALYSIS_MODE: publish
GIT_DEPTH: "0"
only:
- master

quality:sonarqube-jdk-8:
<<: *sonar
image: maven:3-adoptopenjdk-8
needs:
- job: setup:jdk-8
artifacts: true
- job: build:jdk-8
artifacts: true
script:
- mvn $MAVEN_CLI_OPTS verify sonar:sonar
-Dsonar.projectKey=$CI_PROJECT_PATH+$JAVA_JDKVERSION_TAG
-Dsonar.projectName=$CI_PROJECT_NAMESPACE/$ARTIFACT_ID+$JAVA_JDKVERSION_TAG
-Dsonar.projectVersion=$ARTIFACT_VERSION
-Dsonar.java.binaries=target
-Dsonar.sourceEncoding=UTF-8
-Dsonar.sources=src/main/java
-Dsonar.tests=src/test/java
-Dsonar.junit.reportPaths=target/surefire-reports
-Dsonar.language=java
-Dsonar.host.url=$SONARQUBE_HOST
-Dsonar.login=$SONARQUBE_TOKEN
-Dsonar.scm.disabled=true
-Dsonar.ws.timeout=120

quality:sonarqube-jdk-11:
<<: *sonar
image: maven:3-adoptopenjdk-11
needs:
- job: setup:jdk-11
artifacts: true
- job: build:jdk-11
artifacts: true
script:
- mvn $MAVEN_CLI_OPTS verify sonar:sonar
-Dsonar.projectKey=$CI_PROJECT_PATH+$JAVA_JDKVERSION_TAG
-Dsonar.projectName=$CI_PROJECT_NAMESPACE/$ARTIFACT_ID+$JAVA_JDKVERSION_TAG
-Dsonar.projectVersion=$ARTIFACT_VERSION
-Dsonar.java.binaries=target
-Dsonar.sourceEncoding=UTF-8
-Dsonar.sources=src/main/java
-Dsonar.tests=src/test/java
-Dsonar.junit.reportPaths=target/surefire-reports
-Dsonar.language=java
-Dsonar.host.url=$SONARQUBE_HOST
-Dsonar.login=$SONARQUBE_TOKEN
-Dsonar.scm.disabled=true
-Dsonar.ws.timeout=120

###################### Upload Binaries ######################

Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ N/A

N/A

# 1.0.1

## Release Highlights

Fix logging (log4j config)

## Important Notes

src/main/resources/log4j.xml changed to src/main/resources/log4j2.xml

## Breaking Changes

N/A

# 1.0.0

Adoption of rapiddweller-benerator-ce by [rapiddweller](https://rapiddweller.com).
Expand Down
55 changes: 55 additions & 0 deletions src/demo/resources/demo/db/compositekey.ben.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="iso-8859-1"?>

<setup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://www.benerator.de/schema/1.0.0"
xsi:schemaLocation="https://www.benerator.de/schema/1.0.0 https://www.benerator.de/schema/benerator-1.0.0.xsd">

<!-- define a database that will be referred by the id 'db' later -->
<database id="db" url="jdbc:hsqldb:hsql" driver="org.hsqldb.jdbcDriver" user="sa" tableFilter="db_.*"/>

<execute target="db" onError="warn">
DROP TABLE playlist;
DROP TABLE track;
DROP TABLE playlist_track;
</execute>

<execute target="db">
CREATE TABLE playlist (
PlaylistId int NOT NULL,
name varchar(16) NOT NULL,
PRIMARY KEY (PlaylistId)
);

CREATE TABLE track (
TrackId int NOT NULL,
name varchar(16) NOT NULL,
PRIMARY KEY (TrackId)
);

CREATE TABLE playlist_track (
PlaylistId int NOT NULL,
TrackId int NOT NULL,
name varchar(16) NOT NULL,
unique (PlaylistId, TrackId)
);
</execute>

<generate type="playlist" count="20" consumer="db">
<id name="PlaylistId" generator="IncrementGenerator"/>
</generate>

<generate type="track" count="20" consumer="db">
<id name="TrackId" generator="IncrementGenerator"/>
</generate>

<generate type="playlist_track" count="20" consumer="db">
<reference name="PlaylistId" source="db" targetType="Playlist" unique="True"/>
<reference name="TrackId" source="db" targetType="Track" unique="True"/>
</generate>

<iterate type="playlist" source="db" consumer="ConsoleExporter"/>
<iterate type="track" source="db" consumer="ConsoleExporter"/>
<iterate type="playlist_track" source="db" consumer="ConsoleExporter"/>

</setup>

127 changes: 0 additions & 127 deletions src/main/resources/log4j.xml

This file was deleted.

Loading

0 comments on commit f92b044

Please sign in to comment.