Skip to content

question: is there a way to trigger a rerun for a certain build? #181

@FrancescElies

Description

@FrancescElies

I would like to trigger programatically the rerun failed jobs button
grafik
This is actually a PATCH to /_apis/build/builds/112560?retry=true

credentials = BasicAuthentication("", personal_access_token)
connection = Connection(base_url=organization_url, creds=credentials)
build_client = connection.clients.get_build_client()

# Get the first page of projects
projects = core_client.get_projects()
project = next(x for x in projects if x.name == "myorg")
build, *_ = build_client.get_builds( project=project.id, build_ids=[112560])

build.rerun_failed()  # what I would like to do

Is there something like rerun_failed()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions