Skip to content

Commit

Permalink
Improve :CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jaguililla committed Sep 2, 2024
1 parent e45753f commit 7c4d6de
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 12 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ jobs:
export REGISTRY_USERNAME="${GITHUB_ACTOR}"
export REGISTRY_PASSWORD="${GITHUB_TOKEN}"
export POM_VERSION="$(mvn help:evaluate -D expression=project.version -q -D forceStdout)"
export MAVEN_ARGS="--quiet --batch-mode"
export CI_PUBLISH="spring-boot.build-image.publish=true"
export IMG_REGISTRY="image.registry=ghcr.io/jaguililla/hexagonal_spring"
./mvnw -D image.registry=ghcr.io/jaguililla/hexagonal_spring -D spring-boot.build-image.publish=true -B deploy
./mvnw -D ${IMG_REGISTRY} -D ${CI_PUBLISH} deploy
git config --global user.name "${GITHUB_ACTOR}"
git tag -m "Release ${POM_VERSION}" "${POM_VERSION}"
Expand Down
8 changes: 5 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ publish:
- export CONTROLLERS_PATH='com/github/jaguililla/appointments/http/controllers'
- export REPOSITORY="${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/maven"
- export ALT_REPOSITORY="altDeploymentRepository=gitlab::default::${REPOSITORY}"
- export IMG_REGISTRY="${CI_REGISTRY}/jaguililla/hexagonal_spring"
- export IMG_REGISTRY="image.registry=${CI_REGISTRY}/jaguililla/hexagonal_spring"
- export POM_VERSION="$(mvn help:evaluate -D expression=project.version -q -D forceStdout)"
- ./mvnw -s ci_settings.xml -D ${ALT_REPOSITORY} -D image.registry=${IMG_REGISTRY} -D spring-boot.build-image.publish=true -B deploy
- export CI_PUBLISH="spring-boot.build-image.publish=true"
- export MAVEN_ARGS="--quiet --batch-mode --settings .mvn/ci_settings.xml"
- ./mvnw -D ${ALT_REPOSITORY} -D ${IMG_REGISTRY} -D ${CI_PUBLISH} deploy
- rm -rf "${CLIENT_PATH}/src/main/java/${CONTROLLERS_PATH}"
- mvn -s ci_settings.xml -f "${CLIENT_PATH}/pom.xml" -B -D ${ALT_REPOSITORY} clean deploy
- mvn -f "${CLIENT_PATH}/pom.xml" -D ${ALT_REPOSITORY} clean deploy
- echo "POM_VERSION=${POM_VERSION}" >> variables.env
artifacts:
reports:
Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

# Contributing
You can contribute code, documentation, or share feedback.

Opinions are welcomed (with proper reasoning), personal preferences (like naming, libraries'
alternatives, etc.) should be posted in the [discussions][Discussions] section.

To share feedback, you can use the following tools:
* [Issues]: to report bugs, or request new features
* [Discussions]: to raise questions about the implementation decisions, propose alternatives, etc.
* [Pull Requests]: to fix problems (i.e.: implementing TODOs or fixing bugs)

[Issues]: https://github.com/jaguililla/hexagonal_spring/issues
[Discussions]: https://github.com/jaguililla/hexagonal_spring/discussions
[Pull Requests]: https://github.com/jaguililla/hexagonal_spring/pulls
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@
> # 🎯 ABOUT
> This is a 'best practices' template project. However, it is an opinionated take on that.
>
> DISCLAIMER: I'm by no means an expert on Spring Boot (it's not even my preferred tool), one reason
> to do this is to learn. Opinions are welcomed (with proper reasoning), personal opinions (like
> naming, libraries, etc.) should be posted in the discussions section.
>
> To share feedback, you can use the following tools:
> * Issues: to report bugs, or request new features
> * Discussions: to raise questions about the implementation decisions, propose alternatives, etc.
> * Pull Requests: to fix problems (i.e.: implementing TODOs or fixing bugs)
> DISCLAIMER: I'm by no means an expert on Spring Boot, one reason to do this is to learn it.
> Opinions are welcomed (with proper reasoning), check the [contributing] section to share your
> thoughts.
>
> The project is mirrored on [GitLab](https://gitlab.com/jaguililla/hexagonal_spring) for CI
> demonstration purposes.
>
> Have fun!
[contributing]: https://github.com/jaguililla/hexagonal_spring/contribute

# 🗓️ Appointments
Application to create appointments (REST API). Appointments are stored in a relational DB
(Postgres), and their creation/deletion is published to a Kafka broker.
Expand Down

0 comments on commit 7c4d6de

Please sign in to comment.