Skip to content

Commit e4aabf2

Browse files
author
Natalie Arellano
committed
Merge branch 'main' into runext/demo
2 parents 22e964e + 8709636 commit e4aabf2

File tree

21 files changed

+171
-59
lines changed

21 files changed

+171
-59
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Install Dependencies
2525
run: sudo apt-get install make curl jq
2626
- name: Install pack
27-
uses: buildpacks/github-actions/setup-pack@v5.0.1
27+
uses: buildpacks/github-actions/setup-pack@v5.2.0
2828
with:
2929
pack-version: '0.28.0'
3030
- name: Test

content/docs/app-developer-guide/specify-buildpacks.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,25 @@ pack build sample-java-maven-app \
5454

5555
## Using a Project Descriptor
5656

57-
The [`project.toml`][project-toml] format allows for Buildpack URIs to be specified in the `[[build.buildpacks]]` table with the `uri` key.
57+
The [`project.toml`][project-toml] format allows for Buildpack URIs to be specified in the `[[io.buildpacks.group]]` table with the `uri` key.
5858

5959
##### Example:
6060

6161
```toml
62-
[project]
62+
[_]
63+
schema-version = "0.3"
6364
id = "sample-java-maven-app"
6465
name = "Sample Java App"
6566
version = "1.0.0"
6667

67-
[[build.buildpacks]]
68+
[[io.buildpacks.group]]
6869
uri = "samples/java-maven"
6970

70-
[[build.buildpacks]]
71+
[[io.buildpacks.group]]
7172
uri = "samples/buildpacks/hello-processes/"
7273

73-
[[build.buildpacks]]
74-
uri = "docker://cnbs/sample-package:hello-univers"
74+
[[io.buildpacks.group]]
75+
uri = "docker://cnbs/sample-package:hello-universe"
7576
```
7677

7778
## URI Examples

content/docs/app-developer-guide/using-inline-buildpacks.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,23 @@ summary="Learn how to create an ephemeral buildpack to customize your build."
66

77
You can supplement your app's build process with custom scripts by creating an _inline buildpack_. An inline buildpack is an ephemeral buildpack that's defined in your [project descriptor][project-toml] (i.e. `project.toml`). You can include a script to run as part of the build without setting up all the files and directories that are required for a complete buildpack.
88

9-
Inline buildpacks are defined as an entry in the `[[build.buildpacks]]` table of the project descriptor by including an `inline` script in the `[build.buildpacks.script]` table.
9+
Inline buildpacks are defined as an entry in the `[[io.buildpacks.group]]` table of the project descriptor by including an `inline` script in the `[io.buildpacks.group.script]` table.
1010

1111
For example, you may want to run a Rake task against a Ruby app after the Ruby buildpack builds your app.
1212

1313
```toml
14-
[project]
14+
[_]
15+
schema-version = "0.2"
1516
id = "io.buildpacks.my-app"
1617

17-
[[build.buildpacks]]
18+
[[io.buildpacks.group]]
1819
id = "example/ruby"
1920
version = "1.0"
2021

21-
[[build.buildpacks]]
22+
[[io.buildpacks.group]]
2223
id = "me/rake-tasks"
2324

24-
[build.buildpacks.script]
25+
[io.buildpacks.group.script]
2526
api = "0.6"
2627
inline = "rake package"
2728
```
@@ -33,10 +34,10 @@ In this example, the `me/rake-tasks` inline buildpack is configured to run after
3334
Inline buildpacks aren't constrained to a single command, however. You can define complex scripts as [heredocs](https://toml.io/en/v1.0.0#string) in your project descriptor. For example, this snippet of a descriptor will source a shell script contained in the app repo, use it to modify the app directory (and thus the files that go into the final image), and create slices for the app:
3435

3536
```toml
36-
[[build.buildpacks]]
37+
[[io.buildpacks.group]]
3738
id = "me/cleanup"
3839

39-
[build.buildpacks.script]
40+
[io.buildpacks.group.script]
4041
api = "0.9"
4142
inline = """
4243
set -e

content/docs/app-developer-guide/using-project-descriptor.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ Note the `include` and `exclude` sections in the below `project.toml` file use `
1919
file at the root of the application. For more on `gitignore` matching see [these docs](https://linuxize.com/post/gitignore-ignoring-files-in-git/#literal-file-names).
2020

2121
```toml
22-
[project]
22+
[_]
2323
id = "io.buildpacks.bash-script"
2424
name = "Bash Script"
2525
version = "1.0.0"
2626

27-
[build]
27+
[io.buildpacks]
2828
exclude = [
2929
"/README.md",
3030
"bash-script-buildpack"
3131
]
3232

3333
include = []
3434

35-
[[build.buildpacks]]
35+
[[io.buildpacks.group]]
3636
uri = "bash-script-buildpack/"
3737
```
3838

@@ -67,24 +67,24 @@ understand the environment), we would want to add it to our `project.toml`.
6767
Below is an expanded `project.toml`, with an additional buildpack and environment variable included.
6868

6969
```toml
70-
[project]
70+
[_]
7171
id = "io.buildpacks.bash-script"
7272
name = "Bash Script"
7373
version = "1.0.0"
7474

75-
[build]
75+
[io.buildpacks]
7676
exclude = [
7777
"README.md",
7878
"bash-script-buildpack"
7979
]
80-
[[build.buildpacks]]
80+
[[io.buildpacks.group]]
8181
uri = "../../buildpacks/hello-world/"
8282

8383

84-
[[build.buildpacks]]
84+
[[io.buildpacks.group]]
8585
uri = "bash-script-buildpack/"
8686

87-
[[build.env]]
87+
[[io.buildpacks.build.env]]
8888
name='HELLO'
8989
value='WORLD'
9090
```

content/docs/buildpack-author-guide/publishing-with-github-actions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ jobs:
4141
registry: docker.io
4242
username: ${{ secrets.DOCKER_HUB_USER }}
4343
password: ${{ secrets.DOCKER_HUB_PASS }}
44+
- id: setup-tools
45+
uses: buildpacks/github-actions/[email protected]
4446
- id: setup-pack
45-
uses: buildpacks/github-actions/setup-pack@v4.9.0
47+
uses: buildpacks/github-actions/setup-pack@v5.1.0
4648
- id: package
4749
run: |
4850
#!/usr/bin/env bash
@@ -59,7 +61,7 @@ jobs:
5961
env:
6062
REPO: docker.io/${{ secrets.DOCKER_HUB_USER }}
6163
- id: register
62-
uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:4.9.0
64+
uses: docker://ghcr.io/buildpacks/actions/registry/request-add-entry:5.1.0
6365
with:
6466
token: ${{ secrets.PUBLIC_REPO_TOKEN }}
6567
id: ${{ steps.package.outputs.bp_id }}

content/docs/extension-author-guide/_index.md

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
+++
2+
title="Extension Guide"
3+
weight=4
4+
include_summaries=true
5+
expand=true
6+
aliases=[
7+
"/docs/create-extension/",
8+
"/docs/create-author-extension/"
9+
]
10+
+++
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
+++
2+
title="Consume an extension"
3+
weight=4
4+
summary="A few notes to help you consume extensions"
5+
aliases = [
6+
"/docs/extension-author-guide/create-extension"
7+
]
8+
+++
9+
10+
<!--+if false+-->
11+
## Prerequisites
12+
13+
Before we get started, make sure you've got the following installed:
14+
15+
{{< download-button href="https://store.docker.com/search?type=edition&offering=community" color="blue" >}} Install Docker {{</>}}
16+
{{< download-button href="/docs/install-pack" color="pink" >}} Install pack {{</>}}
17+
18+
You may also need to [create an extension](/docs/extension-guide/create-extension) so that you can consume it.
19+
20+
## Overview
21+
<!--+end+-->
22+
23+
This is a few notes for using CNB image extensions.
24+
25+
- [consume in your builder](/docs/extension-guide/consume-extension/in-builder)
26+
- [consume via pack build](/docs/extension-guide/consume-extension/from-cli)
27+
28+
<!--+if false+-->
29+
---
30+
31+
<a href="/docs/extension-guide/consume-extension/in-builder" class="button bg-pink">Start Tutorial</a>
32+
<!--+end+-->
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
+++
2+
title="Specifying an Image Extension at Build Time"
3+
weight=405
4+
+++
5+
6+
<!-- test:suite=dockerfiles;weight=5 -->
7+
8+
### Specifying an Image Extension at Build Time
9+
10+
No builder can be truly omniscient, and whoever did yours surely was no exception! You need to add a little extra spice to the mix with this late-breaking extension, by doing something like:
11+
12+
`pack build [...] --extension=foo [...]`
13+
14+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
+++
2+
title="Specifying an Image Extension in the Builder"
3+
weight=405
4+
+++
5+
6+
<!-- test:suite=dockerfiles;weight=5 -->
7+
8+
### Specifying an Image Extension in the Builder
9+
10+
You're pretty sharp, and you know what your buildpack users will need.
11+
That's why you're going to add something similar to the following lines directly to `builder.toml`:
12+
13+
```
14+
[[order-extensions]]
15+
[[order-extensions.group]]
16+
id = "foo"
17+
version = "0.0.1"
18+
19+
[[extensions]]
20+
id = "foo"
21+
version = "0.0.1"
22+
uri = "/local/path/to/extension/foo" # can be relative or absolute
23+
```
24+
25+

0 commit comments

Comments
 (0)