Skip to content

Commit 4096471

Browse files
authored
Merge branch 'main' into fix-link-image-extension
2 parents 96cc997 + 5f6b59d commit 4096471

File tree

14 files changed

+49
-72
lines changed

14 files changed

+49
-72
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install pack
2727
uses: buildpacks/github-actions/[email protected]
2828
with:
29-
pack-version: '0.28.0'
29+
pack-version: '0.30.0-rc1'
3030
- name: Test
3131
run: make test
3232
env:

content/docs/buildpack-author-guide/create-buildpack/adding-bill-of-materials.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ pack inspect-image test-ruby-app
2121
<!--+- "{{execute}}"+-->
2222
You should see the following:
2323

24-
<!-- test:assert=contains -->
24+
<!-- test:assert=contains;ignore-lines=... -->
2525
```text
2626
Run Images:
2727
cnbs/sample-stack-run:jammy
28+
...
2829
2930
Buildpacks:
3031
ID VERSION HOMEPAGE

content/docs/buildpack-author-guide/create-buildpack/building-blocks-cnb.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,12 @@ The `pack build` command takes in your Ruby sample app as the `--path` argument
116116

117117
After running the command, you should see that it failed to detect, as the `detect` script is currently written to simply error out.
118118

119-
<!-- test:assert=contains -->
119+
<!-- test:assert=contains;ignore-lines=... -->
120120
```
121121
===> DETECTING
122+
...
122123
err: examples/[email protected] (1)
124+
...
123125
ERROR: No buildpack groups passed detection.
124126
ERROR: failed to detect: buildpack(s) failed with err
125127
```

content/docs/buildpack-author-guide/create-buildpack/caching.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ it will download the gems:
256256
<!-- test:assert=contains;ignore-lines=... -->
257257
```text
258258
===> BUILDING
259+
...
259260
---> Ruby Buildpack
260261
---> Downloading and extracting Ruby
261262
---> Installing gems
@@ -274,6 +275,7 @@ you will see the new caching logic at work during the `BUILDING` phase:
274275
<!-- test:assert=contains;ignore-lines=... -->
275276
```text
276277
===> BUILDING
278+
...
277279
---> Ruby Buildpack
278280
---> Downloading and extracting Ruby
279281
---> Reusing gems

content/docs/buildpack-author-guide/create-buildpack/make-buildpack-configurable.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,10 @@ pack build test-ruby-app --path ./ruby-sample-app --buildpack ./ruby-buildpack
126126
127127
You will notice that version of Ruby specified in the app's `.ruby-version` file is downloaded.
128128
129-
<!-- test:assert=contains -->
129+
<!-- test:assert=contains;ignore-lines=... -->
130130
```text
131131
===> BUILDING
132+
...
132133
---> Ruby Buildpack
133134
---> Downloading and extracting Ruby 3.1.0
134135
```

content/docs/extension-guide/create-extension/build-dockerfile.md

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,52 +8,34 @@ aliases = [
88

99
<!-- test:suite=dockerfiles;weight=4 -->
1010

11-
### Examine `tree` extension
11+
### Examine `vim` extension
1212

1313
#### detect
1414

1515
<!-- test:exec -->
1616
```bash
17-
cat $PWD/samples/extensions/tree/bin/detect
17+
cat $PWD/samples/extensions/vim/bin/detect
1818
```
1919

20-
The extension always detects (because its exit code is `0`) and provides a dependency called `tree` by writing to the build plan.
20+
The extension always detects (because its exit code is `0`) and provides a dependency called `vim` by writing to the build plan.
2121

2222
#### generate
2323

2424
<!-- test:exec -->
2525
```bash
26-
cat $PWD/samples/extensions/tree/bin/generate
26+
cat $PWD/samples/extensions/vim/bin/generate
2727
```
2828

29-
The extension generates a `build.Dockerfile` that installs `tree` on the builder image.
30-
31-
### Re-create our builder with `hello-extensions` updated to require `tree`
32-
33-
Edit `$PWD/samples/buildpacks/hello-extensions/bin/detect` to uncomment the first set of lines that output `[[requires]]` to the build plan:
34-
35-
<!-- test:exec -->
36-
```bash
37-
sed -i "10,11s/#//" $PWD/samples/buildpacks/hello-extensions/bin/detect
38-
```
39-
40-
(On Mac, use `sed -i '' "10,11s/#//" $PWD/samples/buildpacks/hello-extensions/bin/detect`)
41-
42-
Re-create the builder:
43-
44-
<!-- test:exec -->
45-
```
46-
pack builder create localhost:5000/extensions-builder \
47-
--config $PWD/samples/builders/alpine/builder.toml \
48-
--publish
49-
```
29+
The extension generates a `build.Dockerfile` that installs `vim` on the builder image.
5030

5131
### Re-build the application image
5232

5333
<!-- test:exec -->
5434
```
5535
pack build hello-extensions \
5636
--builder localhost:5000/extensions-builder \
37+
--env BP_EXT_DEMO=1 \
38+
--env BP_REQUIRES=vim \
5739
--network host \
5840
--path $PWD/samples/apps/java-maven \
5941
--pull-policy always \
@@ -66,19 +48,19 @@ You should see:
6648

6749
```
6850
[detector] ======== Results ========
69-
[detector] pass: samples/tree@0.0.1
51+
[detector] pass: samples/vim@0.0.1
7052
[detector] pass: samples/[email protected]
7153
[detector] Resolving plan... (try #1)
72-
[detector] samples/tree 0.0.1
54+
[detector] samples/vim 0.0.1
7355
[detector] samples/hello-extensions 0.0.1
74-
[detector] Running generate for extension samples/tree@0.0.1
56+
[detector] Running generate for extension samples/vim@0.0.1
7557
...
76-
[extender] Found build Dockerfile for extension 'samples/tree'
77-
[extender] Applying the Dockerfile at /layers/generated/build/samples_tree/Dockerfile...
58+
[extender] Found build Dockerfile for extension 'samples/vim'
59+
[extender] Applying the Dockerfile at /layers/generated/build/samples_vim/Dockerfile...
7860
...
7961
[extender] Running build command
8062
[extender] ---> Hello Extensions Buildpack
81-
[extender] tree v1.8.0 (c) 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro
63+
[extender] vim v1.8.0 (c) 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro
8264
...
8365
Successfully built image hello-extensions
8466
```

content/docs/extension-guide/create-extension/building-blocks-extension.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ aliases = [
88

99
<!-- test:suite=dockerfiles;weight=3 -->
1010

11-
### Examine `tree` extension
11+
### Examine `vim` extension
1212

1313
<!-- test:exec -->
1414
```bash
15-
tree $PWD/samples/extensions/tree
15+
vim --help
1616
```
1717

1818
(That's right, we're using the very tool we will later be installing!) You should see something akin to the following:
@@ -44,7 +44,7 @@ tree $PWD/samples/extensions/tree
4444
the [spec](https://github.com/buildpacks/spec/blob/main/image_extension.md)
4545
for further details.
4646

47-
We'll take a closer look at the executables for the `tree` extension in the next step.
47+
We'll take a closer look at the executables for the `vim` extension in the next step.
4848

4949
<!--+ if false+-->
5050
---

content/docs/extension-guide/create-extension/run-dockerfile.md

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -45,27 +45,7 @@ Build the run image:
4545
```bash
4646
docker build \
4747
--file $PWD/samples/stacks/alpine/run/curl.Dockerfile \
48-
--tag run-image-curl .
49-
```
50-
51-
### Re-create our builder with `hello-extensions` updated to require `curl`
52-
53-
Edit `$PWD/samples/buildpacks/hello-extensions/bin/detect` to uncomment the second set of lines that output `[[requires]]` to the build plan:
54-
55-
<!-- test:exec -->
56-
```bash
57-
sed -i "14,15s/#//" $PWD/samples/buildpacks/hello-extensions/bin/detect
58-
```
59-
60-
(On Mac, use `sed -i '' "14,15s/#//" $PWD/samples/buildpacks/hello-extensions/bin/detect`)
61-
62-
Re-create the builder:
63-
64-
<!-- test:exec -->
65-
```bash
66-
pack builder create localhost:5000/extensions-builder \
67-
--config $PWD/samples/builders/alpine/builder.toml \
68-
--publish
48+
--tag localhost:5000/run-image-curl .
6949
```
7050

7151
### Re-build the application image
@@ -74,6 +54,8 @@ pack builder create localhost:5000/extensions-builder \
7454
```bash
7555
pack build hello-extensions \
7656
--builder localhost:5000/extensions-builder \
57+
--env BP_EXT_DEMO=1 \
58+
--env BP_REQUIRES=vim,curl \
7759
--path $PWD/samples/apps/java-maven \
7860
--pull-policy always \
7961
--network host \
@@ -86,26 +68,26 @@ You should see:
8668

8769
```
8870
[detector] ======== Results ========
89-
[detector] pass: samples/tree@0.0.1
71+
[detector] pass: samples/vim@0.0.1
9072
[detector] pass: samples/[email protected]
9173
[detector] pass: samples/[email protected]
9274
[detector] Resolving plan... (try #1)
93-
[detector] samples/tree 0.0.1
75+
[detector] samples/vim 0.0.1
9476
[detector] samples/curl 0.0.1
9577
[detector] samples/hello-extensions 0.0.1
96-
[detector] Running generate for extension samples/tree@0.0.1
78+
[detector] Running generate for extension samples/vim@0.0.1
9779
...
9880
[detector] Running generate for extension samples/[email protected]
9981
...
10082
[detector] Checking for new run image
10183
[detector] Found a run.Dockerfile configuring image 'run-image-curl' from extension with id 'samples/curl'
10284
...
103-
[extender] Found build Dockerfile for extension 'samples/tree'
104-
[extender] Applying the Dockerfile at /layers/generated/build/samples_tree/Dockerfile...
85+
[extender] Found build Dockerfile for extension 'samples/vim'
86+
[extender] Applying the Dockerfile at /layers/generated/build/samples_vim/Dockerfile...
10587
...
10688
[extender] Running build command
10789
[extender] ---> Hello Extensions Buildpack
108-
[extender] tree v1.8.0 (c) 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro
90+
[extender] vim v1.8.0 (c) 1996 - 2018 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro
10991
...
11092
Successfully built image hello-extensions
11193
```
@@ -123,16 +105,16 @@ You should see something akin to:
123105
curl 7.85.0-DEV (x86_64-pc-linux-musl) ... more stuff here ...
124106
```
125107

126-
What happened: now that `hello-extensions` requires both `tree` and `curl` in its build plan, both extensions are
108+
What happened: now that `hello-extensions` requires both `vim` and `curl` in its build plan, both extensions are
127109
included in the build and provide the needed dependencies for build and launch, respectively
128-
* The `tree` extension installs `tree` at build time, as before
110+
* The `vim` extension installs `vim` at build time, as before
129111
* The `curl` extension switches the run image to `run-image-curl`, which has `curl` installed
130112

131113
Now our `curl` process can succeed!
132114

133115
## What's next?
134116

135-
The `tree` and `curl` examples are very simple, but we can unlock powerful new features with this functionality.
117+
The `vim` and `curl` examples are very simple, but we can unlock powerful new features with this functionality.
136118

137119
Platforms could have several run images available, each tailored to a specific language family, thus limiting the number
138120
of installed dependencies for each image to the minimum necessary to support the targeted language. Image extensions

content/docs/extension-guide/create-extension/why-dockerfiles.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ Run `pack build` (note that the "source" directory is effectively ignored in our
6060
```
6161
pack build hello-extensions \
6262
--builder localhost:5000/extensions-builder \
63+
--env BP_EXT_DEMO=1 \
6364
--network host \
6465
--path $PWD/samples/apps/java-maven \
6566
--pull-policy always \

content/docs/operator-guide/create-a-stack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Before we get started, make sure you've got the following installed:
1616

1717
## Creating a custom stack
1818

19-
In this tutorial we will create a sample stack based on `Ubuntu Bionic`. To create a custom stack, we need to create customized build and run images. Let's see how we can do so!
19+
In this tutorial we will create a sample stack based on `Ubuntu Jammy Jellyfish`. To create a custom stack, we need to create customized build and run images. Let's see how we can do so!
2020

2121

2222
### Create a common base image

0 commit comments

Comments
 (0)