Gitlab-CI Environment Variable for Commit Comment -


i'm using gitlab-ci cd project's staging branch google firebase. each deployment gets special comment pipelineid , build id.

firebase deploy -m "pipeline $ci_pipeline_id, build $ci_build_id" --non-interactive --token $firebase_deploy_key 

for ease of use, when rolling commits in firebase console, i'd include commit message deploy comment.

i searched through documentation , didn't find variable that. mistaken, or not possible?

thanks help!

it's not possible through predefined gitlab ci variables list shows. may able other way.

for instance retrieve commit message using following (found here)

git rev-list --format=%b --max-count=1 head 

or

git rev-list --format=%b --max-count=1 $ci_commit_sha 

and use output of command in own command.

for instance:

message=$(git rev-list --format=%b --max-count=1 head) firebase deploy -m "pipeline $ci_pipeline_id, build $ci_build_id, message $message" --non-interactive --token $firebase_deploy_key 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -