Created
April 30, 2020 13:51
-
-
Save sub-mod/023297c305a8881831b5c7738914a0d8 to your computer and use it in GitHub Desktop.
buildah.yml
This file contains 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: ClusterTask | |
metadata: | |
name: od-buildah | |
spec: | |
inputs: | |
params: | |
- name: BUILDER_IMAGE | |
description: The location of the buildah builder image. | |
default: quay.io/buildah/stable:v1.11.0 | |
- name: DOCKERFILE | |
description: Path to the Dockerfile to build. | |
default: object_detection/Dockerfile | |
- name: TLSVERIFY | |
description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) | |
default: "false" | |
resources: | |
- name: source | |
type: git | |
outputs: | |
resources: | |
- name: image | |
type: image | |
steps: | |
- name: build | |
image: $(inputs.params.BUILDER_IMAGE) | |
workingDir: /workspace/source | |
volumeMounts: | |
- name: varlibcontainers | |
mountPath: /var/lib/containers | |
# - name: secret-entitlement | |
# mountPath: /etc/pki/entitlement | |
# readOnly: true | |
command: ["buildah", "bud", '--tls-verify=$(inputs.params.TLSVERIFY)', '--layers', '-f', '$(inputs.params.DOCKERFILE)', '-t', '$(outputs.resources.image.url)', '.'] | |
securityContext: | |
privileged: true | |
- name: push | |
image: $(inputs.params.BUILDER_IMAGE) | |
workingDir: /workspace/source | |
volumeMounts: | |
- name: varlibcontainers | |
mountPath: /var/lib/containers | |
command: ['buildah', 'push', '--tls-verify=$(inputs.params.TLSVERIFY)', '$(outputs.resources.image.url)', 'docker://$(outputs.resources.image.url)'] | |
securityContext: | |
privileged: true | |
volumes: | |
- name: varlibcontainers | |
emptyDir: {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment