filevariablesjenkinsoperations

Jenkins: Copy to a dynamic target location using the current branch in the file operations plugin


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

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

Jenkins Version 2.72

File Operations Plugin Version 1.6


Solution

  • On my installation with Jenkins 2.60.2 and File Operations Plugin 1.6, ${BRANCH_NAME} works for me.