tfs - pass parameter from jenkins parameterized build to windows batch command -
tfs - pass parameter from jenkins parameterized build to windows batch command -
i starting utilize jenkins, great tool. using parameterized build, define parameter such branch name ${branch} (e.g. dev, release, main etc).
in build config, can add together windows batch command, there way can pass downwards these parameters batch command?
i tried pass "%${branch}%" or "%branch%", seems not working.
can help?
many thanks
using parameterized build, need define parameters. value of these prompted when click "build" link.
the name of parameters should plain name, preferably without spaces, branch
. not add together ${}
or %%
definition of parameter name.
in build steps, execute windows batch command, can reference parameter regular batch syntax, %branch%
.
if on *nix machine, utilize execute shell build step , reference parameter regular bash syntax, ${branch}
note when running on windows, lot of jenkins plugins take parameters in *nix syntax, execute windows batch command batch-like, i.e. %branch%
.
so, can seek typing: echo %branch%
i suggest putting set
command on line itself, , show environment variables available during build process, quite useful.
tfs jenkins
Comments
Post a Comment