How to get the Pipeline #XXXXXXXXX value displayed on GitLab UI inside .gitlab-ci.yml

,

The title pretty much says it all. I want to be able to get the value below as an environment variable in my .gitlab-ci.yml.
image

I tried both ${CI_PIPELINE_ID} and ${CI_PIPELINE_IID} but in the first case I got an incremental value and in the second I got a different value from the one displayed below.

Does anyone know how to?

Thanks in advance

I just tried this and works as expected:

Can you please share your .gitlab-ci.yml?

1 Like

Yeah Iā€™m sorry I got it fixed but forgot to close the topic.
But yeah ${CI_PIPELINE_ID} is deffo correct.