Git build version (sha) available in Cockpit

I am looking at different versions of a process in the Cockpit and the associated deployment details. It would be lovely to have the Git commit sha there in the deployment details to easily match a deployment to a specific codebase.

I know how to write the git commit id to a properties file (for example) during build, but is there any way that this can be picked up by Camunda and displayed in the deployment details? Could the Version Tag be used for example?
Other suggestions are welcome.

FYI: we are running camunda version 7.4.5-ee with a shared Tomcat.

@benny so a easy solution is to just upload a reference file in your deployment if you require specific deployment/git details.

There is also the “source” field you can use when creating your deployment, you can set the source field when doing deployment.

Take a look at this: https://github.com/StephenOTT/ProcessProjectTemplate

where there is a Jenkins file that deploys from Git changes.
You could use the sha in the source but would a little cleaner if you just have a file you edit with the sha before deployment occurs. When you are in the BPMN process view you can select the deployment ID on the right and it will take you to the specific deployment and you can read the file from the UI.

Thanks for your reply.
I cannot see any resources, other than bpmn (and probably .dmn) files, when clicking the Deployment Id link. Hence I do not think it will work to add a file in the classpath that can be viewed in the deployments view.

I might be able to use the source field you mention, but the intended usage is different. See docs https://docs.camunda.org/manual/7.8/webapps/cockpit/deployment-view/#search

For the time being I will use the versionTag which is specified in the bpmn file because it is displayed in the UI nicely. However, I suppose this is meant to be the version of the bpmn process, so when deployments are made without changes to the bpmn file it is sort of misleading.

If you do process application deployments, you can add any kind of resource to a deployment by using the resource element in processes.xml, see https://docs.camunda.org/manual/7.8/reference/deployment-descriptors/tags/process-archive/#example.

Cheers,
Thorben

Ah, there was the missing piece. Thanks.

An unfortunate side effect of putting a git-commit.properties type file in the list of resources in processes.xml is that Camunda will bump the version number for each deployment.
I understand that Camunda checks not only the bpmn file for changes as explained at https://docs.camunda.org/manual/7.8/user-guide/process-applications/the-processes-xml-deployment-descriptor/#process-application-deployment but it will check all files listed as resources.

Increasing the version would be great if Camunda also versioned the Java code (delegates etc), but it sadly does not.
Is there any way I can can get my git-commit.properties file pop up in the Camunda GUI without forcing the version to be bumped up? (I know I can find the file in the war package, but I would love to have easier access than that).

You can set the property isDeployChangedOnly in processes.xml, see https://docs.camunda.org/manual/7.8/reference/deployment-descriptors/tags/process-archive/#configuration-properties