-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from openshift-pipelines/update-experimental
Experimental catalog changes
- Loading branch information
Showing
20 changed files
with
2,378 additions
and
0 deletions.
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
experimental/tmp/task-containers-0.1.0/release/tasks/task-buildah/v0.1.0/README.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
`Buildah` Tekton Task | ||
----------------------- | ||
|
||
# Abstract | ||
|
||
The `buildah` Task is meant to build [OCI][OCI] container images without the requirement of container runtime daemon like Docker daemon using [Buildah][Buildah], the Task results contain the image name and the SHA256 image digest. | ||
|
||
# Usage | ||
|
||
Please, consider the usage example below: | ||
|
||
```yaml | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: {} | ||
spec: | ||
pipelineRef: | ||
name: task-buildah | ||
params: | ||
- name: IMAGE | ||
value: your-image-name | ||
- name: TLS_VERIFY | ||
value: true | ||
- name: VERBOSE | ||
value: false | ||
workspaces: | ||
- name: source | ||
persistentVolumeClaim: | ||
claimName: your-pvc-name | ||
``` | ||
You'll need to replace `your-image-name` with the actual name of the image you want to build, and `your-pvc-name` with the name of the PersistentVolumeClaim where your source code is stored. | ||
In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: | ||
|
||
```bash | ||
kubectl create secret docker-registry imagestreams \ | ||
--docker-server="image-registry.openshift-image-registry.svc:5000" \ | ||
--docker-username="${REGISTRY_USERNAME}" \ | ||
--docker-password="${REGISTRY_TOKEN}" | ||
``` | ||
|
||
Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. | ||
|
||
## Workspace | ||
|
||
| Name | Optional | Description | | ||
| :------------ | :------------------------: | :--------------------------- | | ||
| `source` | `false` | Container build context, like for instnace a application source code followed by a `Containerfile`. | | ||
|
||
|
||
## Params | ||
|
||
| Param | Type | Default | Description | | ||
| :------------ | :------------------------: | :--------------------------- | :------------------------- | | ||
| `IMAGE` | `string` | (required) | Fully qualified source container image name, including tag, to be built by buildah. | | ||
| `CONTAINERFILE_PATH` | `string` | `Containerfile` | Path to the `Containerfile` (or `Dockerfile`) relative to the `source` workspace. | | ||
| `TLS_VERIFY` | `string` | `true` | Sets the TLS verification flags, `true` is recommended. | | ||
| `VERBOSE` | `string` | `false` | Shows a more verbose (debug) output. | | ||
| `SUBDIRECTORY` | `string` | `.` | Relative subdirectory to the `source` Workspace for the build-context. | | ||
| `STORAGE_DRIVER` | `string` | `overlay` | Set buildah storage driver to reflect the currrent cluster node's settings. | | ||
| `BUILD_EXTRA_ARGS` | `string` | `` | Extra parameters passed for the build command when building images. | | ||
| `PUSH_EXTRA_ARGS` | `string` | `` | Extra parameters passed for the push command when pushing images. | | ||
| `SKIP_PUSH` | `string` | `false` | Skip pushing the image to the container registry. | | ||
|
||
|
||
## Results | ||
|
||
| Result | Description | | ||
| :------------ | :------------------------- | | ||
| `IMAGE_URL` | Fully qualified image name. | | ||
| `IMAGE_DIGEST` | SHA256 digest of the image just built. | | ||
|
||
[tektonPipelineAuth]: https://tekton.dev/docs/pipelines/auth/#configuring-docker-authentication-for-docker | ||
[Buildah]: https://github.com/containers/buildah | ||
[OCI]: https://opencontainers.org/ | ||
|
136 changes: 136 additions & 0 deletions
136
experimental/tmp/task-containers-0.1.0/release/tasks/task-buildah/v0.1.0/task-buildah.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
--- | ||
# Source: task-containers/templates/task-buildah.yaml | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: buildah | ||
labels: | ||
app.kubernetes.io/version: 0.1.0 | ||
annotations: | ||
tekton.dev/categories: containers | ||
tekton.dev/pipelines.minVersion: 0.38.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 `Containerfile`. | ||
params: | ||
- name: IMAGE | ||
type: string | ||
description: | | ||
Fully qualified container image name to be built by buildah. | ||
- name: CONTAINERFILE_PATH | ||
type: string | ||
default: Containerfile | ||
description: | | ||
Path to the `Containerfile` (or `Dockerfile`) relative to the `source` workspace. | ||
- name: SUBDIRECTORY | ||
type: string | ||
default: "." | ||
description: | | ||
Relative subdirectory to the `source` Workspace for the build-context. | ||
- name: STORAGE_DRIVER | ||
type: string | ||
default: overlay | ||
description: | | ||
Set buildah storage driver to reflect the currrent cluster node's | ||
settings. | ||
- 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_SUBDIRECTORY | ||
value: "$(params.SUBDIRECTORY)" | ||
- name: PARAMS_CONTAINERFILE_PATH | ||
value: "$(params.CONTAINERFILE_PATH)" | ||
- 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: RESULTS_IMAGE_URL_PATH | ||
value: "$(results.IMAGE_URL.path)" | ||
- name: RESULTS_IMAGE_DIGEST_PATH | ||
value: "$(results.IMAGE_DIGEST.path)" | ||
|
||
steps: | ||
- name: load-scripts | ||
image: docker.io/library/bash:latest | ||
workingDir: /scripts | ||
script: | | ||
set -e | ||
printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT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Y2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9yZXRlZCBvbiB0aGUgZW52aXJvbm1lbnQKZnVuY3Rpb24gZXhwb3J0ZWRfb3JfZmFpbCgpIHsKICAgIGRlY2xhcmUgLWEgX3JlcXVpcmVkX3ZhcnM9IiR7QH0iCgogICAgZm9yIHYgaW4gJHtfcmVxdWlyZWRfdmFyc1tAXX07IGRvCiAgICAgICAgW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh | ||
chmod +x buildah-*.sh | ||
volumeMounts: | ||
- name: scripts-dir | ||
mountPath: /scripts | ||
|
||
- name: build | ||
image: registry.access.redhat.com/ubi8/buildah:latest | ||
workingDir: /workspace/source | ||
command: | ||
- /scripts/buildah-bud.sh | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- name: scripts-dir | ||
mountPath: /scripts | ||
|
||
volumes: | ||
- name: scripts-dir | ||
emptyDir: {} |
83 changes: 83 additions & 0 deletions
83
...mental/tmp/task-containers-0.1.0/release/tasks/task-s2i-dotnet/v0.1.0/README.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
Source-to-Image Tekton Tasks (`s2i`) | ||
------------------------------------ | ||
|
||
# Abstract | ||
|
||
Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. | ||
|
||
# `s2i` Builder Images | ||
|
||
This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. | ||
|
||
The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. | ||
|
||
The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: | ||
|
||
| Task Name | Builder Image Used | | ||
| ---------- | ---------------------------------------------------------------------- | | ||
| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | | ||
| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | | ||
| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | | ||
| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | | ||
| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | | ||
| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | | ||
| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | | ||
| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | | ||
|
||
In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. | ||
|
||
# Usage | ||
|
||
Please, consider the usage example below: | ||
|
||
```yaml | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: TaskRun | ||
metadata: {} | ||
spec: | ||
taskRef: | ||
name: s2i-python | ||
params: | ||
- name: IMAGE | ||
value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest | ||
``` | ||
In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: | ||
```bash | ||
kubectl create secret docker-registry imagestreams \ | ||
--docker-server="image-registry.openshift-image-registry.svc:5000" \ | ||
--docker-username="${REGISTRY_USERNAME}" \ | ||
--docker-password="${REGISTRY_TOKEN}" | ||
``` | ||
|
||
Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. | ||
|
||
## Workspaces | ||
|
||
All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. | ||
|
||
|
||
## Params | ||
|
||
| Param | Type | Default | Description | | ||
| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | | ||
| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | | ||
| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | | ||
| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | | ||
| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | | ||
| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | | ||
| settings. | | ||
| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | | ||
| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | | ||
| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | | ||
| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | | ||
| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | | ||
|
||
## Results | ||
|
||
| Result | Description | | ||
| ------------ | ------------------------------- | | ||
| IMAGE_URL | Fully qualified image name. | | ||
| IMAGE_DIGEST | Digest of the image just built. | |
Oops, something went wrong.