Skip to content

Commit

Permalink
Feature to make analytics call optional
Browse files Browse the repository at this point in the history
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
  • Loading branch information
piyush-garg committed Jan 24, 2019
1 parent b74c5f4 commit 32d4a14
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@ This is the API where you provide configurations like runtime or something like

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


**Variables Configured in Pipeline**

| Name | Required | Default Value | Description |
|-----------------------|------------|-----------------|-----------------------------------------------------|
| runtime | false | none | runtime of the application ex java, node, go etc. |
| version | false | none | version of the runtime using |
| generateStackReport | false | true | whether to generate analytics Stack Report |

### ci

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
Expand Down Expand Up @@ -276,8 +285,8 @@ This API can read multiple resources separated by `---` from the yaml file.

| Name | Required | Default Value | Description |
|----------------|------------|------------------------------|------------------------------------------------------------------------|
| file | true | none | An relative path of resource yaml file. |
| validate | false | true | A validation for resource yaml file. |
| file | true | none | An relative path of resource yaml file. |
| validate | false | true | A validation for resource yaml file. |

### build

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

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

Expand Down
3 changes: 2 additions & 1 deletion src/io/openshift/Plugins.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import io.openshift.plugins.*

class Plugins implements Serializable {
static def register() {
new analytics().register()
if (config.generateStackReport)
new analytics().register()
}
}

4 changes: 4 additions & 0 deletions vars/config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ def version() {
return Globals.config.version
}

def generateStackReport() {
returns Globals.config.generateStackReport ?: true
}

def values() {
return Globals.config
}

0 comments on commit 32d4a14

Please sign in to comment.