How can I get git tag in jenkins pipeline?

I checkout bitbucket code using tag refs/tags/devops-v3.0.0 with pipeline script from SCM options in Jenkins.

How can I get GIT_TAG_NAME (Like TAG: devops-v3.0.0) using the environment variable provided by Jenkins declarative pipeline?

I have selected Export git tag & message as environment variable. I have attach screenshot for of exporting message from pipeline log. But when I try to use in Jenkins step it is getting NULL

I have attached Jenkins pipeline without credential.

pipeline { agent any environment { TAG = "${GIT_TAG_NAME}" } stages { stage('Git checkout') { steps { cleanWs() checkout scm } } stage('Build and push images') { steps { withCredentials([file(credentialsId: "***", variable: '***')]){ sh """ docker build -t app:${TAG} --no-cache -f Dockerfile . docker push app:${TAG} """ } } } } }