-
Notifications
You must be signed in to change notification settings - Fork 336
pack builder create supports system buildpacks
#2349
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
Changes from 3 commits
081cf4e
d3e1fd0
b9995c5
6b3ccbd
bbdabda
9f83b77
e6ecec6
ec93b96
57a85e6
2e3b02a
515bb49
2734b59
53764a6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -920,8 +920,37 @@ func testBuilder(t *testing.T, when spec.G, it spec.S) { | |
| h.AssertTrue(t, strings.Contains(layers[2], h.LayerFileName(ext2v1))) | ||
| }) | ||
| }) | ||
| }) | ||
|
|
||
| when("system buildpacks", func() { | ||
| it.Before(func() { | ||
| subject.SetLifecycle(mockLifecycle) | ||
| subject.AddBuildpack(bp1v1) | ||
| subject.SetSystem(dist.System{ | ||
| Pre: dist.SystemBuildpacks{ | ||
| Buildpacks: []dist.ModuleRef{ | ||
| {ModuleInfo: dist.ModuleInfo{ID: bp1v1.Descriptor().Info().ID}}}, | ||
| }, | ||
| }) | ||
| }) | ||
|
|
||
| it("should write system buildpacks to system.toml)", func() { | ||
| err := subject.Save(logger, builder.CreatorMetadata{}) | ||
| h.AssertNil(t, err) | ||
|
|
||
| layerTar, err := baseImage.FindLayerWithPath("/cnb/system.toml") | ||
| h.AssertNil(t, err) | ||
| h.AssertOnTarEntry(t, layerTar, "/cnb/system.toml", h.ContentEquals(`[system] | ||
| [system.pre] | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @natalieparellano could you give me a hint here, I don't know how to avoid writing this key to the
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure I follow - looks like valid TOML to me. Are you trying to avoid specifying the super tables? These are probably being inserted by our serializer.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When I write the system.toml I ended up with [system]
[system.pre]
[[system.pre.buildpacks]]
id = "buildpack-1-id"
version = "buildpack-1-version-1"but we probably don't want the [system]
[[system.pre.buildpacks]]
id = "buildpack-1-id"
version = "buildpack-1-version-1"if it is not gonna hurt anybody, I am ok with living it as it is, but I wasn't sure
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| [[system.pre.buildpacks]] | ||
| id = "buildpack-1-id" | ||
| version = "buildpack-1-version-1" | ||
| `)) | ||
| // TODO: do we always need to show optional = false? | ||
| // TODO: how do I remove [system.pre] ?? | ||
| }) | ||
| }) | ||
| }) | ||
| when("#SetLifecycle", func() { | ||
| it.Before(func() { | ||
| h.AssertNil(t, subject.Save(logger, builder.CreatorMetadata{})) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.