Skip to main content
Sign in
Snippets Groups Projects

Removing pipelines from a gitlab project

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Dlyaver Djebarov
    Edited
    snippetfile1.txt 268 B
    # pip install python-gitlab
    
    import gitlab
    project_id = 10349
    gl = gitlab.Gitlab('https://git-ce.rwth-aachen.de/', private_token='personal access token')
    project = gl.projects.get(project_id)
    for pipeline in project.pipelines.list(as_list=False):
        pipeline.delete()
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please to comment