Skip to content

Make Short Sha in Deployments Page a Link

Andrew Fontaine requested to merge afontaine/link-short-sha into master

What does this MR do and why?

Usability interviews show that users expect to be able to click on the SHA of a commit to go to that page, and not the commit message. Adding the link is pretty simple, and I'm leaving the tooltip intact.

Changelog: added

Screenshots or screen recordings

image

How to set up and validate locally

  1. add the following .gitlab-ci.yml to a project for some deployments:
stages:
    - deploy
    - stop
image: alpine:latest

deploy-prod:
    stage: deploy
    script:
        - sleep 60
        - echo "deploying prod"
    environment:
        name: production

deploy-staging:
    stage: deploy
    script:
        - echo "deploying staging"
    environment:
        name: staging
        url: https://example.com
    when: manual

deploy-review:
    stage: deploy
    script:
        - echo "Deploying review/$CI_COMMIT_REF_NAME"
    environment:
        name: review/$CI_COMMIT_REF_NAME
        auto_stop_in: 1 week
    only:
        - branches
    except:
        - main


stop_review_app:
  script: stop-review-app
  stage: stop
  environment:
    name: review/$CI_COMMIT_REF_SLUG
    action: stop
  rules:
    - if: $CI_MERGE_REQUEST_ID
      when: manual

Run a pipeline to create the environments, then navigate to Deployments > Environments. Expand the production environment to see the deployments.

MR acceptance checklist

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

For #364700 (closed)

Edited by Andrew Fontaine

Merge request reports

Loading