0

In Jenkins UI I can specify using regular expression, which branches to poll in this job.

But I need to poll a list of concrete branches, i.e.

develop, feature1, feature2

Is it possible?

Pavel Bernshtam
  • 4,232
  • 8
  • 38
  • 62

1 Answers1

1

In git parameter add a regex in Branch filter.

(develop|feature1|feature2)

enter image description here

Git parameter plugin docs

Joao Vitorino
  • 2,976
  • 3
  • 26
  • 55
  • It does not work :( I put (origin/extracted-config|origin/develop) And I get "ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job." – Pavel Bernshtam Nov 15 '18 at 06:46
  • see https://stackoverflow.com/questions/6076229/escaping-a-forward-slash-in-a-regular-expression and https://stackoverflow.com/questions/9589074/regex-should-hyphens-be-escaped – Joao Vitorino Nov 16 '18 at 11:10