0

I receive an error after launching a Jenkins pipeline, but right at the SCM step, configure via the plugin (not by the groovy).

The message refers to a "Name" wrong spelled, but I can't figure out to which of my fields it is referring.

I looked to the source code, but it manipulates a concatenation of several inputs...

This is a git SCM.

Jenkins interface

ERROR: Name must follow the pattern '^[a-zA-Z0-9]+((.|_|__|-+)[a-zA-Z0-9]+)*$'
 at hudson.util.FormValidation._errorWithMarkup(FormValidation.java:268)
 at hudson.util.FormValidation.errorWithMarkup(FormValidation.java:254)
 at hudson.util.FormValidation.error(FormValidation.java:145)
 at hudson.util.FormValidation.error(FormValidation.java:170)
 at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateName(ImageNameValidator.java:289)
 at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.validateUserAndRepo(ImageNameValidator.java:115)
 at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator.checkUserAndRepo(ImageNameValidator.java:141)
 at org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator$checkUserAndRepo.call(Unknown Source)
+ 50 lines I can show if needed

1 Answer 1

2

The stack trace contains org.jenkinsci.plugins.docker.commons.credentials.ImageNameValidator, so this error is for Docker image name validation, not your Git SCM.

2
  • Thanks, we have an image name generated from a Jenkins parameter. It seems that this feature is now disabled (security issue, I guess). So a ${abc} is refused by the ImageNameValidator. It is painful that the error message doesn't display the string analysed.
    – Sandburg
    Mar 23 at 15:45
  • I could think the problem was the consequence of a security patch not allowing me to inject a docker image name in a variable, but it's that the regex only accepts ' and not "... I think this could be patched in Jenkins code.
    – Sandburg
    Apr 14 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.