You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository stores reusable `build-test-release` workflow, which is used to build, test and release Splunk add-ons.
@@ -6,7 +40,113 @@ Workflow is used by add-ons created and managed by [addonfactory repository temp
6
40
7
41
Workflow defines jobs which perform security code scanning, execute different types of tests, build add-on package and make a GitHub release.
8
42
9
-
## Development flow
43
+
## TA Developer Git workflow best practices
44
+
45
+
* Always prefer Fast Forward to Merge commit. Preference towards linear history.
46
+
* Never squash merge multiple independent features. i.e. never squash merge develop -> main.
47
+
48
+
### Git Branches
49
+
*`main` - Latest released TA commit. Events:
50
+
*`merge` triggers TA build release (GitHub tag and release artifacts)
51
+
*`develop` - Next version `Work in Progress`. Can be created / removed at will, tracks `main`
52
+
*`merge` triggers TA `Beta` build release (GitHub tag and release artifacts)
53
+
*`release/{VERSION}` - Custom release scenario. **Example:** 2 releases in process, i.e. backport and next patch/minor/major.
54
+
55
+
56
+
### Default flow. Independent work
57
+
```mermaid
58
+
gitGraph
59
+
checkout main
60
+
commit id: "A" tag: "v1.0.0"
61
+
commit id: "B" tag: "v1.1.0"
62
+
63
+
branch develop
64
+
checkout develop
65
+
commit id: "chore: pipeline-update"
66
+
commit id: "feat: feat-C" tag: "v1.2.0-Beta-1"
67
+
68
+
checkout main
69
+
branch feat/my-feat-D
70
+
checkout feat/my-feat-D
71
+
commit id: "feat: feat-D"
72
+
73
+
checkout develop
74
+
merge feat/my-feat-D tag: "v1.2.0-Beta-2"
75
+
76
+
checkout main
77
+
commit id: "docs: docs-update"
78
+
79
+
checkout develop
80
+
merge main
81
+
82
+
checkout main
83
+
merge develop tag: "v1.2.0"
84
+
85
+
```
86
+
87
+
### Default flow. Dependent on develop
88
+
When the feature is justifiably dependent on `develop`, for example: adding UI tests to an existing feature.
89
+
```mermaid
90
+
gitGraph
91
+
checkout main
92
+
commit id: "A" tag: "v1.0.0"
93
+
commit id: "B" tag: "v1.1.0"
94
+
95
+
branch develop
96
+
checkout develop
97
+
commit id: "chore: pipeline-update"
98
+
commit id: "feat: feat-C" tag: "v1.2.0-Beta-1"
99
+
100
+
branch test/my-feat-C-ui-tests
101
+
checkout test/my-feat-C-ui-tests
102
+
commit id: "test: my-feat-C-ui-tests"
103
+
104
+
checkout develop
105
+
merge test/my-feat-C-ui-tests
106
+
107
+
checkout main
108
+
commit id: "docs: docs-update"
109
+
commit id: "fix: important fix" tag: "v1.1.1"
110
+
111
+
checkout develop
112
+
merge main
113
+
114
+
checkout main
115
+
merge develop tag: "v1.2.0"
116
+
```
117
+
118
+
### Backporting to old releases
119
+
Bugfix needing a backport patch release `1.1.1` and releasing next `2.1.0`. For example there is a business reason to provide support for `1.1.0`
120
+
```mermaid
121
+
122
+
gitGraph
123
+
checkout main
124
+
commit id: "A" tag: "v1.1.0"
125
+
branch release/v1.1.1 order: 4
126
+
checkout main
127
+
commit id: "B" tag: "v2.0.0"
128
+
branch develop
129
+
130
+
checkout develop
131
+
132
+
133
+
checkout main
134
+
branch fix/important-fix
135
+
checkout fix/important-fix
136
+
commit id: "fix: important fix"
137
+
138
+
checkout develop
139
+
merge fix/important-fix tag: "v2.1.0-Beta-1"
140
+
141
+
checkout main
142
+
merge develop tag: "v2.1.0"
143
+
144
+
checkout release/v1.1.1
145
+
cherry-pick id: "fix: important fix" tag: "v1.1.1"
146
+
```
147
+
148
+
149
+
## [Internal] Development flow
10
150
11
151
* All the changes should first go to the `develop` branch (using "squash commit"), `main` branch should contain stable code
12
152
* Official releases are made from `main` branch (when it's time to rollout new template changes):
@@ -26,9 +166,8 @@ Workflow defines jobs which perform security code scanning, execute different ty
26
166
* backport the change back to the `develop` branch
27
167
* new version of the workflow is going to be released (v4.17.0 (before) -> v4.17.1 (after)) and it will automatically applied to all the repositories
28
168
29
-
# Workflow jobs
30
-
31
-
## Inputs
169
+
# Spec reusable-build-test-release
170
+
## Workflow Inputs
32
171
* marker - list of markers used to paralelize modinput tests
33
172
* ucc-modinput-marker - list of markers used to paralelize ucc modinput tests
34
173
* ui_marker - list of markers used to paralelize ui tests
@@ -44,7 +183,7 @@ Workflow defines jobs which perform security code scanning, execute different ty
44
183
* Check if there is any similar issue reported to GitHub repo for the action by other users.
45
184
* If you are not sure what to do, please use `go/addon/help`.
46
185
47
-
## setup-workflow
186
+
## [Job]setup-workflow
48
187
49
188
Job that is scanning PR and based on PR body or included labels defining tests to be executed.
50
189
@@ -61,15 +200,13 @@ Job that is scanning PR and based on PR body or included labels defining tests t
61
200
* add to PR one or multiple labels, available choices can be found [here](https://github.com/splunk/addonfactory-workflow-addon-release/blob/4f3fa4d779b6ec7649f0dc6b973eb4d68e5fcc48/.github/workflows/reusable-build-test-release.yml#L153)
62
201
* there is no need to add labels when PR's target branch is `main`
63
202
64
-
meta stage
65
-
=======================
203
+
## [Job] meta
66
204
67
205
**Description:**
68
206
69
207
- Determines which Splunk and SC4S versions to run tests with.
- This stage only executes for main and develop branch.
650
777
@@ -677,8 +804,7 @@ source_code.zip
677
804
source_code.tar.gz
678
805
```
679
806
680
-
Vendor Addon Matrix tests
681
-
=========================
807
+
## Vendor Addon Matrix tests
682
808
683
809
- For addons like Tomcat, JMX, Nginx where multiple versions are supported for the Vendor platform currently only a single version of Vendor platform was configured while testing which is now parameterised to support test execution against different version of vendor platforms in Github Actions.
0 commit comments