diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 0000000..8a09817 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,25 @@ +--- +name: Bug +about: Software defect. +labels: [ bug ] +--- + +**REPLACE WITH BUG DETAILS** (Check below for guidelines) + +--- + +Describe the steps and expected results: + +``` +Given *a condition* +And *another condition* +When *an action is taken* +And *other after the first* +Then *something happened* +And I expected *this other thing* +``` + +If it is possible, please include: +* The code that produced the error (or a link to it) +* Stack trace of the error and/or logs if available +* Details on the environment the fail happened (i.e.: the OS) diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md new file mode 100644 index 0000000..a8dc3b8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -0,0 +1,21 @@ +--- +name: Enhancement +about: New feature or improvement. +labels: [ enhancement ] +--- + +**REPLACE WITH ENHANCEMENT DETAILS** (Check below for guidelines) + +--- + +Detailed description. + +Reason for the change or new development. + +Acceptance criteria to verify the development. A list of requirements with the following format: + +`When *action* then *result*` + +For example: + +`When this is done then that other thing should happen` diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..f177803 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ + +**REPLACE WITH PR DESCRIPTION** (It is also editable after PR creation) + +--- + +For the Pull Request to be accepted please check: + +- [ ] The PR has a meaningful title. +- [ ] If the PR refers to an issue, it should be referenced with the GitHub format (*#ID*). +- [ ] The PR is done to the `develop` branch (new features) or the `master` branch (releases). +- [ ] The code pass all PR checks. +- [ ] All public members are documented. +- [ ] The code follow the coding conventions stated at the [contributing.md] file. + +[contributing.md]: https://github.com/jaguililla/hexagonal_spring/blob/main/CONTRIBUTING.md diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f628487..06f9bd2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,8 +18,7 @@ build: stage: build image: ubuntu:24.04 rules: - - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH - - if: $CI_PIPELINE_SOURCE == "push" + - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" cache: key: build-cache paths: @@ -37,8 +36,7 @@ publish: stage: release image: maven:3 rules: - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - - if: $CI_PIPELINE_SOURCE == "push" + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push" before_script: - apt update - apt -y install curl zip unzip @@ -55,7 +53,7 @@ publish: - export IMG_REGISTRY="image.registry=${CI_REGISTRY}/jaguililla/hexagonal_spring" - export POM_VERSION="$(mvn help:evaluate -D expression=project.version -q -D forceStdout)" - export CI_PUBLISH="spring-boot.build-image.publish=true" - - export MAVEN_ARGS="--quiet --batch-mode --settings .mvn/ci_settings.xml" + - export MAVEN_ARGS="--quiet --batch-mode --settings .gitlab/ci_settings.xml" - ./mvnw -D ${ALT_REPOSITORY} -D ${IMG_REGISTRY} -D ${CI_PUBLISH} deploy - rm -rf "${CLIENT_PATH}/src/main/java/${CONTROLLERS_PATH}" - mvn -f "${CLIENT_PATH}/pom.xml" -D ${ALT_REPOSITORY} clean deploy diff --git a/.mvn/ci_settings.xml b/.gitlab/ci_settings.xml similarity index 100% rename from .mvn/ci_settings.xml rename to .gitlab/ci_settings.xml diff --git a/.gitlab/issue_templates/bug.md b/.gitlab/issue_templates/bug.md new file mode 100644 index 0000000..8a09817 --- /dev/null +++ b/.gitlab/issue_templates/bug.md @@ -0,0 +1,25 @@ +--- +name: Bug +about: Software defect. +labels: [ bug ] +--- + +**REPLACE WITH BUG DETAILS** (Check below for guidelines) + +--- + +Describe the steps and expected results: + +``` +Given *a condition* +And *another condition* +When *an action is taken* +And *other after the first* +Then *something happened* +And I expected *this other thing* +``` + +If it is possible, please include: +* The code that produced the error (or a link to it) +* Stack trace of the error and/or logs if available +* Details on the environment the fail happened (i.e.: the OS) diff --git a/.gitlab/issue_templates/enhancement.md b/.gitlab/issue_templates/enhancement.md new file mode 100644 index 0000000..a8dc3b8 --- /dev/null +++ b/.gitlab/issue_templates/enhancement.md @@ -0,0 +1,21 @@ +--- +name: Enhancement +about: New feature or improvement. +labels: [ enhancement ] +--- + +**REPLACE WITH ENHANCEMENT DETAILS** (Check below for guidelines) + +--- + +Detailed description. + +Reason for the change or new development. + +Acceptance criteria to verify the development. A list of requirements with the following format: + +`When *action* then *result*` + +For example: + +`When this is done then that other thing should happen` diff --git a/.gitlab/merge_request_templates/mr.md b/.gitlab/merge_request_templates/mr.md new file mode 100644 index 0000000..f177803 --- /dev/null +++ b/.gitlab/merge_request_templates/mr.md @@ -0,0 +1,15 @@ + +**REPLACE WITH PR DESCRIPTION** (It is also editable after PR creation) + +--- + +For the Pull Request to be accepted please check: + +- [ ] The PR has a meaningful title. +- [ ] If the PR refers to an issue, it should be referenced with the GitHub format (*#ID*). +- [ ] The PR is done to the `develop` branch (new features) or the `master` branch (releases). +- [ ] The code pass all PR checks. +- [ ] All public members are documented. +- [ ] The code follow the coding conventions stated at the [contributing.md] file. + +[contributing.md]: https://github.com/jaguililla/hexagonal_spring/blob/main/CONTRIBUTING.md diff --git a/.mvn/parent.xml b/.mvn/parent.xml index 4368c91..73712c1 100644 --- a/.mvn/parent.xml +++ b/.mvn/parent.xml @@ -299,5 +299,50 @@ + + + checkstyle + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.5.0 + + UTF-8 + true + false + + + + validate + validate + + check + + + + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.5.0 + + + + checkstyle + + + + + + + diff --git a/doc/commit_template.txt b/doc/commit_template.txt new file mode 100644 index 0000000..c09792e --- /dev/null +++ b/doc/commit_template.txt @@ -0,0 +1,7 @@ + + +# Summary in imperative mood [#TaskId] [:Tag] [!!!] +# +# [Details. Used to explain what and why vs. how] +# +# https://github.com/jaguililla/hexagonal_spring/blob/main/doc/commits.md diff --git a/doc/commits.md b/doc/commits.md new file mode 100644 index 0000000..719c574 --- /dev/null +++ b/doc/commits.md @@ -0,0 +1,14 @@ + +``` +Summary in imperative mood [#TaskId] [:Tag] [!!!] + +[Details. Used to explain what and why vs. how] +``` + +1. Capitalize summary line +2. Do not end summary line with a period +3. Elements among square brackets are optional +4. You can set multiple tags. I.e.: :doc :test +5. Tags are case-insensitive +6. Tags can be placed anywhere (even title start) +7. Summary with '!!!' means breaking changes