Skip to content

Commit 0c3d40f

Browse files
mhdawsonthitch97
authored andcommitted
feat: switch to using ubi-base-stack
Now that it's been published, use the https://github.com/paketo-community/ubi-base-stack instead of interim containers. Signed-off-by: Michael Dawson <[email protected]>
1 parent 13396b6 commit 0c3d40f

File tree

3 files changed

+40
-62
lines changed

3 files changed

+40
-62
lines changed

README.md

+5-27
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The Node.js Extension for
44
[ubi](https://www.redhat.com/en/blog/introducing-red-hat-universal-base-image)
55
allows builders to be created which build Node.js applications on top of
6-
Red Hat's Node. Node.js ubi containers. For example
6+
Red Hat's Node.js ubi containers. For example
77
[ubi8/nodejs-16-minimal](https://catalog.redhat.com/software/containers/ubi8/nodejs-16-minimal/615aefd53f6014fa45ae1ae2).
88

99
## Integration
@@ -70,33 +70,11 @@ ubi extension.
7070
version = "0.0.1"
7171
7272
[stack]
73-
id = "ubi8-paketo"
74-
build-image = "quay.io/midawson/ubi8-paketo-build"
75-
run-image = "quay.io/midawson/ubi8-paketo-run"
73+
id = "io.buildpacks.stacks.ubi8"
74+
build-image = "paketocommunity/build-ubi-base"
75+
run-image = "paketocommunity/run-ubi-base"
7676
```
7777

78-
A stack requires a build-image and a run-image and the extension
79-
requires a run image for each supported Node.js stream. We have made the
80-
following images available for initial testing while we work on
81-
building out the infrastruture to regularly build the required images:
82-
83-
- quay.io/midawson/ubi8-paketo-build
84-
- quay.io/midawson/ubi8-paketo-run
85-
- quay.io/midawson/ubi8-paketo-run-nodejs-18
86-
- quay.io/midawson/ubi8-paketo-run-nodejs-16
87-
88-
The `ubi8-paketo-run-nodejs-XX` are simply the ubi8/nodejs-XX-minimal
89-
images with the additional metadata and user/groups required by the
90-
buildpacks spefication added. Overtime we plan to incorporate the
91-
required chagnes into the ubi8/nodejs-XX-minimal images themselves.
92-
93-
The `ubi8-paketo-build` and `ubit-pakto-run` images are simply
94-
the `ubi8/ubi` and `ubi8/ubi-minimal` images with the additional
95-
metadata and user/groups required by the buildpacks spefication added.
96-
There is an effort to remove the concept of stacks and, therefore,
97-
over time the need for these containers with additional metadata will
98-
fade.
99-
10078
To create the builder:
10179

10280
1. create a file called builder.toml with the minimal builder toml
@@ -124,7 +102,7 @@ ubi extension.
124102

125103
ubi only supports the latest version of each Node.js stream
126104
currently available in the ubi version. At the time of writing
127-
ubi8 supports the Node.js 14, 16, and 18 streams. For example,
105+
ubi8 supports the Node.js 16, and 18 streams. For example,
128106
if the latest Node.js version for the 16.x stream in ubi8 is 16.10.1
129107
then that is your only option when requesting the Node.js 16.x stream.
130108
Therefore we suggest that you request the Node.js version such that it

extension.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ description = "This extension installs the appropriate nodejs runtime via dnf"
1515
[[metadata.dependencies]]
1616
id = "node"
1717
name = "Ubi Node Extension"
18-
stacks = ["ubi8-paketo"]
19-
source = "quay.io/midawson/ubi8-paketo-run-nodejs-18"
18+
stacks = ["io.buildpacks.stacks.ubi8"]
19+
source = "paketocommunity/run-nodejs-18-ubi-base"
2020
version = "18.1000"
2121

2222
[[metadata.dependencies]]
2323
id = "node"
2424
name = "Ubi Node Extension"
25-
stacks = ["ubi8-paketo"]
26-
source = "quay.io/midawson/ubi8-paketo-run-nodejs-16"
25+
stacks = ["io.buildpacks.stacks.ubi8"]
26+
source = "paketocommunity/run-nodejs-18-ubi-base"
2727
version = "16.1000"

generate_test.go

+31-31
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ RUN echo "CNB_STACK_ID: "`))
8080
it("Should fill with properties the template/run.Dockerfile", func() {
8181

8282
RunDockerfileProps := RunDockerfileProps{
83-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-18",
83+
Source: "paketocommunity/run-nodejs-18-ubi-base",
8484
}
8585

8686
output, err := ubinodejsextension.FillPropsToTemplate(RunDockerfileProps, runDockerfileTemplate)
8787

8888
Expect(err).NotTo(HaveOccurred())
89-
Expect(output).To(Equal(`FROM paketo-buildpacks/ubi8-paketo-run-nodejs-18`))
89+
Expect(output).To(Equal(`FROM paketocommunity/run-nodejs-18-ubi-base`))
9090

9191
})
9292
})
@@ -185,7 +185,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
185185
"version-source": "BP_NODE_VERSION",
186186
},
187187
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
188-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-18",
188+
Source: "paketocommunity/run-nodejs-18-ubi-base",
189189
},
190190
BuildDockerfileProps: BuildDockerfileProps,
191191
buildDockerfileExpectedNodejsVersion: 18,
@@ -197,7 +197,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
197197
"version-source": "BP_NODE_VERSION",
198198
},
199199
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
200-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-16",
200+
Source: "paketocommunity/run-nodejs-16-ubi-base",
201201
},
202202
BuildDockerfileProps: BuildDockerfileProps,
203203
buildDockerfileExpectedNodejsVersion: 16,
@@ -209,7 +209,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
209209
"version-source": "BP_NODE_VERSION",
210210
},
211211
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
212-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-16",
212+
Source: "paketocommunity/run-nodejs-16-ubi-base",
213213
},
214214
BuildDockerfileProps: BuildDockerfileProps,
215215
buildDockerfileExpectedNodejsVersion: 16,
@@ -221,7 +221,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
221221
"version-source": "BP_NODE_VERSION",
222222
},
223223
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
224-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-18",
224+
Source: "paketocommunity/run-nodejs-18-ubi-base",
225225
},
226226
BuildDockerfileProps: BuildDockerfileProps,
227227
buildDockerfileExpectedNodejsVersion: 18,
@@ -233,7 +233,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
233233
"version-source": "BP_NODE_VERSION",
234234
},
235235
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
236-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-16",
236+
Source: "paketocommunity/run-nodejs-16-ubi-base",
237237
},
238238
BuildDockerfileProps: BuildDockerfileProps,
239239
buildDockerfileExpectedNodejsVersion: 16,
@@ -245,7 +245,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
245245
"version-source": "BP_NODE_VERSION",
246246
},
247247
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
248-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-16",
248+
Source: "paketocommunity/run-nodejs-16-ubi-base",
249249
},
250250
BuildDockerfileProps: BuildDockerfileProps,
251251
buildDockerfileExpectedNodejsVersion: 16,
@@ -257,7 +257,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
257257
"version-source": "BP_NODE_VERSION",
258258
},
259259
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
260-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-18",
260+
Source: "paketocommunity/run-nodejs-18-ubi-base",
261261
},
262262
BuildDockerfileProps: BuildDockerfileProps,
263263
buildDockerfileExpectedNodejsVersion: 18,
@@ -269,7 +269,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
269269
"version-source": "BP_NODE_VERSION",
270270
},
271271
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
272-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-16",
272+
Source: "paketocommunity/run-nodejs-16-ubi-base",
273273
},
274274
BuildDockerfileProps: BuildDockerfileProps,
275275
buildDockerfileExpectedNodejsVersion: 16,
@@ -281,7 +281,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
281281
"version-source": "BP_NODE_VERSION",
282282
},
283283
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
284-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-18",
284+
Source: "paketocommunity/run-nodejs-18-ubi-base",
285285
},
286286
BuildDockerfileProps: BuildDockerfileProps,
287287
buildDockerfileExpectedNodejsVersion: 18,
@@ -293,7 +293,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
293293
"version-source": "BP_NODE_VERSION",
294294
},
295295
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
296-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-16",
296+
Source: "paketocommunity/run-nodejs-16-ubi-base",
297297
},
298298
BuildDockerfileProps: BuildDockerfileProps,
299299
buildDockerfileExpectedNodejsVersion: 16,
@@ -305,7 +305,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
305305
"version-source": "BP_NODE_VERSION",
306306
},
307307
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
308-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-18",
308+
Source: "paketocommunity/run-nodejs-18-ubi-base",
309309
},
310310
BuildDockerfileProps: BuildDockerfileProps,
311311
buildDockerfileExpectedNodejsVersion: 18,
@@ -325,7 +325,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
325325
},
326326
},
327327
},
328-
Stack: "ubi8-paketo",
328+
Stack: "io.buildpacks.stacks.ubi8",
329329
})
330330

331331
Expect(err).NotTo(HaveOccurred())
@@ -369,7 +369,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
369369
"version-source": "",
370370
},
371371
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
372-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-16",
372+
Source: "paketocommunity/run-nodejs-16-ubi-base",
373373
},
374374
BuildDockerfileProps: BuildDockerfileProps,
375375
buildDockerfileExpectedNodejsVersion: 16,
@@ -381,7 +381,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
381381
"version-source": "BP_NODE_VERSION",
382382
},
383383
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
384-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-16",
384+
Source: "paketocommunity/run-nodejs-16-ubi-base",
385385
},
386386
BuildDockerfileProps: BuildDockerfileProps,
387387
buildDockerfileExpectedNodejsVersion: 16,
@@ -393,7 +393,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
393393
"version-source": "BP_NODE_VERSION",
394394
},
395395
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
396-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-18",
396+
Source: "paketocommunity/run-nodejs-18-ubi-base",
397397
},
398398
BuildDockerfileProps: BuildDockerfileProps,
399399
buildDockerfileExpectedNodejsVersion: 18,
@@ -413,7 +413,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
413413
},
414414
},
415415
},
416-
Stack: "ubi8-paketo",
416+
Stack: "io.buildpacks.stacks.ubi8",
417417
})
418418

419419
Expect(err).NotTo(HaveOccurred())
@@ -457,7 +457,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
457457
"version-source": "BP_NODE_VERSION",
458458
},
459459
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
460-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-18",
460+
Source: "paketocommunity/run-nodejs-18-ubi-base",
461461
},
462462
BuildDockerfileProps: BuildDockerfileProps,
463463
buildDockerfileExpectedNodejsVersion: 18,
@@ -469,7 +469,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
469469
"version-source": "BP_NODE_VERSION",
470470
},
471471
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
472-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-18",
472+
Source: "paketocommunity/run-nodejs-18-ubi-base",
473473
},
474474
BuildDockerfileProps: BuildDockerfileProps,
475475
buildDockerfileExpectedNodejsVersion: 18,
@@ -489,7 +489,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
489489
},
490490
},
491491
},
492-
Stack: "ubi8-paketo",
492+
Stack: "io.buildpacks.stacks.ubi8",
493493
})
494494

495495
Expect(err).NotTo(HaveOccurred())
@@ -587,7 +587,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
587587
},
588588
},
589589
},
590-
Stack: "ubi8-paketo",
590+
Stack: "io.buildpacks.stacks.ubi8",
591591
})
592592

593593
Expect(err).To(HaveOccurred())
@@ -649,7 +649,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
649649
},
650650
},
651651
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
652-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-16",
652+
Source: "paketocommunity/run-nodejs-16-ubi-base",
653653
},
654654
},
655655
{
@@ -668,7 +668,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
668668
},
669669
},
670670
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
671-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-16",
671+
Source: "paketocommunity/run-nodejs-16-ubi-base",
672672
},
673673
},
674674
{
@@ -679,7 +679,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
679679
},
680680
},
681681
RunDockerfileProps: ubinodejsextension.RunDockerfileProps{
682-
Source: "paketo-buildpacks/ubi8-paketo-run-nodejs-16",
682+
Source: "paketocommunity/run-nodejs-16-ubi-base",
683683
},
684684
},
685685
}
@@ -692,7 +692,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
692692
Plan: packit.BuildpackPlan{
693693
Entries: tt.Entries,
694694
},
695-
Stack: "ubi8-paketo",
695+
Stack: "io.buildpacks.stacks.ubi8",
696696
})
697697

698698
Expect(err).NotTo(HaveOccurred())
@@ -733,7 +733,7 @@ func testGenerate(t *testing.T, context spec.G, it spec.S) {
733733
Plan: packit.BuildpackPlan{
734734
Entries: tt.Entries,
735735
},
736-
Stack: "ubi8-paketo",
736+
Stack: "io.buildpacks.stacks.ubi8",
737737
})
738738

739739
Expect(err).To(HaveOccurred())
@@ -769,15 +769,15 @@ description = "This extension installs the appropriate nodejs runtime via dnf"
769769
[[metadata.dependencies]]
770770
id = "node"
771771
name = "Ubi Node Extension"
772-
stacks = ["ubi8-paketo"]
773-
source = "paketo-buildpacks/ubi8-paketo-run-nodejs-18"
772+
stacks = ["io.buildpacks.stacks.ubi8"]
773+
source = "paketocommunity/run-nodejs-18-ubi-base"
774774
version = "18.1000"
775775
776776
[[metadata.dependencies]]
777777
id = "node"
778778
name = "Ubi Node Extension"
779-
stacks = ["ubi8-paketo"]
780-
source = "paketo-buildpacks/ubi8-paketo-run-nodejs-16"
779+
stacks = ["io.buildpacks.stacks.ubi8"]
780+
source = "paketocommunity/run-nodejs-16-ubi-base"
781781
version = "16.1000"
782782
`
783783
return fmt.Sprintf(template, version), nil

0 commit comments

Comments
 (0)