Sha256: 378f328e0a4b5d393007fd3a9dbb039d5b32a3fbcd9f996cea13f3f97312d727

Contents?: true

Size: 1.15 KB

Versions: 25

Compression:

Stored size: 1.15 KB

Contents

# Trigger tests from CI/CD pipelines returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::SyntheticsAPI.new

body = DatadogAPIClient::V1::SyntheticsCITestBody.new({
  tests: [
    DatadogAPIClient::V1::SyntheticsCITest.new({
      basic_auth: DatadogAPIClient::V1::SyntheticsBasicAuthWeb.new({
        password: "PaSSw0RD!",
        type: DatadogAPIClient::V1::SyntheticsBasicAuthWebType::WEB,
        username: "my_username",
      }),
      device_ids: [
        DatadogAPIClient::V1::SyntheticsDeviceID::LAPTOP_LARGE,
      ],
      locations: [
        "aws:eu-west-3",
      ],
      metadata: DatadogAPIClient::V1::SyntheticsCIBatchMetadata.new({
        ci: DatadogAPIClient::V1::SyntheticsCIBatchMetadataCI.new({
          pipeline: DatadogAPIClient::V1::SyntheticsCIBatchMetadataPipeline.new({}),
          provider: DatadogAPIClient::V1::SyntheticsCIBatchMetadataProvider.new({}),
        }),
        git: DatadogAPIClient::V1::SyntheticsCIBatchMetadataGit.new({}),
      }),
      public_id: "aaa-aaa-aaa",
      _retry: DatadogAPIClient::V1::SyntheticsTestOptionsRetry.new({}),
    }),
  ],
})
p api_instance.trigger_ci_tests(body)

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
datadog_api_client-2.19.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.18.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.17.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.16.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.15.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.14.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.13.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.12.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.11.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.10.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.9.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.8.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.7.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.6.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.5.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.4.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.3.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.2.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.1.0 examples/v1/synthetics/TriggerCITests.rb
datadog_api_client-2.0.2 examples/v1/synthetics/TriggerCITests.rb