git ref to last deployment of environment
Problem to solve
I want to be able to compare the code in a given environment from git
Target audience
-
Delaney, Development Team Lead, https://design.gitlab.com/research/personas#persona-delaney
-
Sasha, Software Developer, https://design.gitlab.com/research/personas#persona-sasha
-
Devon, DevOps Engineer, https://design.gitlab.com/research/personas#persona-devon
-
Sidney, Systems Administrator, https://design.gitlab.com/research/personas#persona-sidney
-
Sam, Security Analyst, https://design.gitlab.com/research/personas#persona-sam
Further details
use cases:
- check what is in prod
git log environments/prod/last-deployment
- check what I'm about to deploy
git log environments/prod/last-deployment..HEAD
- view the difference between master and prod
git diff environments/prod/last-deployment master
Proposal
as a git user I'd like to add this to my ~/.gitconfig
[remote "origin"]
fetch = +refs/environments/*:refs/remotes/environments/*
so that the next git fetches update the environments/prod/last-deployment
ref so that I don't have to remember the last deployment number (environments/prod/deployments/123
vs environments/prod/last-deployment
)
alternative config:
[remote "origin"]
fetch = +refs/environments/*/last-deployment:refs/remotes/env/*
simplifies environments/prod/last-deployment
to env/prod
for every environments
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.