-
Bug
-
Resolution: Fixed
-
Trivial
-
None
-
docker-plugin 0.16.2
The "Build / Publish Docker Containers" build step's web user-interface is misleading.
The "Image" validation code complains about valid input.
The "Image" help-text is incomplete.
In the "Build / Publish Docker Containers" build step, the "Image" field is set to be the tags that are to be applied to the newly-created image.
The syntax of these tags can have a variety of format depending on the complexity (see https://docs.docker.com/engine/reference/commandline/tag/ for details).
e.g. it can be as simple as "myimage", but it could be "myimage:mytag", or even "myregistry:1234/myimage:mytag".
The online-help for this field says that it's
Repository name (and optionally a tag) to be applied to the resulting image in case of success.
New line separated values.
This is not entirely correct - it can also include a registry name (and optionally a port) prefixed to a "/" and then the repository name (and optionally a tag).
The web-ui validation code is even more restrictive than the help-text and insists that the only valid option is just a repository name on its own. e.g. if you give an image name of myimage:mytag then it complains:
Tag myimage:mytag doesn't match ^([a-z0-9-_.]+)$
(and it has similar complains about myregistry/myimage:mytag and myregistry:1234/myimage:mytag)
Note: Despite all the complaints from the web-front-end, the build-step works as it should. As long as you ignore the red validation errors, you can, for example, specify a tag of myregistry:1234/myimagename:mytag, tick the "push" checkbox, and it'll push the built image into your registry.
i.e. The build-step works, it's only the "help" and "validation" that's wrong.
See pull request https://github.com/jenkinsci/docker-plugin/pull/453