diff --git a/tasks/task-buildah/0.5.0/task-buildah.yaml b/tasks/task-buildah/0.5.0/task-buildah.yaml new file mode 100644 index 00000000..e4be460e --- /dev/null +++ b/tasks/task-buildah/0.5.0/task-buildah.yaml @@ -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.5.0 + 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: pipelines-extcomm@redhat.com + 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' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIERvY2tlcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVSfSIgXAogICAgICAgIC0tdGxzLXZlcmlmeT0iJHtQQVJBTVNfVExTX1ZFUklGWX0iIFwKICAgICAgICAkeyp9Cn0KCiMKIyBQcmVwYXJlCiMKCiMgbWFraW5nIHN1cmUgdGhlIHJlcXVpcmVkIHdvcmtzcGFjZSAic291cmNlIiBpcyBib3VuZGVkLCB3aGljaCBtZWFucyBpdHMgdm9sdW1lIGlzIGN1cnJlbnRseSBtb3VudGVkCiMgYW5kIHJlYWR5IHRvIHVzZQpwaGFzZSAiSW5zcGVjdGluZyBzb3VyY2Ugd29ya3NwYWNlICcke1dPUktTUEFDRVNfU09VUkNFX1BBVEh9JyAoUFdEPScke1BXRH0nKSIKW1sgIiR7V09SS1NQQUNFU19TT1VSQ0VfQk9VTkR9IiAhPSAidHJ1ZSIgXV0gJiYKICAgIGZhaWwgIldvcmtzcGFjZSAnc291cmNlJyBpcyBub3QgYm91bmRlZCIKCnBoYXNlICJBc3NlcnRpbmcgdGhlIGRvY2tlcmZpbGUvY29udGFpbmVyZmlsZ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Wt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+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: {} diff --git a/tasks/task-s2i-dotnet/0.5.0/task-s2i-dotnet.yaml b/tasks/task-s2i-dotnet/0.5.0/task-s2i-dotnet.yaml new file mode 100644 index 00000000..c61fef7e --- /dev/null +++ b/tasks/task-s2i-dotnet/0.5.0/task-s2i-dotnet.yaml @@ -0,0 +1,192 @@ +--- +# Source: task-containers/templates/task-s2i-dotnet.yaml +apiVersion: tekton.dev/v1 +kind: Task +metadata: + name: s2i-dotnet + labels: + app.kubernetes.io/version: 0.5.0 + 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: pipelines-extcomm@redhat.com + 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: | + Builds the source code using the s2i's dotnet builder-image + "image-registry.openshift-image-registry.svc:5000/openshift/dotnet". + + + workspaces: + - name: source + optional: false + description: | + Application source code, the build context for S2I workflow. + - name: dockerconfig + optional: true + 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. + + params: + - name: IMAGE + type: string + description: | + Fully qualified container image name to be built by s2i. + - name: VERSION + description: The tag of the imagestream for the corresponding language version + default: latest + type: string + - name: IMAGE_SCRIPTS_URL + type: string + default: image:///usr/libexec/s2i + description: | + Specify a URL containing the default assemble and run scripts for the builder image + - name: ENV_VARS + type: array + default: [] + description: | + Array containing string of Environment Variables as "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_VERSION + value: "$(params.VERSION)" + - name: PARAMS_IMAGE_SCRIPTS_URL + value: "$(params.IMAGE_SCRIPTS_URL)" + - name: PARAMS_CONTEXT + value: "$(params.CONTEXT)" + - 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: RESULTS_IMAGE_URL_PATH + value: "$(results.IMAGE_URL.path)" + - name: RESULTS_IMAGE_DIGEST_PATH + value: "$(results.IMAGE_DIGEST.path)" + + steps: + - name: s2i-generate + image: registry.access.redhat.com/source-to-image/source-to-image-rhel8:v1.3.9-6 + workingDir: $(workspaces.source.path) + env: + - name: S2I_BUILDER_IMAGE + value: "image-registry.openshift-image-registry.svc:5000/openshift/dotnet:$(params.VERSION)" + script: | + set -e + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIERvY2tlcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3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gp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1aXJlZF92YXJzW0BdfTsgZG8KICAgICAgICBbWyAteiAiJHshdn0iIF1dICYmCiAgICAgICAgICAgIGZhaWwgIicke3Z9JyBlbnZpcm9ubWVudCB2YXJpYWJsZSBpcyBub3Qgc2V0ISIKICAgIGRvbmUKCiAgICByZXR1cm4gMAp9Cg==" |base64 -d >"/scripts/common.sh" + ls /scripts/buildah-*.sh; + chmod +x /scripts/buildah-*.sh; + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1aXJlZF92YXJzW0BdfTsgZG8KICAgICAgICBbWyAteiAiJHshdn0iIF1dICYmCiAgICAgICAgICAgIGZhaWwgIicke3Z9JyBlbnZpcm9ubWVudCB2YXJpYWJsZSBpcyBub3Qgc2V0ISIKICAgI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ZG9ja2VyZmlsZSAiJHtTMklfRE9DS0VSRklMRX0iIFwKICAgICAgICAtLWVudmlyb25tZW50LWZpbGUgIiR7UzJJX0VOVklST05NRU5UX0ZJTEV9IgoKcGhhc2UgIkluc3BlY3RpbmcgdGhlIERvY2tlcmZpbGUgZ2VuZXJhdGVkIGF0ICcke1MySV9ET0NLRVJGSUxFfSciCltbICEgLWYgIiR7UzJJX0RPQ0tFUkZJTEV9IiBdXSAmJgogICAgZmFpbCAiR2VuZXJhdGVkIERvY2tlcmZpbGUgaXMgbm90IGZvdW5kISIKCnNldCAreApwaGFzZSAiR2VuZXJhdGVkIERvY2tlcmZpbGUgcGF5bG9hZCIKZWNobyAtZW4gIj4+PiAke1MySV9ET0NLRVJGSUxFfVxuJChjYXQgJHtTMklfRE9DS0VSRklMRX0pXG48PDwgRU9GXG4iCg==" |base64 -d >"/scripts/s2i-generate.sh" + ls /scripts/s2i-*.sh; + chmod +x /scripts/s2i-*.sh;echo "Running Script /scripts/s2i-generate.sh"; + /scripts/s2i-generate.sh; + args: + - "$(params.ENV_VARS[*])" + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + - name: s2i-build + image: registry.access.redhat.com/ubi8/buildah:8.10-5 + workingDir: /s2i-generate + command: + - /scripts/s2i-build.sh + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + volumes: + - name: scripts-dir + emptyDir: {} + - name: s2i-generate-dir + emptyDir: {} diff --git a/tasks/task-s2i-go/0.5.0/task-s2i-go.yaml b/tasks/task-s2i-go/0.5.0/task-s2i-go.yaml new file mode 100644 index 00000000..0f3990c9 --- /dev/null +++ b/tasks/task-s2i-go/0.5.0/task-s2i-go.yaml @@ -0,0 +1,192 @@ +--- +# Source: task-containers/templates/task-s2i-go.yaml +apiVersion: tekton.dev/v1 +kind: Task +metadata: + name: s2i-go + labels: + app.kubernetes.io/version: 0.5.0 + 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: pipelines-extcomm@redhat.com + 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: | + Builds the source code using the s2i's Golang builder-image + "image-registry.openshift-image-registry.svc:5000/openshift/golang". + + + workspaces: + - name: source + optional: false + description: | + Application source code, the build context for S2I workflow. + - name: dockerconfig + optional: true + 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. + + params: + - name: IMAGE + type: string + description: | + Fully qualified container image name to be built by s2i. + - name: VERSION + description: The tag of the imagestream for the corresponding language version + default: latest + type: string + - name: IMAGE_SCRIPTS_URL + type: string + default: image:///usr/libexec/s2i + description: | + Specify a URL containing the default assemble and run scripts for the builder image + - name: ENV_VARS + type: array + default: [] + description: | + Array containing string of Environment Variables as "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_VERSION + value: "$(params.VERSION)" + - name: PARAMS_IMAGE_SCRIPTS_URL + value: "$(params.IMAGE_SCRIPTS_URL)" + - name: PARAMS_CONTEXT + value: "$(params.CONTEXT)" + - 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: RESULTS_IMAGE_URL_PATH + value: "$(results.IMAGE_URL.path)" + - name: RESULTS_IMAGE_DIGEST_PATH + value: "$(results.IMAGE_DIGEST.path)" + + steps: + - name: s2i-generate + image: registry.access.redhat.com/source-to-image/source-to-image-rhel8:v1.3.9-6 + workingDir: $(workspaces.source.path) + env: + - name: S2I_BUILDER_IMAGE + value: "image-registry.openshift-image-registry.svc:5000/openshift/golang:$(params.VERSION)" + script: | + set -e + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIERvY2tlcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgL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LS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1aXJlZF92YXJzW0BdfTsgZG8KICAgICAgICBbWyAteiAiJHshdn0iIF1dICYmCiAgICAgICAgICAgIGZhaWwgIicke3Z9JyBlbnZpcm9ubWVudCB2YXJpYWJsZSBpcyBub3Qgc2V0ISIKICAgIGRvbmUKCiAgICByZXR1cm4gMAp9Cg==" |base64 -d >"/scripts/common.sh" + ls /scripts/buildah-*.sh; + chmod +x /scripts/buildah-*.sh; + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1aXJlZF92YXJzW0BdfTsgZG8KICAgICAgICBbWyAteiAiJHshdn0iIF1dICYmCiAgICAgICAgICAgIGZhaWwgIicke3Z9JyBlbnZpcm9ubWVudCB2YXJpYWJ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VVJMfSIgXAogICAgICAgIC0tYXMtZG9ja2VyZmlsZSAiJHtTMklfRE9DS0VSRklMRX0iIFwKICAgICAgICAtLWVudmlyb25tZW50LWZpbGUgIiR7UzJJX0VOVklST05NRU5UX0ZJTEV9IgoKcGhhc2UgIkluc3BlY3RpbmcgdGhlIERvY2tlcmZpbGUgZ2VuZXJhdGVkIGF0ICcke1MySV9ET0NLRVJGSUxFfSciCltbICEgLWYgIiR7UzJJX0RPQ0tFUkZJTEV9IiBdXSAmJgogICAgZmFpbCAiR2VuZXJhdGVkIERvY2tlcmZpbGUgaXMgbm90IGZvdW5kISIKCnNldCAreApwaGFzZSAiR2VuZXJhdGVkIERvY2tlcmZpbGUgcGF5bG9hZCIKZWNobyAtZW4gIj4+PiAke1MySV9ET0NLRVJGSUxFfVxuJChjYXQgJHtTMklfRE9DS0VSRklMRX0pXG48PDwgRU9GXG4iCg==" |base64 -d >"/scripts/s2i-generate.sh" + ls /scripts/s2i-*.sh; + chmod +x /scripts/s2i-*.sh;echo "Running Script /scripts/s2i-generate.sh"; + /scripts/s2i-generate.sh; + args: + - "$(params.ENV_VARS[*])" + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + - name: s2i-build + image: registry.access.redhat.com/ubi8/buildah:8.10-5 + workingDir: /s2i-generate + command: + - /scripts/s2i-build.sh + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + volumes: + - name: scripts-dir + emptyDir: {} + - name: s2i-generate-dir + emptyDir: {} diff --git a/tasks/task-s2i-java/0.5.0/task-s2i-java.yaml b/tasks/task-s2i-java/0.5.0/task-s2i-java.yaml new file mode 100644 index 00000000..80db0261 --- /dev/null +++ b/tasks/task-s2i-java/0.5.0/task-s2i-java.yaml @@ -0,0 +1,192 @@ +--- +# Source: task-containers/templates/task-s2i-java.yaml +apiVersion: tekton.dev/v1 +kind: Task +metadata: + name: s2i-java + labels: + app.kubernetes.io/version: 0.5.0 + 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: pipelines-extcomm@redhat.com + 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: | + Builds the source code using the s2i's Java builder-image + "image-registry.openshift-image-registry.svc:5000/openshift/java". + + + workspaces: + - name: source + optional: false + description: | + Application source code, the build context for S2I workflow. + - name: dockerconfig + optional: true + 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. + + params: + - name: IMAGE + type: string + description: | + Fully qualified container image name to be built by s2i. + - name: VERSION + description: The tag of the imagestream for the corresponding language version + default: latest + type: string + - name: IMAGE_SCRIPTS_URL + type: string + default: image:///usr/libexec/s2i + description: | + Specify a URL containing the default assemble and run scripts for the builder image + - name: ENV_VARS + type: array + default: [] + description: | + Array containing string of Environment Variables as "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_VERSION + value: "$(params.VERSION)" + - name: PARAMS_IMAGE_SCRIPTS_URL + value: "$(params.IMAGE_SCRIPTS_URL)" + - name: PARAMS_CONTEXT + value: "$(params.CONTEXT)" + - 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: RESULTS_IMAGE_URL_PATH + value: "$(results.IMAGE_URL.path)" + - name: RESULTS_IMAGE_DIGEST_PATH + value: "$(results.IMAGE_DIGEST.path)" + + steps: + - name: s2i-generate + image: registry.access.redhat.com/source-to-image/source-to-image-rhel8:v1.3.9-6 + workingDir: $(workspaces.source.path) + env: + - name: S2I_BUILDER_IMAGE + value: "image-registry.openshift-image-registry.svc:5000/openshift/java:$(params.VERSION)" + script: | + set -e + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIERvY2tlcmZpbGUuCiMKCnNob3B0IC1zIGluaGVy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2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1aXJlZF92YXJzW0BdfTsgZG8KICAgICAgICBbWyAteiAiJHshdn0iIF1dICYmCiAgICAgICAgICAgIGZhaWwgIicke3Z9JyBlbnZpcm9ubWVudCB2YXJpYWJsZSBpcyBub3Qgc2V0ISIKICAgIGRvbmUKCiAgICByZXR1cm4gMAp9Cg==" |base64 -d >"/scripts/common.sh" + ls /scripts/buildah-*.sh; + chmod +x /scripts/buildah-*.sh; + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1aXJlZF92YXJzW0BdfTsgZG8KICAgICAgICBbWyAteiAiJHshdn0iIF1dICYmCiAgICAgICAgICAgIGZhaWwgIicke3Z9JyBlbn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TX0lNQUdFX1NDUklQVFNfVVJMfSIgXAogICAgICAgIC0tYXMtZG9ja2VyZmlsZSAiJHtTMklfRE9DS0VSRklMRX0iIFwKICAgICAgICAtLWVudmlyb25tZW50LWZpbGUgIiR7UzJJX0VOVklST05NRU5UX0ZJTEV9IgoKcGhhc2UgIkluc3BlY3RpbmcgdGhlIERvY2tlcmZpbGUgZ2VuZXJhdGVkIGF0ICcke1MySV9ET0NLRVJGSUxFfSciCltbICEgLWYgIiR7UzJJX0RPQ0tFUkZJTEV9IiBdXSAmJgogICAgZmFpbCAiR2VuZXJhdGVkIERvY2tlcmZpbGUgaXMgbm90IGZvdW5kISIKCnNldCAreApwaGFzZSAiR2VuZXJhdGVkIERvY2tlcmZpbGUgcGF5bG9hZCIKZWNobyAtZW4gIj4+PiAke1MySV9ET0NLRVJGSUxFfVxuJChjYXQgJHtTMklfRE9DS0VSRklMRX0pXG48PDwgRU9GXG4iCg==" |base64 -d >"/scripts/s2i-generate.sh" + ls /scripts/s2i-*.sh; + chmod +x /scripts/s2i-*.sh;echo "Running Script /scripts/s2i-generate.sh"; + /scripts/s2i-generate.sh; + args: + - "$(params.ENV_VARS[*])" + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + - name: s2i-build + image: registry.access.redhat.com/ubi8/buildah:8.10-5 + workingDir: /s2i-generate + command: + - /scripts/s2i-build.sh + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + volumes: + - name: scripts-dir + emptyDir: {} + - name: s2i-generate-dir + emptyDir: {} diff --git a/tasks/task-s2i-nodejs/0.5.0/task-s2i-nodejs.yaml b/tasks/task-s2i-nodejs/0.5.0/task-s2i-nodejs.yaml new file mode 100644 index 00000000..620485f9 --- /dev/null +++ b/tasks/task-s2i-nodejs/0.5.0/task-s2i-nodejs.yaml @@ -0,0 +1,192 @@ +--- +# Source: task-containers/templates/task-s2i-nodejs.yaml +apiVersion: tekton.dev/v1 +kind: Task +metadata: + name: s2i-nodejs + labels: + app.kubernetes.io/version: 0.5.0 + 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: pipelines-extcomm@redhat.com + 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: | + Builds the source code using the s2i's Nodejs builder-image + "image-registry.openshift-image-registry.svc:5000/openshift/nodejs". + + + workspaces: + - name: source + optional: false + description: | + Application source code, the build context for S2I workflow. + - name: dockerconfig + optional: true + 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. + + params: + - name: IMAGE + type: string + description: | + Fully qualified container image name to be built by s2i. + - name: VERSION + description: The tag of the imagestream for the corresponding language version + default: latest + type: string + - name: IMAGE_SCRIPTS_URL + type: string + default: image:///usr/libexec/s2i + description: | + Specify a URL containing the default assemble and run scripts for the builder image + - name: ENV_VARS + type: array + default: [] + description: | + Array containing string of Environment Variables as "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_VERSION + value: "$(params.VERSION)" + - name: PARAMS_IMAGE_SCRIPTS_URL + value: "$(params.IMAGE_SCRIPTS_URL)" + - name: PARAMS_CONTEXT + value: "$(params.CONTEXT)" + - 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: RESULTS_IMAGE_URL_PATH + value: "$(results.IMAGE_URL.path)" + - name: RESULTS_IMAGE_DIGEST_PATH + value: "$(results.IMAGE_DIGEST.path)" + + steps: + - name: s2i-generate + image: registry.access.redhat.com/source-to-image/source-to-image-rhel8:v1.3.9-6 + workingDir: $(workspaces.source.path) + env: + - name: S2I_BUILDER_IMAGE + value: "image-registry.openshift-image-registry.svc:5000/openshift/nodejs:$(params.VERSION)" + script: | + set -e + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFn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9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1aXJlZF92YXJzW0BdfTsgZG8KICAgICAgICBbWyAteiAiJHshdn0iIF1dICYmCiAgICAgICAgICAgIGZhaWwgIicke3Z9JyBlbnZpcm9ubWVudCB2YXJpYWJsZSBpcyBub3Qgc2V0ISIKICAgIGRvbmUKCiAgICByZXR1cm4gMAp9Cg==" |base64 -d >"/scripts/common.sh" + ls /scripts/buildah-*.sh; + chmod +x /scripts/buildah-*.sh; + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1aXJlZF92YXJzW0BdfTsgZG8KICAgICAgICBbWy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dFfSIgXAogICAgICAgIC0taW1hZ2Utc2NyaXB0cy11cmwgIiR7UEFSQU1TX0lNQUdFX1NDUklQVFNfVVJMfSIgXAogICAgICAgIC0tYXMtZG9ja2VyZmlsZSAiJHtTMklfRE9DS0VSRklMRX0iIFwKICAgICAgICAtLWVudmlyb25tZW50LWZpbGUgIiR7UzJJX0VOVklST05NRU5UX0ZJTEV9IgoKcGhhc2UgIkluc3BlY3RpbmcgdGhlIERvY2tlcmZpbGUgZ2VuZXJhdGVkIGF0ICcke1MySV9ET0NLRVJGSUxFfSciCltbICEgLWYgIiR7UzJJX0RPQ0tFUkZJTEV9IiBdXSAmJgogICAgZmFpbCAiR2VuZXJhdGVkIERvY2tlcmZpbGUgaXMgbm90IGZvdW5kISIKCnNldCAreApwaGFzZSAiR2VuZXJhdGVkIERvY2tlcmZpbGUgcGF5bG9hZCIKZWNobyAtZW4gIj4+PiAke1MySV9ET0NLRVJGSUxFfVxuJChjYXQgJHtTMklfRE9DS0VSRklMRX0pXG48PDwgRU9GXG4iCg==" |base64 -d >"/scripts/s2i-generate.sh" + ls /scripts/s2i-*.sh; + chmod +x /scripts/s2i-*.sh;echo "Running Script /scripts/s2i-generate.sh"; + /scripts/s2i-generate.sh; + args: + - "$(params.ENV_VARS[*])" + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + - name: s2i-build + image: registry.access.redhat.com/ubi8/buildah:8.10-5 + workingDir: /s2i-generate + command: + - /scripts/s2i-build.sh + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + volumes: + - name: scripts-dir + emptyDir: {} + - name: s2i-generate-dir + emptyDir: {} diff --git a/tasks/task-s2i-perl/0.5.0/task-s2i-perl.yaml b/tasks/task-s2i-perl/0.5.0/task-s2i-perl.yaml new file mode 100644 index 00000000..ee40f4d4 --- /dev/null +++ b/tasks/task-s2i-perl/0.5.0/task-s2i-perl.yaml @@ -0,0 +1,192 @@ +--- +# Source: task-containers/templates/task-s2i-perl.yaml +apiVersion: tekton.dev/v1 +kind: Task +metadata: + name: s2i-perl + labels: + app.kubernetes.io/version: 0.5.0 + 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: pipelines-extcomm@redhat.com + 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: | + Builds the source code using the s2i's Perl builder-image + "image-registry.openshift-image-registry.svc:5000/openshift/perl". + + + workspaces: + - name: source + optional: false + description: | + Application source code, the build context for S2I workflow. + - name: dockerconfig + optional: true + 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. + + params: + - name: IMAGE + type: string + description: | + Fully qualified container image name to be built by s2i. + - name: VERSION + description: The tag of the imagestream for the corresponding language version + default: latest + type: string + - name: IMAGE_SCRIPTS_URL + type: string + default: image:///usr/libexec/s2i + description: | + Specify a URL containing the default assemble and run scripts for the builder image + - name: ENV_VARS + type: array + default: [] + description: | + Array containing string of Environment Variables as "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_VERSION + value: "$(params.VERSION)" + - name: PARAMS_IMAGE_SCRIPTS_URL + value: "$(params.IMAGE_SCRIPTS_URL)" + - name: PARAMS_CONTEXT + value: "$(params.CONTEXT)" + - 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: RESULTS_IMAGE_URL_PATH + value: "$(results.IMAGE_URL.path)" + - name: RESULTS_IMAGE_DIGEST_PATH + value: "$(results.IMAGE_DIGEST.path)" + + steps: + - name: s2i-generate + image: registry.access.redhat.com/source-to-image/source-to-image-rhel8:v1.3.9-6 + workingDir: $(workspaces.source.path) + env: + - name: S2I_BUILDER_IMAGE + value: "image-registry.openshift-image-registry.svc:5000/openshift/perl:$(params.VERSION)" + script: | + set -e + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZ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rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1aXJlZF92YXJzW0BdfTsgZG8KICAgICAgICBbWyAteiAiJHshdn0iIF1dICYmCiAgICAgICAgICAgIGZhaWwgIicke3Z9JyBlbnZpcm9ubWVudCB2YXJpYWJsZSBpcyBub3Qgc2V0ISIKICAgIGRvbmUKCiAgICByZXR1cm4gMAp9Cg==" |base64 -d >"/scripts/common.sh" + ls /scripts/buildah-*.sh; + chmod +x /scripts/buildah-*.sh; + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1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Q09OVEVYVH0iICIke1MySV9CVUlMREVSX0lNQUdFfSIgXAogICAgICAgIC0taW1hZ2Utc2NyaXB0cy11cmwgIiR7UEFSQU1TX0lNQUdFX1NDUklQVFNfVVJMfSIgXAogICAgICAgIC0tYXMtZG9ja2VyZmlsZSAiJHtTMklfRE9DS0VSRklMRX0iIFwKICAgICAgICAtLWVudmlyb25tZW50LWZpbGUgIiR7UzJJX0VOVklST05NRU5UX0ZJTEV9IgoKcGhhc2UgIkluc3BlY3RpbmcgdGhlIERvY2tlcmZpbGUgZ2VuZXJhdGVkIGF0ICcke1MySV9ET0NLRVJGSUxFfSciCltbICEgLWYgIiR7UzJJX0RPQ0tFUkZJTEV9IiBdXSAmJgogICAgZmFpbCAiR2VuZXJhdGVkIERvY2tlcmZpbGUgaXMgbm90IGZvdW5kISIKCnNldCAreApwaGFzZSAiR2VuZXJhdGVkIERvY2tlcmZpbGUgcGF5bG9hZCIKZWNobyAtZW4gIj4+PiAke1MySV9ET0NLRVJGSUxFfVxuJChjYXQgJHtTMklfRE9DS0VSRklMRX0pXG48PDwgRU9GXG4iCg==" |base64 -d >"/scripts/s2i-generate.sh" + ls /scripts/s2i-*.sh; + chmod +x /scripts/s2i-*.sh;echo "Running Script /scripts/s2i-generate.sh"; + /scripts/s2i-generate.sh; + args: + - "$(params.ENV_VARS[*])" + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + - name: s2i-build + image: registry.access.redhat.com/ubi8/buildah:8.10-5 + workingDir: /s2i-generate + command: + - /scripts/s2i-build.sh + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + volumes: + - name: scripts-dir + emptyDir: {} + - name: s2i-generate-dir + emptyDir: {} diff --git a/tasks/task-s2i-php/0.5.0/task-s2i-php.yaml b/tasks/task-s2i-php/0.5.0/task-s2i-php.yaml new file mode 100644 index 00000000..2a06a0b7 --- /dev/null +++ b/tasks/task-s2i-php/0.5.0/task-s2i-php.yaml @@ -0,0 +1,192 @@ +--- +# Source: task-containers/templates/task-s2i-php.yaml +apiVersion: tekton.dev/v1 +kind: Task +metadata: + name: s2i-php + labels: + app.kubernetes.io/version: 0.5.0 + 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: pipelines-extcomm@redhat.com + 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: | + Builds the source code using the s2i's php builder-image + "image-registry.openshift-image-registry.svc:5000/openshift/php". + + + workspaces: + - name: source + optional: false + description: | + Application source code, the build context for S2I workflow. + - name: dockerconfig + optional: true + 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. + + params: + - name: IMAGE + type: string + description: | + Fully qualified container image name to be built by s2i. + - name: VERSION + description: The tag of the imagestream for the corresponding language version + default: latest + type: string + - name: IMAGE_SCRIPTS_URL + type: string + default: image:///usr/libexec/s2i + description: | + Specify a URL containing the default assemble and run scripts for the builder image + - name: ENV_VARS + type: array + default: [] + description: | + Array containing string of Environment Variables as "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_VERSION + value: "$(params.VERSION)" + - name: PARAMS_IMAGE_SCRIPTS_URL + value: "$(params.IMAGE_SCRIPTS_URL)" + - name: PARAMS_CONTEXT + value: "$(params.CONTEXT)" + - 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: RESULTS_IMAGE_URL_PATH + value: "$(results.IMAGE_URL.path)" + - name: RESULTS_IMAGE_DIGEST_PATH + value: "$(results.IMAGE_DIGEST.path)" + + steps: + - name: s2i-generate + image: registry.access.redhat.com/source-to-image/source-to-image-rhel8:v1.3.9-6 + workingDir: $(workspaces.source.path) + env: + - name: S2I_BUILDER_IMAGE + value: "image-registry.openshift-image-registry.svc:5000/openshift/php:$(params.VERSION)" + script: | + set -e + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1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ICBidWlsZCAiJHtQQVJBTVNfQ09OVEVYVH0iICIke1MySV9CVUlMREVSX0lNQUdFfSIgXAogICAgICAgIC0taW1hZ2Utc2NyaXB0cy11cmwgIiR7UEFSQU1TX0lNQUdFX1NDUklQVFNfVVJMfSIgXAogICAgICAgIC0tYXMtZG9ja2VyZmlsZSAiJHtTMklfRE9DS0VSRklMRX0iIFwKICAgICAgICAtLWVudmlyb25tZW50LWZpbGUgIiR7UzJJX0VOVklST05NRU5UX0ZJTEV9IgoKcGhhc2UgIkluc3BlY3RpbmcgdGhlIERvY2tlcmZpbGUgZ2VuZXJhdGVkIGF0ICcke1MySV9ET0NLRVJGSUxFfSciCltbICEgLWYgIiR7UzJJX0RPQ0tFUkZJTEV9IiBdXSAmJgogICAgZmFpbCAiR2VuZXJhdGVkIERvY2tlcmZpbGUgaXMgbm90IGZvdW5kISIKCnNldCAreApwaGFzZSAiR2VuZXJhdGVkIERvY2tlcmZpbGUgcGF5bG9hZCIKZWNobyAtZW4gIj4+PiAke1MySV9ET0NLRVJGSUxFfVxuJChjYXQgJHtTMklfRE9DS0VSRklMRX0pXG48PDwgRU9GXG4iCg==" |base64 -d >"/scripts/s2i-generate.sh" + ls /scripts/s2i-*.sh; + chmod +x /scripts/s2i-*.sh;echo "Running Script /scripts/s2i-generate.sh"; + /scripts/s2i-generate.sh; + args: + - "$(params.ENV_VARS[*])" + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + - name: s2i-build + image: registry.access.redhat.com/ubi8/buildah:8.10-5 + workingDir: /s2i-generate + command: + - /scripts/s2i-build.sh + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + volumes: + - name: scripts-dir + emptyDir: {} + - name: s2i-generate-dir + emptyDir: {} diff --git a/tasks/task-s2i-python/0.5.0/task-s2i-python.yaml b/tasks/task-s2i-python/0.5.0/task-s2i-python.yaml new file mode 100644 index 00000000..51518fd0 --- /dev/null +++ b/tasks/task-s2i-python/0.5.0/task-s2i-python.yaml @@ -0,0 +1,192 @@ +--- +# Source: task-containers/templates/task-s2i-python.yaml +apiVersion: tekton.dev/v1 +kind: Task +metadata: + name: s2i-python + labels: + app.kubernetes.io/version: 0.5.0 + 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: pipelines-extcomm@redhat.com + 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: | + Builds the source code using the s2i's Python builder-image + "image-registry.openshift-image-registry.svc:5000/openshift/python". + + + workspaces: + - name: source + optional: false + description: | + Application source code, the build context for S2I workflow. + - name: dockerconfig + optional: true + 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. + + params: + - name: IMAGE + type: string + description: | + Fully qualified container image name to be built by s2i. + - name: VERSION + description: The tag of the imagestream for the corresponding language version + default: latest + type: string + - name: IMAGE_SCRIPTS_URL + type: string + default: image:///usr/libexec/s2i + description: | + Specify a URL containing the default assemble and run scripts for the builder image + - name: ENV_VARS + type: array + default: [] + description: | + Array containing string of Environment Variables as "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_VERSION + value: "$(params.VERSION)" + - name: PARAMS_IMAGE_SCRIPTS_URL + value: "$(params.IMAGE_SCRIPTS_URL)" + - name: PARAMS_CONTEXT + value: "$(params.CONTEXT)" + - 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: RESULTS_IMAGE_URL_PATH + value: "$(results.IMAGE_URL.path)" + - name: RESULTS_IMAGE_DIGEST_PATH + value: "$(results.IMAGE_DIGEST.path)" + + steps: + - name: s2i-generate + image: registry.access.redhat.com/source-to-image/source-to-image-rhel8:v1.3.9-6 + workingDir: $(workspaces.source.path) + env: + - name: S2I_BUILDER_IMAGE + value: "image-registry.openshift-image-registry.svc:5000/openshift/python:$(params.VERSION)" + script: | + set -e + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV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fTE9HTEVWRUx9IiBcCiAgICBidWlsZCAiJHtQQVJBTVNfQ09OVEVYVH0iICIke1MySV9CVUlMREVSX0lNQUdFfSIgXAogICAgICAgIC0taW1hZ2Utc2NyaXB0cy11cmwgIiR7UEFSQU1TX0lNQUdFX1NDUklQVFNfVVJMfSIgXAogICAgICAgIC0tYXMtZG9ja2VyZmlsZSAiJHtTMklfRE9DS0VSRklMRX0iIFwKICAgICAgICAtLWVudmlyb25tZW50LWZpbGUgIiR7UzJJX0VOVklST05NRU5UX0ZJTEV9IgoKcGhhc2UgIkluc3BlY3RpbmcgdGhlIERvY2tlcmZpbGUgZ2VuZXJhdGVkIGF0ICcke1MySV9ET0NLRVJGSUxFfSciCltbICEgLWYgIiR7UzJJX0RPQ0tFUkZJTEV9IiBdXSAmJgogICAgZmFpbCAiR2VuZXJhdGVkIERvY2tlcmZpbGUgaXMgbm90IGZvdW5kISIKCnNldCAreApwaGFzZSAiR2VuZXJhdGVkIERvY2tlcmZpbGUgcGF5bG9hZCIKZWNobyAtZW4gIj4+PiAke1MySV9ET0NLRVJGSUxFfVxuJChjYXQgJHtTMklfRE9DS0VSRklMRX0pXG48PDwgRU9GXG4iCg==" |base64 -d >"/scripts/s2i-generate.sh" + ls /scripts/s2i-*.sh; + chmod +x /scripts/s2i-*.sh;echo "Running Script /scripts/s2i-generate.sh"; + /scripts/s2i-generate.sh; + args: + - "$(params.ENV_VARS[*])" + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + - name: s2i-build + image: registry.access.redhat.com/ubi8/buildah:8.10-5 + workingDir: /s2i-generate + command: + - /scripts/s2i-build.sh + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + volumes: + - name: scripts-dir + emptyDir: {} + - name: s2i-generate-dir + emptyDir: {} diff --git a/tasks/task-s2i-ruby/0.5.0/task-s2i-ruby.yaml b/tasks/task-s2i-ruby/0.5.0/task-s2i-ruby.yaml new file mode 100644 index 00000000..b1609e51 --- /dev/null +++ b/tasks/task-s2i-ruby/0.5.0/task-s2i-ruby.yaml @@ -0,0 +1,192 @@ +--- +# Source: task-containers/templates/task-s2i-ruby.yaml +apiVersion: tekton.dev/v1 +kind: Task +metadata: + name: s2i-ruby + labels: + app.kubernetes.io/version: 0.5.0 + 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: pipelines-extcomm@redhat.com + 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: | + Builds the source code using the s2i's Ruby builder-image + "image-registry.openshift-image-registry.svc:5000/openshift/ruby". + + + workspaces: + - name: source + optional: false + description: | + Application source code, the build context for S2I workflow. + - name: dockerconfig + optional: true + 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. + + params: + - name: IMAGE + type: string + description: | + Fully qualified container image name to be built by s2i. + - name: VERSION + description: The tag of the imagestream for the corresponding language version + default: latest + type: string + - name: IMAGE_SCRIPTS_URL + type: string + default: image:///usr/libexec/s2i + description: | + Specify a URL containing the default assemble and run scripts for the builder image + - name: ENV_VARS + type: array + default: [] + description: | + Array containing string of Environment Variables as "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_VERSION + value: "$(params.VERSION)" + - name: PARAMS_IMAGE_SCRIPTS_URL + value: "$(params.IMAGE_SCRIPTS_URL)" + - name: PARAMS_CONTEXT + value: "$(params.CONTEXT)" + - 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: RESULTS_IMAGE_URL_PATH + value: "$(results.IMAGE_URL.path)" + - name: RESULTS_IMAGE_DIGEST_PATH + value: "$(results.IMAGE_DIGEST.path)" + + steps: + - name: s2i-generate + image: registry.access.redhat.com/source-to-image/source-to-image-rhel8:v1.3.9-6 + workingDir: $(workspaces.source.path) + env: + - name: S2I_BUILDER_IMAGE + value: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:$(params.VERSION)" + script: | + set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eCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mYWlsKCkgewogICAgZGVjbGFyZSAtYSBfcmVxdWlyZWRfdmFycz0iJHtAfSIKCiAgICBmb3IgdiBpbiAke19yZXF1aXJlZF92YXJzW0BdfTsgZG8KICAgICAgICBbWyAteiAiJHshdn0iIF1dICYmCiAgICAgICAgICAgIGZhaWwgIicke3Z9JyBlbnZpcm9ubWVudCB2YXJpYWJsZSBpcyBub3Qgc2V0ISIKICAgIGRvbmUKCiAgICByZXR1cm4gMAp9Cg==" |base64 -d >"/scripts/common.sh" + ls /scripts/buildah-*.sh; + chmod +x /scripts/buildah-*.sh; + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9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FUl9JTUFHRX0nIgpzMmkgLS1sb2dsZXZlbCAiJHtTMklfTE9HTEVWRUx9IiBcCiAgICBidWlsZCAiJHtQQVJBTVNfQ09OVEVYVH0iICIke1MySV9CVUlMREVSX0lNQUdFfSIgXAogICAgICAgIC0taW1hZ2Utc2NyaXB0cy11cmwgIiR7UEFSQU1TX0lNQUdFX1NDUklQVFNfVVJMfSIgXAogICAgICAgIC0tYXMtZG9ja2VyZmlsZSAiJHtTMklfRE9DS0VSRklMRX0iIFwKICAgICAgICAtLWVudmlyb25tZW50LWZpbGUgIiR7UzJJX0VOVklST05NRU5UX0ZJTEV9IgoKcGhhc2UgIkluc3BlY3RpbmcgdGhlIERvY2tlcmZpbGUgZ2VuZXJhdGVkIGF0ICcke1MySV9ET0NLRVJGSUxFfSciCltbICEgLWYgIiR7UzJJX0RPQ0tFUkZJTEV9IiBdXSAmJgogICAgZmFpbCAiR2VuZXJhdGVkIERvY2tlcmZpbGUgaXMgbm90IGZvdW5kISIKCnNldCAreApwaGFzZSAiR2VuZXJhdGVkIERvY2tlcmZpbGUgcGF5bG9hZCIKZWNobyAtZW4gIj4+PiAke1MySV9ET0NLRVJGSUxFfVxuJChjYXQgJHtTMklfRE9DS0VSRklMRX0pXG48PDwgRU9GXG4iCg==" |base64 -d >"/scripts/s2i-generate.sh" + ls /scripts/s2i-*.sh; + chmod +x /scripts/s2i-*.sh;echo "Running Script /scripts/s2i-generate.sh"; + /scripts/s2i-generate.sh; + args: + - "$(params.ENV_VARS[*])" + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + - name: s2i-build + image: registry.access.redhat.com/ubi8/buildah:8.10-5 + workingDir: /s2i-generate + command: + - /scripts/s2i-build.sh + securityContext: + capabilities: + add: ["SETFCAP"] + volumeMounts: + - name: scripts-dir + mountPath: /scripts + - name: s2i-generate-dir + mountPath: /s2i-generate + + volumes: + - name: scripts-dir + emptyDir: {} + - name: s2i-generate-dir + emptyDir: {} diff --git a/tasks/task-skopeo-copy/0.5.0/task-skopeo-copy.yaml b/tasks/task-skopeo-copy/0.5.0/task-skopeo-copy.yaml new file mode 100644 index 00000000..abca3870 --- /dev/null +++ b/tasks/task-skopeo-copy/0.5.0/task-skopeo-copy.yaml @@ -0,0 +1,124 @@ +--- +# Source: task-containers/templates/task-skopeo-copy.yaml +apiVersion: tekton.dev/v1 +kind: Task +metadata: + name: skopeo-copy + labels: + app.kubernetes.io/version: 0.5.0 + 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: pipelines-extcomm@redhat.com + 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: | + Skopeo is a command line tool for working with remote image registries. + Skopeo doesn’t require a daemon to be running while performing its operations. In particular, + the handy skopeo command called copy will ease the whole image copy operation. + The copy command will take care of copying the image from internal.registry to production.registry. + If your production registry requires credentials to login in order to push the image, skopeo can handle that as well. + After copying the source and destination images SHA256 digest is stored as results. + workspaces: + - name: images_url + optional: true + description: | + For storing image urls in case of more than one image to copy. It must have a url.txt file at the root path + containing a source and a destination image separated by a space on each line. + params: + - name: SOURCE_IMAGE_URL + type: string + default: "" + description: | + Fully qualified source container image name, including tag, to be copied + into `DESTINATION_IMAGE_URL` param. + - name: DESTINATION_IMAGE_URL + type: string + default: "" + description: | + Fully qualified destination container image name, including tag. + - name: SRC_TLS_VERIFY + type: string + default: "true" + description: | + Sets the TLS verification flags for the source registry, `true` is recommended. + - name: DEST_TLS_VERIFY + type: string + default: "true" + description: | + Sets the TLS verification flags for the destination registry, `true` is recommended. + - name: VERBOSE + type: string + default: "false" + description: | + Shows a more verbose (debug) output. + - name: ARGS + default: "" + type: string + description: | + Additional args for skopeo copy command + + results: + - name: SOURCE_DIGEST + type: string + description: | + Source image SHA256 digest. + - name: DESTINATION_DIGEST + type: string + description: | + Destination image SHA256 digest. + + volumes: + - name: scripts-dir + emptyDir: {} + + stepTemplate: + env: + + - name: PARAMS_SOURCE_IMAGE_URL + value: "$(params.SOURCE_IMAGE_URL)" + - name: PARAMS_DESTINATION_IMAGE_URL + value: "$(params.DESTINATION_IMAGE_URL)" + - name: PARAMS_SRC_TLS_VERIFY + value: "$(params.SRC_TLS_VERIFY)" + - name: PARAMS_DEST_TLS_VERIFY + value: "$(params.DEST_TLS_VERIFY)" + - name: PARAMS_VERBOSE + value: "$(params.VERBOSE)" + - name: PARAMS_ARGS + value: "$(params.ARGS)" + - name: WORKSPACES_IMAGES_URL_BOUND + value: "$(workspaces.images_url.bound)" + - name: WORKSPACES_IMAGES_URL_PATH + value: "$(workspaces.images_url.path)" + - name: RESULTS_SOURCE_DIGEST_PATH + value: "$(results.SOURCE_DIGEST.path)" + - name: RESULTS_DESTINATION_DIGEST_PATH + value: "$(results.DESTINATION_DIGEST.path)" + + steps: + - name: skopeo-copy + env: + - name: HOME + value: /workspace/home + image: registry.access.redhat.com/ubi8/skopeo:8.10-5 + script: | + set -e + printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9ydGVkIG9uIHRoZSBlbnZpcm9ubWVudApmdW5jdGlvbiBleHBvcnRlZF9vcl9mY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IGRlc3RpbmF0aW9uX2RpZ2VzdD0iIgogICAgd2hpbGUgSUZTPSByZWFkIC1yIGxpbmUgfHwgWyAtbiAiJGxpbmUiIF0KICAgIGRvCiAgICAgICAgcmVhZCAtcmEgU09VUkNFIDw8PCIke2xpbmV9IgogICAgICAgIHNvdXJjZV9kaWdlc3Q9IiRzb3VyY2VfZGlnZXN0ICQoc2tvcGVvX2luc3BlY3QgJHtTT1VSQ0VbMF19ICR7UEFSQU1TX1NSQ19UTFNfVkVSSUZZfSkiCiAgICAgICAgZGVzdGluYXRpb25fZGlnZXN0PSIkZGVzdGluYXRpb25fZGlnZXN0ICQoc2tvcGVvX2luc3BlY3QgJHtTT1VSQ0VbMV19ICR7UEFSQU1TX0RFU1RfVExTX1ZFUklGWX0pIgogICAgZG9uZSA8ICIkZmlsZW5hbWUiCiAgICAjIFJlbW92ZSB3aGl0ZXNwYWNlIGZyb20gdGhlIHN0YXJ0CiAgICBzb3VyY2VfZGlnZXN0PSIke3NvdXJjZV9kaWdlc3QjIH0iCiAgICBkZXN0aW5hdGlvbl9kaWdlc3Q9IiR7ZGVzdGluYXRpb25fZGlnZXN0IyB9IgogICAgcGhhc2UgIlNvdXJjZSBpbWFnZSBkaWdlc3RzICcke3NvdXJjZV9kaWdlc3R9JyIKICAgIHBoYXNlICJEZXN0aW5hdGlvbiBpbWFnZSBkaWdlc3RzICcke2Rlc3RpbmF0aW9uX2RpZ2VzdH0nIgpmaQoKcHJpbnRmICIlcyIgIiR7c291cmNlX2RpZ2VzdH0iID4gIiR7UkVTVUxUU19TT1VSQ0VfRElHRVNUX1BBVEh9IgpwcmludGYgIiVzIiAiJHtkZXN0aW5hdGlvbl9kaWdlc3R9IiA+ICIke1JFU1VMVFNfREVTVElOQVRJT05fRElHRVNUX1BBVEh9Igo=" |base64 -d >"/scripts/skopeo-results.sh" + ls /scripts/skopeo-*.sh; + chmod +x /scripts/skopeo-*.sh;echo "Running Script /scripts/skopeo-copy.sh"; + /scripts/skopeo-copy.sh;echo "Running Script /scripts/skopeo-results.sh"; + /scripts/skopeo-results.sh; + volumeMounts: + - name: scripts-dir + mountPath: /scripts