Skip to content

Instantly share code, notes, and snippets.

@sbose78
Created February 6, 2020 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbose78/4ff4d978a7385f3777581325776106c5 to your computer and use it in GitHub Desktop.
Save sbose78/4ff4d978a7385f3777581325776106c5 to your computer and use it in GitHub Desktop.
otavio's build & buildstrategy
---
kind: BuildStrategy
APIVersion: io.build.dev.redhat/v1alpha1
name: s2i
spec:
run: false
steps:
- name: s2i
image: registry.redhat.io/ocp_tools/s2i:latest
workingDir: /workspace/git
args:
- build
- .
- otaviof/nodejs-12-rhel7:latest ### Comes from Build.spec.builderImage
- otaviof/nodejs-ex:latest ### Comes from Build.spec.output
- --as-dockerfile=Dockerfile
- name: buildah
image: registry.redhat.io/redhat/buildah-stable:latest
workingDir: /workspace/git
args:
- buildah
- bud
- --tag="quay.io/otavio/my-cool-app:latest" ### Comes from Build.spec.output
- /workspace/git
# baseImage: otaviof/nodejs-12-rhel7:latest
# outputBaseImage: quay.io/redhat/ubi-jre-11:latest
# outputImage: otaviof/nodejs-ex:latest
---
apiVersion: build.dev/v1alpha1
kind: Build
metadata:
name: my-nodejs-app-build
spec:
strategy: s2i
builderImage: registry.redhat.io/redhat/nodejs-12-rhel7:latest
output: quay.io/otavio/my-cool-app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment