Last active
July 18, 2019 19:09
-
-
Save lance/4641d53e8928f5c8e0c20384bd5db6c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: tekton.dev/v1alpha1 | |
kind: Task | |
metadata: | |
name: deploy-webapp | |
spec: | |
inputs: | |
resources: | |
- name: source | |
type: git | |
params: | |
- name: BUILDER_IMAGE | |
description: The location of the s2i builder image | |
- name: PATH_CONTEXT | |
description: The location of the build output | |
default: build | |
- name: TLSVERIFY | |
description: Verify the TLS on the registry endpoint | |
default: "true" | |
outputs: | |
resources: | |
- name: runtimeimage | |
type: image | |
steps: | |
- name: generate | |
image: quay.io/openshift-pipeline/s2i | |
workingdir: /workspace/source | |
command: ['s2i', 'build', '${inputs.params.PATH_CONTEXT}', '${inputs.params.BUILDER_IMAGE}', '--as-dockerfile', '/gen-source/Dockerfile.gen'] | |
volumeMounts: | |
- name: gen-source | |
mountPath: /gen-source | |
- name: build | |
image: quay.io/buildah/stable | |
workingdir: /gen-source | |
command: ['buildah', 'bud', '--tls-verify=${inputs.params.TLSVERIFY}', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '${outputs.resources.runtimeimage.url}', '.'] | |
volumeMounts: | |
- name: varlibcontainers | |
mountPath: /var/lib/containers | |
- name: gen-source | |
mountPath: /gen-source | |
securityContext: | |
privileged: true | |
- name: push | |
image: quay.io/buildah/stable | |
command: ['buildah', 'push', '--tls-verify=${inputs.params.TLSVERIFY}', '${outputs.resources.runtimeimage.url}', 'docker://${outputs.resources.runtimeimage.url}'] | |
volumeMounts: | |
- name: varlibcontainers | |
mountPath: /var/lib/containers | |
securityContext: | |
privileged: true | |
volumes: | |
- name: varlibcontainers | |
emptyDir: {} | |
- name: gen-source | |
emptyDir: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment