Jenkins: copy to dynamic target location using current branch in file operations plugin

What is the correct formatting used to access the BRANCH_NAME variable in the plugin-> file copy file operation? The target location will be accurate.

I tried% BRANCH_NAME%, $ {env.BRANCH_NAME} but jenkins keeps taking them literally and creates a directory with the same name i.e. c: \% BRANCH_NAME%

Jenkins Version 2.72

File operations plugin version 1.6

+3


source to share


2 answers


In my installation with Jenkins 2.60.2 and File Operations Plugin 1.6, ${BRANCH_NAME}

works for me.



+1


source


BRANCH_NAME did not exist under build environment variables # but GIT_BRANCH. $ {GIT_BRANCH} used as target folder created a folder named branch.



0


source







All Articles