Skip to content

Show status and commit in trigger job show page

Mireya Andres requested to merge show-bridge-job-details into master

What does this MR do and why?

For #345046

!76115 (merged) sets up the bridge job show page, but the UI for it is static. This MR fetches the pipeline and job data so we can show the CI header and commit information on the page.

This page is hidden behind the :ci_retry_downstream_pipeline feature flag.

Technical Details

It might be easier to review this MR by going through the changes in each commit:

Commit Summary
02bc8443 Fetch pipeline data
df0d19d1 Pass downstreamPipelinePath from rails
5b601be7 Move sidebar toggle logic to bridge app*
14672652 Add CI header and commit block

*The sidebar toggle logic originally resided in bridge/components/sidebar.vue. This is moved to the parent component bridge/app.vue since the sidebar can be toggled by both the sidebar component and the CI header component (see recording below).

Screenshots or screen recordings

Before After
Before Screen_Shot_2021-12-16_at_17.55.45

For comparison, this is what a regular job page looks like (a bridge page only shows information for a trigger job, so there should be no logs or artifacts). The stage dropdown and jobs list components will be added to the sidebar in a future MR.

Regular Job Page Job Page

Recording of the sidebar toggle behavior:

Sidebar toggle behavior Sidebar Toggle

How to set up and validate locally

  1. Enable the ci_retry_downstream_pipeline feature flag. (rails c then Feature.enable(:ci_retry_downstream_pipeline))
  2. Add the following content to your .gitlab-ci.yml file:
    stages:
      - prepare
      - deploy
    
    job:
      stage: prepare
      script:
        - echo "running prepare_job"
    
    triggerJob:
      stage: deploy
      trigger:
        include:
          - project: "/path/to/project" # replace with another project
            file: ".gitlab-ci.yml"
  3. Visit the pipeline and click on the triggerJob job pill.
  4. Site should redirect to the trigger show page.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Mireya Andres

Merge request reports