Skip to content

Commit 32d4a14

Browse files
committed
Feature to make analytics call optional
This patch will add a config variale generateStackReport which is by default set to true but if provided false, stack report will not be generated Fixes #74
1 parent b74c5f4 commit 32d4a14

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,15 @@ This is the API where you provide configurations like runtime or something like
179179

180180
If above block is configured in your pipeline then every time the spined pod will have a container named `node` which having the environments for nodejs8. By default pod will be spined with basic utilities like `oc`, `git` etc
181181

182+
183+
**Variables Configured in Pipeline**
184+
185+
| Name | Required | Default Value | Description |
186+
|-----------------------|------------|-----------------|-----------------------------------------------------|
187+
| runtime | false | none | runtime of the application ex java, node, go etc. |
188+
| version | false | none | version of the runtime using |
189+
| generateStackReport | false | true | whether to generate analytics Stack Report |
190+
182191
### ci
183192

184193
This is the block which will be executed for continuous integration flow. By default all branches starting with name `PR-` will go through this execution. You can override by providing a branch name in arguments
@@ -276,8 +285,8 @@ This API can read multiple resources separated by `---` from the yaml file.
276285

277286
| Name | Required | Default Value | Description |
278287
|----------------|------------|------------------------------|------------------------------------------------------------------------|
279-
| file | true | none | An relative path of resource yaml file. |
280-
| validate | false | true | A validation for resource yaml file. |
288+
| file | true | none | An relative path of resource yaml file. |
289+
| validate | false | true | A validation for resource yaml file. |
281290

282291
### build
283292

@@ -332,8 +341,8 @@ or like
332341
|----------------|------------|----------------|------------------------------------------------------------------------------------------------|
333342
| resources | true | null | OpenShift resources at least deploymentConfig, service, route, tag and imageStream resource. |
334343
| env | true | null | environment where you want to deploy - `run` or `stage` |
335-
| approval | false | null | if provided `manual` then user will be asked whether to deploy or not |
336-
| timeout | false | 30 | time (in minutes) to wait for user input if approval is `manual` |
344+
| approval | false | null | if provided `manual` then user will be asked whether to deploy or not |
345+
| timeout | false | 30 | time (in minutes) to wait for user input if approval is `manual` |
337346

338347
The route generated after above step will be added as annotation in the pipeline.
339348

src/io/openshift/Plugins.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import io.openshift.plugins.*
33

44
class Plugins implements Serializable {
55
static def register() {
6-
new analytics().register()
6+
if (config.generateStackReport)
7+
new analytics().register()
78
}
89
}
910

vars/config.groovy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ def version() {
1313
return Globals.config.version
1414
}
1515

16+
def generateStackReport() {
17+
returns Globals.config.generateStackReport ?: true
18+
}
19+
1620
def values() {
1721
return Globals.config
1822
}

0 commit comments

Comments
 (0)