Sha256: 84ddd7a1ce6e95f69140f69b2c7dfadf1934910c7096c48851e75d8294ac109d

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 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: [
        "chrome.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

1 entries across 1 versions & 1 rubygems

Version Path
datadog_api_client-2.29.1 examples/v1/synthetics/TriggerCITests.rb