Skip to content

Commit 6362115

Browse files
Merge pull request #69 from HeavyWombat/patch-1
Update one-off build SHIP
2 parents 90707ce + 089dc24 commit 6362115

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

ships/0029-one-off-builds.md

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ status: provisional
2424

2525
## Release Signoff Checklist
2626

27-
- [ ] Enhancement is `implementable`
27+
- [X] Enhancement is `implementable`
2828
- [ ] Design details are appropriately documented from clear requirements
2929
- [ ] Test plan is defined
3030
- [ ] Graduation criteria for dev preview, tech preview, DA
@@ -84,16 +84,16 @@ metadata:
8484
generateName: buildpack-nodejs-buildrun-
8585
spec:
8686
buildSpec:
87-
source:
88-
url: https://github.com/shipwright-io/sample-nodejs
89-
contextDir: source-build
90-
strategy:
91-
name: buildpacks-v3
92-
kind: ClusterBuildStrategy
93-
output:
94-
image: docker.io/${REGISTRY_ORG}/sample-nodejs:latest
95-
credentials:
96-
name: push-secret
87+
source:
88+
url: https://github.com/shipwright-io/sample-nodejs
89+
contextDir: source-build
90+
strategy:
91+
name: buildpacks-v3
92+
kind: ClusterBuildStrategy
93+
output:
94+
image: docker.io/${REGISTRY_ORG}/sample-nodejs:latest
95+
credentials:
96+
name: push-secret
9797
```
9898
9999
When an embedded specification is invalid, we propose not to start a `TaskRun`. Instead, the buildrun should be set
@@ -118,24 +118,24 @@ So the following examples are invalid resource definitions:
118118
apiVersion: shipwright.io/v1alpha1
119119
kind: BuildRun
120120
metadata:
121-
generateName: buildpack-nodejs-buildrun-
121+
generateName: buildpack-nodejs-buildrun-
122122
spec:
123-
buildRef:
124-
name: buildpack-nodejs-build
125-
buildSpec:
126-
...
123+
buildRef:
124+
name: buildpack-nodejs-build
125+
buildSpec:
126+
...
127127
```
128128

129129
```yaml
130130
apiVersion: shipwright.io/v1alpha1
131131
kind: BuildRun
132132
metadata:
133-
generateName: buildpack-nodejs-buildrun-
133+
generateName: buildpack-nodejs-buildrun-
134134
spec:
135-
output:
136-
image: my-user/nodejs-build
137-
buildSpec:
138-
...
135+
output:
136+
image: my-user/nodejs-build
137+
buildSpec:
138+
...
139139
```
140140

141141
### User Stories
@@ -164,12 +164,14 @@ The proposal adds the new optional field `buildSpec` to the `BuildRun` resource
164164
```go
165165
type BuildRunSpec struct {
166166
// BuildSpec refers to an embedded build specification
167-
// + optional
168-
BuildSpec BuildSpec `json:"buildSpec,omitempty"`
167+
//
168+
// +optional
169+
BuildSpec *BuildSpec `json:"buildSpec,omitempty"`
169170

170-
// BuildRef refers to the Build.
171+
// BuildRef refers to the Build
172+
//
171173
// +optional
172-
BuildRef BuildRef `json:"buildRef,omitempty"`
174+
BuildRef *BuildRef `json:"buildRef,omitempty"`
173175

174176
...
175177
}

0 commit comments

Comments
 (0)