Jenkins Git Publisher tag does not match environment variables

I configured my jenkins window service to create all my projects and now I get to the point where I want jenkins to create a tag to indicate a successful build.

I am trying to do this as a post build step using the Git Publisher module.

My settings are as follows:

  • Click only if building a limit - Yes
  • Combine Results: None
  • Click tag:% BUILD_NUMBER%
  • Create New Tag: Yes
  • Final Remote Name: origin / master

The log file tells me that he

Pushing tag %BUILD_NUMBER% to repo origin/master 

and this is what I see in my Git repository. I tried other environment variables to no avail. Help says:

 Environment variables may be used in the tag name - they will be replaced at build time. 

what i don't see. I am trying to ensure that I click on a tag that is named after a successful build number.

How can i achieve this?

+4
source share
1 answer

It works if I use $ BUILD_NUMBER instead of% BUILD_NUMBER%

+9
source

Source: https://habr.com/ru/post/1437419/


All Articles