I am really new to Git & GitLab. My aim is to create few CICD jobs which should run when a commit happens on a particular branch. I was going through few topics & videos for the last 2 weeks and come up with yaml file which actually runs now and build some files. My current requirement is to get few parameters like the commited branch name, commited files and then download these files to a remote system. I have gone through the CICD variables and tried to echo these variables to see the values.
echo $CI_COMMIT_REF_NAME simply echoes the same value in the CICD job console.
How can we get this value? Any pointers is highly appreciated.
I got my issue…it was a syntax issue and needs to change according to the runner.
I fix that issue but getting a null value when i read CI_COMMIT_REF_NAME variable.
Below is sample output
Running with gitlab-runner 11.6.0 (f100a208)
on iib-dedictaed-server-description 28fnufWA
Using Shell executor…
Running on DESKTOP-9VN35R5…
Fetching changes…
HEAD is now at 6eefa47 Update .gitlab-ci.yml
From https://gitlab.com/Chandran88/iib-project
6eefa47…e1d018c dev -> origin/dev
Checking out e1d018c1 as dev…
Skipping Git submodules setup
$ echo vAR1:%CI_COMMIT_REF_NAME%
vAR1:
call C:\Users\abhi\IBM\IIBT10\GitRepo\cicd.bat