Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for contextDir in S2I strategy #760

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ metadata:
name: s2i-nodejs-build
spec:
source:
url: https://github.com/sclorg/nodejs-ex
url: https://github.com/shipwright-io/sample-nodejs
contextDir: source-build/
strategy:
name: source-to-image
kind: ClusterBuildStrategy
Expand All @@ -220,7 +221,8 @@ metadata:
name: s2i-nodejs-build
spec:
source:
url: https://github.com/sclorg/nodejs-ex
url: https://github.com/shipwright-io/sample-nodejs
contextDir: source-build/
strategy:
name: source-to-image
kind: ClusterBuildStrategy
Expand All @@ -239,7 +241,8 @@ metadata:
name: s2i-nodejs-build
spec:
source:
url: https://github.com/sclorg/nodejs-ex
url: https://github.com/shipwright-io/sample-nodejs
contextDir: source-build/
strategy:
name: source-to-image
kind: ClusterBuildStrategy
Expand Down
6 changes: 2 additions & 4 deletions samples/build/build_source-to-image_cr.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
---
# TODO: The source-to-image Strategy does not support contextDir, therefore
# we are not adding a reference to https://github.com/shipwright-io/sample-nodejs
# with the /source-build contextDir in this sample.
apiVersion: shipwright.io/v1alpha1
kind: Build
metadata:
name: s2i-nodejs-build
spec:
source:
url: https://github.com/sclorg/nodejs-ex
url: https://github.com/shipwright-io/sample-nodejs
contextDir: source-build/
strategy:
name: source-to-image
kind: ClusterBuildStrategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
workingDir: $(params.shp-source-root)
args:
- build
- .
- $(params.shp-source-context)
- $(build.builder.image)
- $(params.shp-output-image)
- --as-dockerfile=/s2i/Dockerfile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
- command:
- /usr/local/bin/s2i
- build
- .
- $(params.shp-source-context)
- $(build.builder.image)
- '--as-dockerfile'
- /gen-source/Dockerfile.gen
Expand Down