Skip to content

Commit 742d73b

Browse files
c0d1ngm0nk3ypbusko
andcommitted
Replace cnb: true with the lifecycle flag
Co-authored-by: Pavel Busko <[email protected]>
1 parent af14ffd commit 742d73b

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

toc/rfc/rfc-draft-cnb-lifecycle.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Introduce a new type of lifecycle type which indicates that Cloud Native Buildpa
7878
{
7979
"type": "cnb",
8080
"data": {
81-
"buildpacks": ["gcr.io/paketo-buildpacks/java"],
81+
"buildpacks": ["docker://gcr.io/paketo-buildpacks/java"],
8282
"stack": "cflinuxfs4"
8383
}
8484
}
@@ -88,29 +88,28 @@ Both, building and running an app will be based on the configured stack. If no s
8888

8989
#### CF CLI
9090

91-
New flag `[no-]cnb` will be introduced to the `cf push` command. The flag can not be combined with any ` --docker-*` commands. When the flag is set, CF CLI must set the lifecycle type to `cnb`.
91+
New flag `-lifecycle [buildpack|docker|cnb]` will be introduced to the `cf push` command.
9292

9393
#### App Manifest
9494

95-
New property `cnb: true|false` will be added to the App manifest.
95+
New property `lifecycle: buildpack|docker|cnb` will be added to the App manifest. It will default to `lifecycle: buildpack`. Using `docker-*` properties implies `lifecycle: docker`.
96+
The buildpack URL must start with one of the following schemas: `docker://`, `http://` or `https://`.
9697

9798
```yaml
9899
---
99100
applications:
100101
- name: test-app
101102
instances: 1
102-
cnb: true
103+
lifecycle: cnb
103104
buildpacks:
104-
- gcr.io/paketo-buildpacks/java
105+
- docker://gcr.io/paketo-buildpacks/java
105106
```
106107
107-
The `cnb` property cannot be present together with any of the `docker-*` properties. When the flag is set to `true`, the CF CLI must set the lifecycle type to `cnb`.
108-
109108
Both changes (CLI and manifest) were chosen because they are simple (from a user perspective), easy to implement and remove, if CNBs will become the standard lifecycle in future.
110109
111110
### Alternative APIs
112111
113-
- Instead of a binary switch, introduce a `buildpack-type` (`v2`/`v3` or `cf`/`cnb` or `classic`/`cnb`) to distinguish between different lifecycles
112+
- Instead of a lifecycle type switch, introduce a `buildpack-type` (`v2`/`v3` or `cf`/`cnb` or `classic`/`cnb`) to distinguish between different lifecycles.
114113

115114
#### Diego Release
116115

0 commit comments

Comments
 (0)