-
Bug
-
Resolution: Fixed
-
Minor
-
None
There is an issue with certain patterns passed using the : regex specifier.
I am trying to match a branch with the format release-YYYYMMDD so I am using the following pattern
`:origin/release-\d
{8}`Here is the output from the console using this pattern
Started by user User Name
Building on master in workspace /opt/bitnami/apps/jenkins/jenkins_home/jobs/kapx-site-demo/workspace
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://source.developers.google.com/p/kapx-site-demo # timeout=10
Fetching upstream changes from https://source.developers.google.com/p/kapx-site-demo
> git --version # timeout=10
using .gitcredentials to set credentials
> git config --local credential.helper store --file=/opt/bitnami/apache-tomcat/temp/git6326675135972302331.credentials # timeout=10
> git -c core.askpass=true fetch --tags --progress https://source.developers.google.com/p/kapx-site-demo +refs/heads/:refs/remotes/origin/
> git config --local --remove-section credential # timeout=10
> git rev-parse :origin/release-\d{8}
^
{commit} # timeout=10> git rev-parse refs/remotes/origin/:origin/release-\d{8}^{commit}
# timeout=10
> git rev-parse :origin/release-\d
^
{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE
If I change the pattern to something like this `:origin/release-\d*` it does not error, but it also is not specific enough since it would match any number of digits.