github.com/jaylevin/jenkins-library@v1.230.4/documentation/docs/steps/commonPipelineEnvironment.md (about) 1 # commonPipelineEnvironment 2 3 ## Description 4 5 Provides project specific settings. 6 7 ## Prerequisites 8 9 none 10 11 ## Method details 12 13 ### getInfluxCustomData() 14 15 #### Description 16 17 Returns the Influx custom data which can be collected during pipeline run. 18 19 #### Parameters 20 21 none 22 23 #### Return value 24 25 A `Map` containing the data collected. 26 27 #### Side effects 28 29 none 30 31 #### Exceptions 32 33 none 34 35 #### Example 36 37 ```groovy 38 def myInfluxData = commonPipelineEnvironment.getInfluxCustomData() 39 ``` 40 41 ### getInfluxCustomDataMap() 42 43 #### Description 44 45 Returns the Influx custom data map which can be collected during pipeline run. 46 It is used for example by step [`influxWriteData`](../steps/influxWriteData.md). 47 The data map is a map of maps, like `[pipeline_data: [:], my_measurement: [:]]` 48 Each map inside the map represents a dedicated measurement in the InfluxDB. 49 50 #### Parameters 51 52 none 53 54 #### Return value 55 56 A `Map` containing a `Map`s with data collected. 57 58 #### Side effects 59 60 none 61 62 #### Exceptions 63 64 none 65 66 #### Example 67 68 ```groovy 69 def myInfluxDataMap = commonPipelineEnvironment.getInfluxCustomDataMap() 70 ``` 71 72 ### getPipelineMeasurement(measurementName) 73 74 #### Description 75 76 Returns the value of a specific pipeline measurement. 77 The measurements are collected with step [`durationMeasure`](../steps/durationMeasure.md) 78 79 #### Parameters 80 81 Name of the measurement 82 83 #### Return value 84 85 Value of the measurement 86 87 #### Side effects 88 89 none 90 91 #### Exceptions 92 93 none 94 95 #### Example 96 97 ```groovy 98 def myMeasurementValue = commonPipelineEnvironment.getPipelineMeasurement('build_stage_duration') 99 ``` 100 101 ### setPipelineMeasurement(measurementName, value) 102 103 #### Description 104 105 **This is an internal function!** 106 Sets the value of a specific pipeline measurement. 107 Please use the step [`durationMeasure`](../steps/durationMeasure.md) in a pipeline, instead. 108 109 #### Parameters 110 111 Name of the measurement and its value. 112 113 #### Return value 114 115 none 116 117 #### Side effects 118 119 none 120 121 #### Exceptions 122 123 none 124 125 #### Example 126 127 ```groovy 128 commonPipelineEnvironment.setPipelineMeasurement('build_stage_duration', 2345) 129 ```