Skip to content
Snippets Groups Projects

Introduce API for serving the artifacts archive

Merged Kamil Trzciński requested to merge builds-artifacts-API into master

Add API to download build artifacts archive in context of GitLab API

/cc @DouweM @grzesiek

Merge request reports

Pipeline #721700 failed

Pipeline failed for 17182cdf on builds-artifacts-API

Approval is optional

Merged by avatar (Mar 29, 2025 12:02pm UTC)

Merge details

  • Changes merged into master with 20781b29.
  • Deleted the source branch.

Pipeline #721971 failed

Pipeline failed for 20781b29 on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 69 # GET /projects/:id/builds/:build_id/artifacts
    70 get ':id/builds/:build_id/artifacts' do
    71 authorize_read_builds!
    72
    73 build = get_build(params[:build_id])
    74 return not_found!(build) unless build
    75
    76 artifacts_file = build.artifacts_file
    77
    78 unless artifacts_file.file_storage?
    79 return redirect_to build.artifacts_file.url
    80 end
    81
    82 unless artifacts_file.exists?
    83 not_found!
    84 end
  • 65 # Parameters:
    66 # id (required) - The ID of a build
    67 # token (required) - The build authorization token
    68 # Example Request:
    69 # GET /projects/:id/builds/:build_id/artifacts
    70 get ':id/builds/:build_id/artifacts' do
    71 authorize_read_builds!
    72
    73 build = get_build(params[:build_id])
    74 return not_found!(build) unless build
    75
    76 artifacts_file = build.artifacts_file
    77
    78 unless artifacts_file.file_storage?
    79 return redirect_to build.artifacts_file.url
    80 end
  • Kamil Trzciński Added 3 commits:

    Added 3 commits:

    • c312bc1f - Fix specs
    • 9c0e2e5d - Fix API implementation
    • 74036bc7 - Fix API
  • Kamil Trzciński Added 42 commits:

    Added 42 commits:

  • Kamil Trzciński Added 1 commit:

    Added 1 commit:

  • Kamil Trzciński Added 1 commit:

    Added 1 commit:

  • @grzesiek Are you happy about the changes? :)

  • @ayufan Sure, great work! :smile_cat:

  • Kamil Trzciński Added ~149423 label

    Added ~149423 label

  • @rymai Please pick this too :)

  • Kamil Trzciński Status changed to merged

    Status changed to merged

  • mentioned in commit 20781b29

  • Achilleas Pipinellis mentioned in merge request !2902 (merged)

    mentioned in merge request !2902 (merged)

  • mentioned in commit 040ae7e3

  • mentioned in commit ba893daf

  • Picked into 8-5-stable.

  • Rémy Coutable Removed ~149423 label

    Removed ~149423 label

  • mentioned in commit 0e41e657

  • Achilleas Pipinellis mentioned in merge request !5347 (merged)

    mentioned in merge request !5347 (merged)

  • mentioned in issue #56883 (moved)

  • Please register or sign in to reply
    Loading