Skip to content

Commit

Permalink
OCD-3387 - BE | CI Analysis | Implementation | OpenApi (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
lionelresnik authored Sep 5, 2023
1 parent dd6682a commit 4faedfb
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 10 deletions.
16 changes: 16 additions & 0 deletions api/services/ocean/cd/schemas/oceanCDVerificationParameters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
type: object
title: Ocean CD Verification argument
description: >
Represents Verification Parameters to inject to verification templates when running
properties:
key:
type: string
description: Key of an argument
example: app
value:
type: string
description: Value of an argument
example: my-application
required:
- key
- value
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ properties:
$ref: "oceanCDVerificationProviderNewRelic.yaml"
cloudWatch:
type: object
$ref: "oceanCDVerificationProviderCloudWatch.yaml"
$ref: "oceanCDVerificationProviderCloudWatch.yaml"
jenkins:
type: object
$ref: "oceanCDVerificationProviderJenkins.yaml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
type: object
required:
- baseUrl
- username
- apiToken
title: Ocean CD Verification Provider Jenkins
properties:
baseUrl:
type: string
description: The address of the Jenkins server within the cluster.
example: http://localhost:9090
username:
type: string
description: The Jenkins server’s access username.
example: admin
apiToken:
type: string
description: The Jenkins server’s access apiToken.
example: AbCDeeFFGG
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ properties:
$ref: "oceanCDVerificationProviderNewRelic.yaml"
cloudWatch:
type: object
$ref: "oceanCDVerificationProviderCloudWatch.yaml"
$ref: "oceanCDVerificationProviderCloudWatch.yaml"
jenkins:
type: object
$ref: "oceanCDVerificationProviderJenkins.yaml"
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ properties:
$ref: "oceanCDVerificationProviderNewRelic.yaml"
cloudWatch:
type: object
$ref: "oceanCDVerificationProviderCloudWatch.yaml"
$ref: "oceanCDVerificationProviderCloudWatch.yaml"
jenkins:
type: object
$ref: "oceanCDVerificationProviderJenkins.yaml"
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@ properties:
interval:
type: string
example: 5m
description: Defines an interval string (30s, 5m, 1h) between each verification measurements. If omitted, will perform a single measurement
description: Defines an interval string (30s, 5m, 1h) between each verification measurements. If omitted, will perform a single measurement. When choosing `Jenkins` as the provider, there is no need to send this variable.
initialDelay:
type: string
description: How long to wait before starting this metric measurements
description: How long to wait before starting this metric measurements. When choosing `Jenkins` as the provider, there is no need to send this variable.
example: 1m
count:
type: integer
description: The number of times to run the measurement. If both interval and count are omitted, the effective count is 1. If only interval is specified, metric runs indefinitely. If count > 1, interval must be specified
description: The number of times to run the measurement. If both interval and count are omitted, the effective count is 1. If only interval is specified, metric runs indefinitely. If count > 1, interval must be specified. When choosing `Jenkins` as the provider, there is no need to send this variable.
example: 10
successCondition:
type: string
description: An expression which determines if a measurement is considered successful. The keyword `result` is a variable reference to the value of measurement. Results can be both structured data or primitive. If successCondition is set, then failureCondition is not allowed
description: An expression which determines if a measurement is considered successful. The keyword `result` is a variable reference to the value of measurement. Results can be both structured data or primitive. If successCondition is set, then failureCondition is not allowed. When choosing `Jenkins` as the provider, there is no need to send this variable.
example: "result[0] <= 0.95"
failureCondition:
type: string
description: An expression which determines if a measurement is considered failed. If failureCondition is set, then successCondition is not allowed
description: An expression which determines if a measurement is considered failed. If failureCondition is set, then successCondition is not allowed. When choosing `Jenkins` as the provider, there is no need to send this variable.
example: "result[0] >= 1.2"
failureLimit:
type: integer
example: 2
description: The maximum number of times the measurement is allowed to fail, before the entire metric is considered failed. Default is 0
description: The maximum number of times the measurement is allowed to fail, before the entire metric is considered failed. Default is 0. When choosing `Jenkins` as the provider, there is no need to send this variable.
consecutiveErrorLimit:
type: integer
example: 4
description: The maximum number of times the measurement is allowed to error in succession, before the metric is considered error. Default is 4
description: The maximum number of times the measurement is allowed to error in succession, before the metric is considered error. Default is 4. When choosing `Jenkins` as the provider, there is no need to send this variable.
provider:
type: object
$ref: "oceanCDVerificationTemplateMetricProvider.yaml"
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
type: object
required:
- pipelineName
- timeout
- interval
title: Ocean CD Verification Jenkins Metric
properties:
pipelineName:
type: string
description: The Jenkins pipeline name
example: pipelineName
tlsVerification:
type: boolean
example: true
description: Host TLS verification
timeout:
type: string
description: The total jenkins timeout
example: 120s/2m
interval:
type: string
description: The interval time to poll status
example: 5s
parameters:
type: array
description: List of parameters
items:
$ref: "../oceanCDVerificationParameters.yaml"
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ properties:
job:
type: object
$ref: "oceanCDVerificationTemplateMetricJob.yaml"
jenkins:
type: object
$ref: "oceanCDVerificationTemplateMetricJenkins.yaml"

0 comments on commit 4faedfb

Please sign in to comment.