dummy
dummy

Reputation: 63

Jenkins/Hudson parameter usage

I have a question, if it is possible to define a String parameter and use it in url repository? It always writes red that the repository does not exist, when I use a parameter like this ${NAME}

Upvotes: 0

Views: 233

Answers (1)

Slav
Slav

Reputation: 27485

Yes, you are fully allowed to do that. In fact, I do this every day, where my branch builds append the branch number (from a dropdown parameter) to the URL

http://svn.repo.com/some_project/branch/${NAME} is a valid SVN Repo URL

To avoid the red warning message, do the following:

  • Go to Manage Jenkins (configure)
  • Scroll down until you see Subversion section
  • Check mark Validate repository URLs to the first variable name
  • Click Save

Just one note on polling. The SVN polling will use the last full (with the expanded variable) URL that was run. In other words, it will remember your ${NAME} parameter for polling, until you run the job with a different value for {NAME}

Upvotes: 1

Related Questions