Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/docker/app/src/main/docker/ubi…
Browse files Browse the repository at this point in the history
…8/ubi-minimal-8.8-1072
  • Loading branch information
pascalwilbrink authored Oct 11, 2023
2 parents 8592cb7 + 8e9bf5f commit efa13ea
Show file tree
Hide file tree
Showing 27 changed files with 15 additions and 1,384 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache Docker Register
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Set up Docker Buildx
id: buildx
Expand All @@ -43,6 +37,7 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
cache: 'maven'

- name: Create custom Maven Settings.xml
uses: whelk-io/maven-settings-xml-action@v21
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/release-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache Docker Register
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Extract tag name
id: extract_tagname
Expand All @@ -41,11 +35,12 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
cache: 'maven'
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v2
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
full_name: ${{ github.event.repository.full_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}
Expand All @@ -59,6 +59,7 @@ jobs:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache Maven packages
uses: actions/cache@v3
with:
Expand All @@ -71,7 +72,6 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'

- name: Set Common Sonar Variables
id: sonar_env
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
if: ${{ (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || (github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target') }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ parts of this repository can also be used separately in your own component to ma
Service Layer can be used as Java component to manage them. For more information about the architecture go
to [documentation](doc/compas-scl-data-service.md).

There are currently two database implementations available.
There is currently one database implementations available.

- For more development information about the BaseX Implementation go to [BaseX](doc/basex.md). (Profile activated by
default.)
- For more development information about the PostgreSQL Implementation go to [PostgreSQL](doc/postgresql.md).

> **Note:** When switching between implementation it's a good practise to first execute a maven clean to remove
Expand Down
41 changes: 0 additions & 41 deletions app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ SPDX-License-Identifier: Apache-2.0
<groupId>org.lfenergy.compas.scl.data</groupId>
<artifactId>repository</artifactId>
</dependency>
<dependency>
<groupId>org.lfenergy.compas.scl.data</groupId>
<artifactId>repository-basex</artifactId>
</dependency>
<dependency>
<groupId>org.lfenergy.compas.scl.data</groupId>
<artifactId>repository-postgresql</artifactId>
Expand Down Expand Up @@ -171,28 +167,8 @@ SPDX-License-Identifier: Apache-2.0
<goal>generate-code-tests</goal>
</goals>
</execution>
<execution>
<id>build-basex</id>
<goals>
<goal>build</goal>
</goals>
<configuration>
<properties>
<quarkus.profile>prod-basex</quarkus.profile>
<quarkus.package.output-directory>basex-quarkus-app</quarkus.package.output-directory>
<quarkus.docker.dockerfile-jvm-path>src/main/docker/Dockerfile-basex.jvm
</quarkus.docker.dockerfile-jvm-path>
<quarkus.docker.dockerfile-native-path>src/main/docker/Dockerfile-basex.native
</quarkus.docker.dockerfile-native-path>
<quarkus.container-image.tag>${project.version}-basex</quarkus.container-image.tag>
<quarkus.container-image.additional-tags>latest-basex
</quarkus.container-image.additional-tags>
</properties>
</configuration>
</execution>
<!-- Put this build execution as last, because we will use this image to do a basic native check (NativeHealthCheckIT).
This information is written in "target\quarkus-artifact.properties" and used by the integration tests (failsafe).
Sadly there is only 1 file create, so this build overwrites the one from basex.
-->
<execution>
<id>build-postgresql</id>
Expand Down Expand Up @@ -285,23 +261,6 @@ SPDX-License-Identifier: Apache-2.0
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<id>integration-test-basex</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<native.image.path>
${project.build.directory}/basex-quarkus-app/${project.build.finalName}-runner
</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager
</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
32 changes: 0 additions & 32 deletions app/src/main/resources/application-dev-basex.properties

This file was deleted.

4 changes: 0 additions & 4 deletions app/src/main/resources/application-dev-postgresql.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ quarkus.log.category."org.lfenergy.compas.scl.data".level = DEBUG
quarkus.http.auth.permission.develop-quarkus-services.paths = /compas-scl-data-service/q/swagger-ui/*,/compas-scl-data-service/index.html
quarkus.http.auth.permission.develop-quarkus-services.policy = permit

# Exclude the other repository implementations from being scanned
quarkus.arc.exclude-dependency.basex-repository.group-id = org.lfenergy.compas.scl.data
quarkus.arc.exclude-dependency.basex-repository.artifact-id = repository-basex

# Datasource configuration for PostgreSQL
quarkus.datasource.devservices.enabled = false
quarkus.datasource.db-kind = postgresql
Expand Down
25 changes: 0 additions & 25 deletions app/src/main/resources/application-prod-basex.properties

This file was deleted.

4 changes: 0 additions & 4 deletions app/src/main/resources/application-prod-postgresql.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

# Production PostgreSQL configuration.

# Exclude the other repository implementations from being scanned
quarkus.arc.exclude-dependency.basex-repository.group-id = org.lfenergy.compas.scl.data
quarkus.arc.exclude-dependency.basex-repository.artifact-id = repository-basex

# Add scanning these dependencies for scanning, also used by native compilation.
quarkus.index-dependency.postgresql-repository.group-id = org.lfenergy.compas.scl.data
quarkus.index-dependency.postgresql-repository.artifact-id = repository-postgresql
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/resources/application-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

# Test configuration.

# Exclude the other repository implementations from being scanned
quarkus.arc.exclude-dependency.basex-repository.group-id = org.lfenergy.compas.scl.data
quarkus.arc.exclude-dependency.basex-repository.artifact-id = repository-basex

# Datasource configuration for PostgreSQL
quarkus.datasource.devservices.enabled = true
quarkus.datasource.db-kind = postgresql
Expand Down
108 changes: 0 additions & 108 deletions doc/basex.md

This file was deleted.

9 changes: 0 additions & 9 deletions doc/compas-scl-data-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,6 @@ The Service class contains some logic regarding versions and private elements.
- delete: Remove (all versions) of the SCL from the storage. Or if the version is passed that specific version of the
SCL.

### BaseX

There a some BaseX specific choices made in storing the SCL.

- For every type of SCL a separate database is created. This is quite easy done in BaseX.
![Databases](images/CoMPAS-SclDataService-Databases.png)
- In these databases the SCL will be stored as "\<uuid\>/\<major-version\>/\<minor-version\>/\<patch-version\>/scl.xml".
This way it will be easy to store the different version and find the latest version.

### PostgreSQL

There a some PostgreSQL choices made in storing the SCL.
Expand Down
Loading

0 comments on commit efa13ea

Please sign in to comment.