Skip to content

Commit

Permalink
task-containers: Auto-update tekton tasks resources\n\nURL: https://g…
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions authored and openshift-merge-bot[bot] committed Oct 2, 2024
1 parent 843ea54 commit 9e5c968
Show file tree
Hide file tree
Showing 10 changed files with 1,825 additions and 0 deletions.
172 changes: 172 additions & 0 deletions tasks/task-buildah/0.4.2/task-buildah.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
---
# Source: task-containers/templates/task-buildah.yaml
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: buildah
labels:
app.kubernetes.io/version: 0.4.2
annotations:
tekton.dev/source: "https://github.com/openshift-pipelines/task-containers"
artifacthub.io/category: integration-delivery
artifacthub.io/maintainers: |
- name: OpenShift Pipeline task maintainers
email: [email protected]
artifacthub.io/provider: Red Hat
artifacthub.io/recommendations: |
- url: https://tekton.dev/
tekton.dev/categories: containers
tekton.dev/pipelines.minVersion: 0.41.0
tekton.dev/tags: containers
spec:
description: |
Buildah task builds source into a container image and
then pushes it to a container registry.
workspaces:
- name: source
optional: false
description: |
Container build context, like for instnace a application source code
followed by a `Dockerfile`.
- name: dockerconfig
description: >-
An optional workspace that allows providing a .docker/config.json file
for Buildah to access the container registry.
The file should be placed at the root of the Workspace with name config.json
or .dockerconfigjson.
optional: true
- name: rhel-entitlement
description: >-
An optional workspace that allows providing the entitlement keys
for Buildah to access subscription. The mounted workspace contains
entitlement.pem and entitlement-key.pem.
optional: true
mountPath: /tmp/entitlement
params:
- name: IMAGE
type: string
description: |
Fully qualified container image name to be built by buildah.
- name: DOCKERFILE
type: string
default: ./Dockerfile
description: |
Path to the `Dockerfile` (or `Containerfile`) relative to the `source` workspace.
- name: BUILD_ARGS
type: array
default:
- ""
description: |
Dockerfile build arguments, array of key=value
- name: CONTEXT
type: string
default: "."
description: |
Path to the directory to use as context.
- name: STORAGE_DRIVER
type: string
default: vfs
description: |
Set buildah storage driver to reflect the currrent cluster node's
settings.
- name: FORMAT
description: The format of the built container, oci or docker
default: "oci"
- name: BUILD_EXTRA_ARGS
type: string
default: ""
description: |
Extra parameters passed for the build command when building images.
- name: PUSH_EXTRA_ARGS
type: string
default: ""
description: |
Extra parameters passed for the push command when pushing images.
- name: SKIP_PUSH
default: "false"
description: |
Skip pushing the image to the container registry.
- name: TLS_VERIFY
type: string
default: "true"
description: |
Sets the TLS verification flag, `true` is recommended.
- name: VERBOSE
type: string
default: "false"
description: |
Turns on verbose logging, all commands executed will be printed out.
results:
- name: IMAGE_URL
description: |
Fully qualified image name.
- name: IMAGE_DIGEST
description: |
Digest of the image just built.
stepTemplate:
env:

- name: PARAMS_IMAGE
value: "$(params.IMAGE)"
- name: PARAMS_CONTEXT
value: "$(params.CONTEXT)"
- name: PARAMS_DOCKERFILE
value: "$(params.DOCKERFILE)"
- name: PARAMS_FORMAT
value: "$(params.FORMAT)"
- name: PARAMS_STORAGE_DRIVER
value: "$(params.STORAGE_DRIVER)"
- name: PARAMS_BUILD_EXTRA_ARGS
value: "$(params.BUILD_EXTRA_ARGS)"
- name: PARAMS_PUSH_EXTRA_ARGS
value: "$(params.PUSH_EXTRA_ARGS)"
- name: PARAMS_SKIP_PUSH
value: "$(params.SKIP_PUSH)"
- name: PARAMS_TLS_VERIFY
value: "$(params.TLS_VERIFY)"
- name: PARAMS_VERBOSE
value: "$(params.VERBOSE)"
- name: WORKSPACES_SOURCE_BOUND
value: "$(workspaces.source.bound)"
- name: WORKSPACES_SOURCE_PATH
value: "$(workspaces.source.path)"
- name: WORKSPACES_DOCKERCONFIG_BOUND
value: "$(workspaces.dockerconfig.bound)"
- name: WORKSPACES_DOCKERCONFIG_PATH
value: "$(workspaces.dockerconfig.path)"
- name: WORKSPACES_RHEL_ENTITLEMENT_BOUND
value: "$(workspaces.rhel-entitlement.bound)"
- name: WORKSPACES_RHEL_ENTITLEMENT_PATH
value: "$(workspaces.rhel-entitlement.path)"
- name: RESULTS_IMAGE_URL_PATH
value: "$(results.IMAGE_URL.path)"
- name: RESULTS_IMAGE_DIGEST_PATH
value: "$(results.IMAGE_DIGEST.path)"

steps:
- name: build
image: registry.access.redhat.com/ubi8/buildah:8.10-5
workingDir: $(workspaces.source.path)
args:
- $(params.BUILD_ARGS[*])
script: |
set -e
printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIERvY2tlcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVSfSIgXAogICAgICAgIC0tdGxzLXZlcmlmeT0iJHtQQVJBTVNfVExTX1ZFUklGWX0iIFwKICAgICAgICAkeyp9Cn0KCiMKIyBQcmVwYXJlCiMKCiMgbWFraW5nIHN1cmUgdGhlIHJlcXVpcmVkIHdvcmtzcGFjZSAic291cmNlIiBpcyBib3VuZGVkLCB3aGljaCBtZWFucyBpdHMgdm9sdW1lIGlzIGN1cnJlbnRseSBtb3VudGVkCiMgYW5kIHJlYWR5IHRvIHVzZQpwaGFzZSAiSW5zcGVjdGluZyBzb3VyY2Ugd29ya3NwYWNlICcke1dPUktTUEFDRVNfU09VUkNFX1BBVEh9JyAoUFdEPScke1BXRH0nKSIKW1sgIiR7V09SS1NQQUNFU19TT1VSQ0VfQk9VTkR9IiAhPSAidHJ1ZSIgXV0gJiYKICAgIGZhaWwgIldvcmtzcGFjZSAnc291c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2V0IC14CmZpCg==" |base64 -d >"/scripts/buildah-common.sh"
printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1aXJlZF92YXJzW0BdfTsgZG8KICAgICAgICBbWyAteiAiJHshdn0iIF1dICYmCiAgICAgICAgICAgIGZhaWwgIicke3Z9JyBlbnZpcm9ubWVudCB2YXJpYWJsZSBpcyBub3Qgc2V0ISIKICAgIGRvbmUKCiAgICByZXR1cm4gMAp9Cg==" |base64 -d >"/scripts/common.sh"
ls /scripts/buildah-*.sh;
chmod +x /scripts/buildah-*.sh;echo "Running Script /scripts/buildah-bud.sh";
/scripts/buildah-bud.sh;
securityContext:
capabilities:
add: ["SETFCAP"]
volumeMounts:
- name: scripts-dir
mountPath: /scripts

volumes:
- name: scripts-dir
emptyDir: {}
Loading

0 comments on commit 9e5c968

Please sign in to comment.