Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean the database part of build #1455

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

juherr
Copy link
Contributor

@juherr juherr commented May 17, 2024

No description provided.


- name: Build with Maven
run: ./mvnw -B -V -Dmaven.javadoc.skip=true -Ptest clean package --file pom.xml
run: ./mvnw -B -V -Dmaven.javadoc.skip=true -Ddb-user=$DB_USER -Ddb-password=$DB_PASSWORD -Ddb-schema=$DB_SCHEMA -Ptest clean package --file pom.xml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enforce user/password/schema

RUN sed -i 's|${db.port}|${env.DB_PORT}|g' pom.xml
RUN sed -i 's|${db.user}|${env.DB_USERNAME}|g' pom.xml
RUN sed -i 's|${db.password}|${env.DB_PASSWORD}|g' pom.xml
RUN sed -i 's|${db.schema}|${env.DB_DATABASE}|g' pom.xml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

env are directly managed by maven

@@ -245,26 +281,6 @@
</configuration>
</plugin>

<!-- Read from main.properties the DB configuration -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main.properties is for runtime only and generated by maven

@juherr
Copy link
Contributor Author

juherr commented May 27, 2024

@goekay wdyt?

@juherr
Copy link
Contributor Author

juherr commented Jun 27, 2024

Ping @goekay

@goekay
Copy link
Member

goekay commented Jun 27, 2024

can you please elaborate the motivation and the problem you are trying to solve?

@juherr
Copy link
Contributor Author

juherr commented Jun 28, 2024

When I first started working on this project as a newcomer, I found it quite challenging to understand how to correctly run it due to its deviation from standard conventions.
Even now, I still struggle when attempting to modify the project.

The main issue lies in the confusion between compile time and runtime.
There are certain workarounds in place that can be quite challenging to comprehend if you are not already familiar with them, such as the variable injection via sed for Kube.

The purpose of this Pull Request is to address this problem by creating a clear distinction between the compilation and execution phases, thereby enhancing the project's manageability.

@juherr
Copy link
Contributor Author

juherr commented Aug 10, 2024

Ping @goekay

@nWidart
Copy link

nWidart commented Aug 26, 2024

This would be nice, consolidating the env var setting in one location.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants