Skip to content

[core] Password for docker registries should only be validated when required #1881

@aalmiray

Description

@aalmiray

Invoking commands such as prepare and package should not require setting a value for password in the configured registries.

Task List

  • Steps to reproduce provided
  • Stacktrace (if present) provided
  • Example that reproduces the problem (link to git repository is ideal)
  • Full description of the issue provided (see below)

Steps to Reproduce

  1. clone https://github.com/jreleaser/helloworld-java-bin
  2. build with mvn verify
  3. assemble with jreleaser assemble
  4. prepare with jreleaser prepare
  5. generate an image with jreleaser package

Expected Behaviour

A Dockerfile should be successfully generated and a docker image created at the local daemon.

Actual Behaviour

A configuration error occurs

[ERROR] == JReleaser ==
[ERROR] registry.docker.io.password must not be blank. Configure a value using the CLI yaml DSL, or define [jreleaser.distribution.helloworld.docker.docker.io.password, jreleaser.distribution.helloworld.docker.default.password, jreleaser.docker.docker.io.password, jreleaser.docker.default.password] System properties, or define [JRELEASER_DISTRIBUTION_HELLOWORLD_DOCKER_DOCKER_IO_PASSWORD, JRELEASER_DISTRIBUTION_HELLOWORLD_DOCKER_DEFAULT_PASSWORD, JRELEASER_DOCKER_DOCKER_IO_PASSWORD, JRELEASER_DOCKER_DEFAULT_PASSWORD] environment variables, or define a key/value pair in /Users/aalmiray/.jreleaser/config.toml with keys [JRELEASER_DISTRIBUTION_HELLOWORLD_DOCKER_DOCKER_IO_PASSWORD, JRELEASER_DISTRIBUTION_HELLOWORLD_DOCKER_DEFAULT_PASSWORD, JRELEASER_DOCKER_DOCKER_IO_PASSWORD, JRELEASER_DOCKER_DEFAULT_PASSWORD]

Environment Information

  • Operating System: N/A
  • JReleaser Version: 1.18.0
  • JDK Version: N/A

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions