How to pass a keyword to Git on commit

Hi Guys,

I have done a CICD job on Gitlab where commit of files in the repository triggers the job, builds the file and publish the files to a server. It was working fine but now my job should identify the server too while commit because the environment now have 4 servers pointing 4 different regions. How can a developer pass some keyword(even a 2 letter word should work) while commit other than commit message which I can retrieve in the Gitlab CICD job.

Your job could look at the commit message (put in variable CI_COMMIT_MESSAGE, see and extract some info from that. Or if a job/pipeline is triggered through the API ( you can add a custom variable in the trigger that your job can use to decide where to publish.