Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add repository config option to Docker registries. (Cherry pick of #15884) #15952

Merged
merged 1 commit into from Jun 27, 2022

Conversation

kaos
Copy link
Member

@kaos kaos commented Jun 27, 2022

[...] using a different docker repository for a given registry? E.g. for registry A use foo but for registry B we want to use ibm-foo

In order to have different image names between different registries we need a way to provide a registry specific configuration for the image name. This introduces a repository config option for registries for this purpose.

Example:

# BUILD
docker_image(repository="foo", registries=["@A", "@B"])
# pants.toml
[docker.registries.A]
address = "A"

[docker.registries.B]
address = "B"
repository = "ibm-{target_repository}"

Rust tests and lints will be skipped. Delete if not intended.

[ci skip-rust]

Building wheels and fs_util will be skipped. Delete if not intended.

[ci skip-build-wheels]

> [...] using a different docker repository for a given registry? E.g. for registry `A` use `foo` but for registry `B` we want to use `ibm-foo`

In order to have different image names between different registries we need a way to provide a registry specific configuration for the image name. This introduces a `repository` config option for registries for this purpose.

Example:
```python
# BUILD
docker_image(repository="foo", registries=["@A", "@b"])
```

```toml
# pants.toml
[docker.registries.A]
address = "A"

[docker.registries.B]
address = "B"
repository = "ibm-{target_repository}"
```

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@kaos kaos merged commit 228d83b into pantsbuild:2.13.x Jun 27, 2022
@kaos kaos deleted the cp_docker_cfg_option_2.13 branch June 27, 2022 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants