Skip to content

Commit

Permalink
Initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
robertcsakany committed Oct 9, 2023
1 parent 8c3af2b commit c254a06
Show file tree
Hide file tree
Showing 34 changed files with 2,294 additions and 0 deletions.
269 changes: 269 additions & 0 deletions .github/CIFLOW.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
= Development version and branch handling
:toc:
:icons: font

== Branches

Versioning policy of JUDO NG modules are based on GitFlow: https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow.

Branches:

* **develop**: development branch contains latest development sources of the last active version
* **feature/JNG-NUMBER_short_summary**: feature branches are based on **develop** and contains sources of new features that will be included in last active version
* **(release/)1_0_beta1**: release branches of 1.0-beta1 (release/ prefix is still reserved for CI)
* **bugfix/JNG-NUMBER_short_summary**, **support/JNG-NUMBER_short_summary**: bugfix and support branches are based on release branches and must be applied to release and development branches of newer versions too
* **master**: contains latest released sources of the last active version

ifdef::env-github[image::branches.png[title="branches.yml"]]
ifndef::env-github[]
[[branches]]
.branches.yml
[plantuml, branches, alt="branches.yml"]
---------------------------------------------------------------------
digraph GitFlow {
rankdir="LR";
bgcolor="transparent";
node[width=0.15, height=0.15, shape=point];
edge[weight=2, arrowhead=vee];
0[shape=box, style=filled, label="master", color=chartreuse]
1[shape=box, style=filled, label="develop", color=cornflowerblue]
2[shape=box, style=filled, label="feature/JNG-1", color=gold]
4[shape=box, style=filled, label="feature/JNG-2", color=gold]
12[shape=box, style=filled, label="feature/JNG-3", color=gold]
14[shape=box, style=filled, label="(release/)1.0-beta1", color=cyan]
17[shape=box, style=filled, label="bugfix/JNG-4", color=firebrick1]
19[shape=box, style=filled, label="release/1.0-beta2", color=cyan]
23[shape=box, style=filled, label="support/JNG-5", color=aquamarine]
26[shape=box, style=filled, label="hotfix/JNG-6", color=firebrick2]
27[shape=box, style=filled, label="release/1.1-beta1", color=cyan]
node[group=develop, color=cornflowerblue];
0 -> 1 -> 7 -> 8 -> 9 -> 10 -> 11 -> 30 -> 31;
node[group=feature_JNG_1, color=gold];
1 -> 4 -> 5 -> 6 -> 8;
node[group=feature_JNG_2, color=gold];
1 -> 2 -> 3 -> 7;
node[group=feature_JNG_3, color=gold];
8 -> 12 -> 13 -> 9;
node[group=release_1_0_beta1, color=cyan];
8 -> 14 -> 15 -> 16 -> 10;
node[group=bugfix_JNG_4, color=firebrick1];
14 -> 17 -> 18 -> 16;
node[group=release_1_0_beta2, color=cyan];
9 -> 19 -> 20 -> 21 -> 33;
16 -> 21;
26 -> 33;
node[group=support_JNG_5, color=aquamarine];
19 -> 23 -> 24 -> 20;
node[group=master, color=chartreuse];
0 -> 22 -> 25 -> 32;
21 -> 22;
21 -> 11;
node[group=hotfix_JNG_6, color=firebrick2];
22 -> 26 -> 25;
26 -> 30;
node[group=release_1_1_beta1, color=cyan];
11 -> 27 -> 28 -> 29 -> 31;
26 -> 28;
29 -> 32;
}
---------------------------------------------------------------------
endif::[]

== Version numbers

Version numbers are increased using semantic versioning:

* do not change version numbers on starting feature/ branches
* 2nd number in version of *develop* branch is increased when a release branch started
* do not change version numbers on bugfix/ branches - that are applied on release branches during testing before releasing it (merging to master)
* 3rd number in version of support/ branches is increased when started - it is used to support a previous release including new (minor) changes; support/ branches are merged back to release branch when update is released (without merging changes to master)
* 4th number in version of hotfix/ branches is increased when started (that are applied on both release and master branches)

=== Gihub action flows

ifdef::env-github[image::build.png[title="build.yml"]]
ifndef::env-github[]
[[build]]
.build.yml
[plantuml, build, alt="build.yml"]
---------------------------------------------------------------------
@startuml
partition build.yml {
skinparam shadowing false
skinparam ActivityBackgroundColor WhiteSmoke
skinparam ActivityBorderColor Black
skinparam ActivityBorderThickness 1
skinparam ArrowColor Black
skinparam ActivityDiamondBackgroundColor WhiteSmoke
skinparam ActivityDiamondBorderColor Black
#business:**when**\npush on **__develop__** branch\nor\npull request on **__develop__**, **__master__**, **__increment/*__**, **__release/*__** __branch__;
if (Commit or Pull request's base branch?) then (master, release/*)
:set **__version__**\nfrom project **pom.xml** (version without '-SNAPSHOT');
else (develop, increment/*)
:set __version__ **major.minor.qualifier.date_commitId_branchName**\nfrom project **pom.xml** (version without '-SNAPSHOT');
endif
:build and deploy to nexus;
:create git __tag__ **v__<version>__**;
if (Pull request or commit base branch?) then (increment/*, release/*)
:create __tag__ **merge-pr/__<version>__**;
fork
#palegreen:**trigger merge-pr-tagged.yml**;
end
fork again
end fork
endif
if (Pull request's or commit base branch?) then (develop)
:build change log;
:create **github release** (prerelease) with change log;
endif
end
}
@enduml
---------------------------------------------------------------------
endif::[]


ifdef::env-github[image::merge-pr-tagged.png[title="merge-pr-tagged.yml"]]
ifndef::env-github[]
[[merge-pr-tagged]]
.merge-pr-tagged.yml
[plantuml, merge-pr-tagged, alt="merge-pr-tagged.yml"]
---------------------------------------------------------------------
@startuml
partition merge-pr-tagged.yml {
skinparam shadowing false
skinparam ActivityBackgroundColor WhiteSmoke
skinparam ActivityBorderColor Black
skinparam ActivityBorderThickness 1
skinparam ArrowColor Black
skinparam ActivityDiamondBackgroundColor WhiteSmoke
skinparam ActivityDiamondBorderColor Black
#business:**when**\npush on **__merge-pr/*__** tag;
:get __<version>__ from tag name;
if (check __<version>__ format) then (major.minor.qualifier)
:merge pull request to __master__;
fork
#palegreen:**trigger create-release-on-master.yml**;
end
fork again
end fork
else
:squash pull request to __develop__;
fork
#palegreen:**trigger build.yml**;
end
fork again
end fork
endif
:delete __tag__ **merge-pr/__<version>__**;
end
}
@enduml
---------------------------------------------------------------------
endif::[]

ifdef::env-github[image::create-release-on-master.png[title="create-release-on-master.yml"]]
ifndef::env-github[]
[[create-release-on-master]]
.create-release-on-master.yml
[plantuml, create-release-on-master, alt="create-release-on-master.yml"]
---------------------------------------------------------------------
@startuml
partition create-release-on-master.yml {
skinparam shadowing false
skinparam ActivityBackgroundColor WhiteSmoke
skinparam ActivityBorderColor Black
skinparam ActivityBorderThickness 1
skinparam ArrowColor Black
skinparam ActivityDiamondBackgroundColor WhiteSmoke
skinparam ActivityDiamondBorderColor Black
#business:**when**\npush on **__master__** __branch__;
:get __<version>__ from __tag__ name;
:build change log;
:create **github release** (last) with change log;
end
}
@enduml
---------------------------------------------------------------------
endif::[]


ifdef::env-github[image::release.png[title="release.yml"]]
ifndef::env-github[]
[[release]]
.release.yml
[plantuml, release, alt="release.yml"]
---------------------------------------------------------------------
@startuml
partition release.yml {
skinparam shadowing false
skinparam ActivityBackgroundColor WhiteSmoke
skinparam ActivityBorderColor Black
skinparam ActivityBorderThickness 1
skinparam ArrowColor Black
skinparam ActivityDiamondBackgroundColor WhiteSmoke
skinparam ActivityDiamondBorderColor Black
#business:**when**\nmanually triggred with **__given version__**\nwhich is **'auto'** or any other in **major.minor.qualifier** form;
if (__given version__ is) then ('auto')
:set **__release version__**\nfrom project **pom.xml** (version without '-SNAPSHOT');
else
:set **__release version__** to given **version**;
endif
:set **__next version__** to **__release version__**'s qualifier + 1;
:create pull request on **__master__** with **__release version__**;
fork
#palegreen:**trigger build.yml**;
end
fork again
end fork
:create pull request on **__develop__** with **__next version__**;
fork
#palegreen:**trigger build.yml**;
end
fork again
end fork
end
}
@enduml
---------------------------------------------------------------------
endif::[]


== How to develop

For issue tracking we are using https://blackbelt.atlassian.net/jira/dashboards[JIRA]. Golden rule:

IMPORTANT: *There is no commit without ticket number*

So for pull request or commit `JNG-xxx` have to be presented in the commit.
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: "🐞 Bug Report"
about: Report a bug
labels: "type: bug"
---

<!-- Please do your best to fill out all of the sections below! -->

## Bug Scope

<!-- JUDO Community modules are physically maintained in their dedicated repositories. Before submitting a bug, if the actual scope of the bug is well known, please open a bug ticket in the corresponding repository/repositories! Otherwise you can provide "unknown" here -->

## Current Behavior

<!-- What is the behavior that currently you experience? -->

## Expected Behavior

<!-- What is the behavior that you expect to happen? -->
<!-- Is this a regression? .i.e Did this used to be the behavior at one point? -->

## Steps to Reproduce

<!-- Help us help you by making it easy for us to reproduce your issue! -->

<!-- If possible please provide a minimal Github repo of your own -->
<!-- At the very least, provide as much detail as possible to help us reproduce the issue -->

<!-- Remove this line -->

This issue may not be prioritized if details are not provided to help us reproduce the issue.

### Failure Logs / Configuration

<!-- Please include any relevant log snippets or files here. -->

```txt
<!-- If you have any relevant log available, please paste it here -->
<!-- Otherwise, feel free to delete this <details> block -->
```

### Environment

<!-- It's important for us to know the context in which you experience this behavior! -->
<!-- Please paste the result of running `java -version` and `mvn -version` in your repo below! -->
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: "\U0001F680 Feature Request"
about: Suggest a new feature.
labels: "type: feature"
---

<!-- Please do your best to fill out all of the sections below! -->
<!-- Use this issue type for concrete suggestions, otherwise, open a discussion type issue instead. -->

- [ ] I'd be willing to implement this feature ([contributing guide](https://github.com/BlackBeltTechnology/judo-psm-generator-jackson/blob/develop/CONTRIBUTING.adoc))

## Description

<!-- What is the behavior that you would like to see introduced? -->

## Motivation

<!-- Why do you believe this behavior would be beneficial? -->

## Suggested Implementation

<!-- How do you imagine this might work? -->

## Alternate Implementations

<!-- How else do you imagine this might work? -->
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/3-documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "📖 Documentation issue"
about: Help improve our docs.
labels: "type: docs"
---

### Documentation issue

<!-- (Update "[ ]" to "[x]" to check a box) -->

- [ ] Reporting a typo
- [ ] Reporting a documentation bug
- [ ] Documentation improvement
- [ ] Documentation feedback

<!--
If your issue is not regarding the documentation, please choose an issue type:
https://github.com/BlackBeltTechnology/judo-psm-generator-jackson/issues/new/choose
-->

### Is there a specific documentation page you are reporting?

Enter the URL or documentation section here.

### Additional context or description

Provide any additional details here as needed.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Read the community guidelines
about: "Please make sure you have read the submission guidelines before posting an issue"
url: https://github.com/BlackBeltTechnology/judo-psm-generator-jackson/blob/develop/CONTRIBUTING.adoc#-submitting-an-issue
- name: Want to start a discussion?
about: "Want to start a thread to discuss an idea? Use the discussions feature provided by GitHub."
url: https://github.com/BlackBeltTechnology/judo-community/discussions
- name: Have a question?
url: https://discord.gg/RcyHnBndNU
about: "The Community Discord is a great place for questions to be asked and answered."
Binary file added .github/branches.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/build.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/create-release-on-master.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/create-release-tagged.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: com.google.guava:guava
- dependency-name: org.slf4j:slf4j-api
- dependency-name: org.jruby:jruby-complete
Loading

0 comments on commit c254a06

Please sign in to comment.