Visitar URL original
Support for the cli allow using tags rather than public id · Issue #1511 · DataDog/datadog-ci · GitHub
Skip to content

Support for the cli allow using tags rather than public id #1511

Closed

Description

@surajtikoo

Feature request description

Currently it is a dependency to give the public id for the batch. It would be nice to have a filter which allow us to trigger the testcases based on certain tags
CURRENT ISSUE

datadog-ci synthetics run-tests --publicIds=dfsadfsa

Solution

E.G
datadog-ci synthetics run-tests --tags managedBy:terraform,batchid:1

Additional context

No response

Command

None

Activity

  1. added
    syntheticsRelated to [synthetics]
    and removed
    enhancementNew feature or request
    on Dec 20, 2024
  2. Drarig29 commented on Dec 20, 2024

    @Drarig29
    Collaborator

    Hi @surajtikoo!

    You can use the -s,--search for this: (as explained here in the readme 😁)

    datadog-ci synthetics run-tests --search 'tag:e2e-tests'

    It has the same syntax as the search bar in the Tests list page in Datadog. For example:

    datadog-ci synthetics run-tests --search 'tag:(first-tag OR second-tag) team:your-team'

    Since this is already a feature, I removed the enhancement label and will close the issue.

    Season's greetings 🥂🎄

  3. surajtikoo commented on Dec 20, 2024

    @surajtikoo
    Author
  4. Drarig29 commented on Dec 20, 2024

    @Drarig29
    Collaborator

    The trick is to craft the query in the UI, then copy-paste the full string inside single quotes.

    This should work with:

    datadog-ci synthetics run-tests --search 'team:argus tag:"managedBy:terraform"'

    Sorry my initial example was for tags that are single values, not key:value. We'll update the docs to make this clearer!

  5. surajtikoo commented on Dec 20, 2024

    @surajtikoo
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    syntheticsRelated to [synthetics]

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions