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

add doc about wrappers and branching model #2003

Merged
merged 3 commits into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions BRANCHING-MODEL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Introduction
This section describes
- how branches are handled
- defectdojo release cycle

Please be careful to submit your pull requests to the correct branch:
- bugfix: latest release branch
- evolutions: dev branch

If in doubt please use dev branch.

# Release and hotfix model
![Schemas](doc/branching_model.png)
## Releasing
- Start an x.y.0 release branch off dev branch
- Commit only bug fixes onto this branch (and merge those fixes back to dev)
- Dev branch keeps living with further evolutions
- Every 4-8 weeks, merge the release branch to master and tag: this is when the new release is out: x.(y+1).z

# Issuing a hotfix
- In case of major issue found after releasing, issue a hotfix branch (first is x.y.1) which is merged to master, dev, and the next release branch


(Schemes created with https://www.planttext.com/)

(This model is inspired by https://nvie.com/posts/a-successful-git-branching-model/ but without feature branches.)
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For detailed documentation you can visit

## Supported Installation Options
* [Kubernetes](KUBERNETES.md)
* [Setup.bash](https://github.com/DefectDojo/django-DefectDojo/blob/dev/setup/README.MD)
* [Setup.bash](https://github.com/DefectDojo/django-DefectDojo/blob/dev/setup/README.md)
* [Docker](DOCKER.md)

## Getting Started
Expand All @@ -56,13 +56,15 @@ We've also created some example
[workflows](https://defectdojo.readthedocs.io/en/latest/workflows.html) that
should give you an idea of how to use DefectDojo for your own team.

## Client APIs
## Client APIs and wrappers
This section presents different ways to programmatically interact with defectdojo APIs.

See [Wrappers](WRAPPERS.md)


## Release and branch model
See [Release and branch model](BRANCHING-MODEL.md)

* Install the DefectDojo Python API via `pip install defectdojo_api` or clone
the [repository](https://github.com/aaronweaver/defectdojo_api).
* Browse the API on
[SwaggerHub](https://app.swaggerhub.com/apis/DefectDojo/defect-dojo_api_v_2/1.0.0).
[![Swagger Status](http://online.swagger.io/validator?url=https://api.swaggerhub.com/apis/DefectDojo/defect-dojo_api_v_2/1.0.0)](https://app.swaggerhub.com/apis/DefectDojo/defect-dojo_api_v_2/1.0.0)

## Getting Involved

Expand Down
23 changes: 23 additions & 0 deletions WRAPPERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
| Wrapper | APIV1 | APIV2 | Notes |
| ----------------------------| -------| ---- | ------------------------|
| Specific python wrapper | Yes | Yes | Python 2 only |
| Openapi python wrapper | No | Yes | |
| Bash wrapper | No | Yes | |
| Java wrapper | No | Yes | |

### Specific python wrapper
* Install the DefectDojo Python API via `pip install defectdojo_api` or clone
the [repository](https://github.com/DefectDojo/defectdojo_api).
* Browse the API on
[SwaggerHub](https://app.swaggerhub.com/apis/DefectDojo/defect-dojo_api_v_2/1.0.0).
[![Swagger Status](http://online.swagger.io/validator?url=https://api.swaggerhub.com/apis/DefectDojo/defect-dojo_api_v_2/1.0.0)](https://app.swaggerhub.com/apis/DefectDojo/defect-dojo_api_v_2/1.0.0)

### Openapi python wrapper
https://github.com/alles-klar/defectdojo-api-v2-client

### Bash wrapper
https://github.com/wurstbrot/defectdojo-client

### Java wrapper

https://github.com/DefectDojo/defectdojo-java-client
63 changes: 63 additions & 0 deletions doc/branching_model.plantuml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
@startuml
!pragma teoz true

== Release ==
participant "Dev branch" as devbranch order 10 #LightBlue
participant "RC branch" as rcbranch order 20 #YellowGreen
participant "Master branch" as master order 30 #99FF99
participant "Hotfix branch" as hotbranch order 40 #DarkSalmon

{startrc} devbranch -> rcbranch ++ #YellowGreen: Start release x.y.0


note left of devbranch
Evolutions
end note


rcbranch --> devbranch: Merge back bug fixes
rcbranch --> devbranch: Merge back more bug fixes


note right of rcbranch
Bug fixes
end note


rcbranch -> master: Merge
note right of master
Official release
- Tag "rx.y.0"
- Deploy to DockerHub
end note

{endrc} rcbranch --> devbranch --: Release done

devbranch -> rcbranch: Start release x.(y+1).0
note left of devbranch
(increase x if case of
major breaking change)
end note


... ...
{startrc} <-> {endrc}: 4-8 weeks

== Hotfix ==

master -> hotbranch ++ #DarkSalmon: Create short-lived fix branch x.y.1

note right of hotbranch
Severe bug
to be corrected
end note
hotbranch -> master: Merge
note right of master
Official release
- Tag "rx.y.1"
- Deploy to DockerHub
end note
hotbranch -> rcbranch: Merge
hotbranch -> devbranch --: Merge

@enduml
Binary file added doc/branching_model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.