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

bootBuildImage fails with Unable to parse image reference in RC1 #33002

Closed
tompson opened this issue Nov 4, 2022 · 3 comments
Closed

bootBuildImage fails with Unable to parse image reference in RC1 #33002

tompson opened this issue Nov 4, 2022 · 3 comments
Labels
type: wiki-documentation A documentation update required on the wiki

Comments

@tompson
Copy link

tompson commented Nov 4, 2022

I have the following configuration in my build.gradle:

bootBuildImage {
	imageName = "eu.gcr.io/company/imagename"
	builder = "paketobuildpacks/builder:tiny"
	if (System.getenv("IMAGE_TAGS")) {
		tags = (System.getenv("IMAGE_TAGS").split(",") as List<String>).collect { "$imageName:$it" }
	}
}

which worked in 3.0.0-M5 but does not work in 3.0.0-RC1 - where it throws the following error:

Execution failed for task ':bootBuildImage'.
> Unable to parse image reference "task ':bootBuildImage' property 'imageName':test". Image reference must be in the form '[domainHost:port/][path/]name[:tag][@digest]', with 'path' and 'name' containing only [a-z0-9][.][_][-]
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 4, 2022
@wilkinsona
Copy link
Member

Thanks for trying RC1.

imageName on bootBuildImage is now a Gradle Property. Unfortunately that means that "$imageName:$it" no longer works as $imageName is the property not its value. This works:

bootBuildImage {
	imageName = "eu.gcr.io/company/imagename"
	builder = "paketobuildpacks/builder:tiny"
	if (System.getenv("IMAGE_TAGS")) {
		tags = (System.getenv("IMAGE_TAGS").split(",") as List<String>).collect { "${imageName.get()}:$it" }
	}
}

The switch to using Property is mentioned in the release notes but we hadn't anticipated that it would have this effect. We'll update the release notes.

@wilkinsona wilkinsona added type: wiki-documentation A documentation update required on the wiki and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 4, 2022
@wilkinsona
Copy link
Member

I have updated the release notes. Thanks for bringing this to our attention.

@tompson
Copy link
Author

tompson commented Nov 4, 2022

Thanks for the quick response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: wiki-documentation A documentation update required on the wiki
Projects
None yet
Development

No branches or pull requests

3 participants