Skip to content

Commit 3c23205

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 0bbc13ae of spec repo
1 parent 2945616 commit 3c23205

File tree

7 files changed

+80
-5
lines changed

7 files changed

+80
-5
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-01-17 21:41:16.067400",
8-
"spec_repo_commit": "27e609f7"
7+
"regenerated": "2025-01-21 14:16:34.852439",
8+
"spec_repo_commit": "0bbc13ae"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-17 21:41:16.082979",
13-
"spec_repo_commit": "27e609f7"
12+
"regenerated": "2025-01-21 14:16:34.867463",
13+
"spec_repo_commit": "0bbc13ae"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3552,6 +3552,9 @@ components:
35523552
env:
35533553
description: The Datadog environment.
35543554
type: string
3555+
provider_name:
3556+
description: The name of the CI provider. By default, this is "custom".
3557+
type: string
35553558
resource:
35563559
$ref: '#/components/schemas/CIAppCreatePipelineEventRequestAttributesResource'
35573560
service:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-01-08T08:57:29.599Z

cassettes/features/v2/ci_visibility_pipelines/Send-pipeline-event-with-custom-provider-returns-Request-accepted-for-processing-response.yml

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Send pipeline event with custom provider returns "Request accepted for processing" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::CIVisibilityPipelinesAPI.new
5+
6+
body = DatadogAPIClient::V2::CIAppCreatePipelineEventRequest.new({
7+
data: DatadogAPIClient::V2::CIAppCreatePipelineEventRequestData.new({
8+
attributes: DatadogAPIClient::V2::CIAppCreatePipelineEventRequestAttributes.new({
9+
provider_name: "example-provider",
10+
resource: DatadogAPIClient::V2::CIAppPipelineEventFinishedPipeline.new({
11+
level: DatadogAPIClient::V2::CIAppPipelineEventPipelineLevel::PIPELINE,
12+
unique_id: "3eacb6f3-ff04-4e10-8a9c-46e6d054024a",
13+
name: "Deploy to AWS",
14+
url: "https://my-ci-provider.example/pipelines/my-pipeline/run/1",
15+
start: (Time.now + -120),
16+
_end: (Time.now + -30),
17+
status: DatadogAPIClient::V2::CIAppPipelineEventPipelineStatus::SUCCESS,
18+
partial_retry: false,
19+
git: DatadogAPIClient::V2::CIAppGitInfo.new({
20+
repository_url: "https://github.com/DataDog/datadog-agent",
21+
sha: "7f263865994b76066c4612fd1965215e7dcb4cd2",
22+
author_email: "john.doe@email.com",
23+
}),
24+
}),
25+
}),
26+
type: DatadogAPIClient::V2::CIAppCreatePipelineEventRequestDataType::CIPIPELINE_RESOURCE_REQUEST,
27+
}),
28+
})
29+
p api_instance.create_ci_app_pipeline_event(body)

features/v2/ci_visibility_pipelines.feature

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,13 @@ Feature: CI Visibility Pipelines
108108
When the request is sent
109109
Then the response status is 202 Request accepted for processing
110110

111+
@team:Datadog/ci-app-backend
112+
Scenario: Send pipeline event with custom provider returns "Request accepted for processing" response
113+
Given new "CreateCIAppPipelineEvent" request
114+
And body with value {"data": {"attributes": {"provider_name": "example-provider", "resource": {"level": "pipeline","unique_id": "3eacb6f3-ff04-4e10-8a9c-46e6d054024a","name": "Deploy to AWS","url": "https://my-ci-provider.example/pipelines/my-pipeline/run/1","start": "{{ timeISO('now - 120s') }}","end": "{{ timeISO('now - 30s') }}","status": "success","partial_retry": false,"git": {"repository_url": "https://github.com/DataDog/datadog-agent","sha": "7f263865994b76066c4612fd1965215e7dcb4cd2","author_email": "john.doe@email.com"}}},"type": "cipipeline_resource_request"}}
115+
When the request is sent
116+
Then the response status is 202 Request accepted for processing
117+
111118
@skip @team:Datadog/ci-app-backend
112119
Scenario: Send pipeline job event returns "Request accepted for processing" response
113120
Given new "CreateCIAppPipelineEvent" request

lib/datadog_api_client/v2/models/ci_app_create_pipeline_event_request_attributes.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ class CIAppCreatePipelineEventRequestAttributes
2424
# The Datadog environment.
2525
attr_accessor :env
2626

27+
# The name of the CI provider. By default, this is "custom".
28+
attr_accessor :provider_name
29+
2730
# Details of the CI pipeline event.
2831
attr_reader :resource
2932

@@ -37,6 +40,7 @@ class CIAppCreatePipelineEventRequestAttributes
3740
def self.attribute_map
3841
{
3942
:'env' => :'env',
43+
:'provider_name' => :'provider_name',
4044
:'resource' => :'resource',
4145
:'service' => :'service'
4246
}
@@ -47,6 +51,7 @@ def self.attribute_map
4751
def self.openapi_types
4852
{
4953
:'env' => :'String',
54+
:'provider_name' => :'String',
5055
:'resource' => :'CIAppCreatePipelineEventRequestAttributesResource',
5156
:'service' => :'String'
5257
}
@@ -74,6 +79,10 @@ def initialize(attributes = {})
7479
self.env = attributes[:'env']
7580
end
7681

82+
if attributes.key?(:'provider_name')
83+
self.provider_name = attributes[:'provider_name']
84+
end
85+
7786
if attributes.key?(:'resource')
7887
self.resource = attributes[:'resource']
7988
end
@@ -128,6 +137,7 @@ def ==(o)
128137
return true if self.equal?(o)
129138
self.class == o.class &&
130139
env == o.env &&
140+
provider_name == o.provider_name &&
131141
resource == o.resource &&
132142
service == o.service &&
133143
additional_properties == o.additional_properties
@@ -137,7 +147,7 @@ def ==(o)
137147
# @return [Integer] Hash code
138148
# @!visibility private
139149
def hash
140-
[env, resource, service, additional_properties].hash
150+
[env, provider_name, resource, service, additional_properties].hash
141151
end
142152
end
143153
end

0 commit comments

Comments
 (0)