From 573620981c6d55dfe9fad27d5984945346026b7d Mon Sep 17 00:00:00 2001 From: Pradeep Kumar Date: Tue, 2 Mar 2021 16:41:15 +0530 Subject: [PATCH 1/2] update all the s2i-* tasks this update all the s2i-* tasks to use imagestream from internal registry also removes all the pipelineresource based tasks change all the tasks from s2i-runtime-version to s2i-runtime format removes complexity of MINOR_VERSION and use VERSION param which is to specify the tag available for the particular imagestream remove buildh-pr this remove one more task 'buildah-pr' --- .tekton/pipeline.yaml | 2496 ++--------------- task/buildah-pr/0.1/README.md | 99 - task/buildah-pr/0.1/buildah-pr.yaml | 69 - task/buildah-pr/0.1/tests/resource.yaml | 22 - task/buildah-pr/0.1/tests/step.yaml | 13 - task/s2i-dotnet-1-pr/0.1/README.md | 95 - task/s2i-dotnet-1-pr/0.1/s2i-dotnet-1-pr.yaml | 73 - task/s2i-dotnet-1-pr/0.1/tests/resource.yaml | 22 - task/s2i-dotnet-1-pr/0.1/tests/step.yaml | 15 - task/s2i-dotnet-1/0.1/s2i-dotnet-1.yaml | 71 - task/s2i-dotnet-1/0.1/tests/step.yaml | 31 - task/s2i-dotnet-2-pr/0.1/README.md | 95 - task/s2i-dotnet-2-pr/0.1/s2i-dotnet-2-pr.yaml | 73 - task/s2i-dotnet-2-pr/0.1/tests/resource.yaml | 22 - task/s2i-dotnet-2-pr/0.1/tests/step.yaml | 15 - task/s2i-dotnet-2/0.1/s2i-dotnet-2.yaml | 71 - task/s2i-dotnet-2/0.1/tests/pv.yaml | 11 - task/s2i-dotnet-2/0.1/tests/step.yaml | 31 - task/s2i-dotnet-3-pr/0.1/README.md | 95 - task/s2i-dotnet-3-pr/0.1/s2i-dotnet-3-pr.yaml | 73 - task/s2i-dotnet-3-pr/0.1/tests/resource.yaml | 22 - task/s2i-dotnet-3-pr/0.1/tests/step.yaml | 15 - task/s2i-dotnet-3/0.1/tests/pv.yaml | 11 - .../0.1/README.md | 33 +- .../0.1/s2i-dotnet.yaml} | 18 +- .../0.1/tests/pv.yaml | 2 +- .../0.1/tests/step.yaml | 14 +- task/s2i-eap-pr/0.1/README.md | 114 - task/s2i-eap-pr/0.1/s2i-eap-pr.yaml | 93 - task/s2i-eap/0.1/s2i-eap.yaml | 2 +- task/s2i-go-pr/0.1/README.md | 92 - task/s2i-go-pr/0.1/s2i-go-pr.yaml | 69 - task/s2i-go-pr/0.1/tests/resource.yaml | 22 - task/s2i-go-pr/0.1/tests/step.yaml | 13 - task/s2i-go/0.1/README.md | 5 +- task/s2i-go/0.1/s2i-go.yaml | 8 +- task/s2i-java-11-pr/0.1/README.md | 93 - task/s2i-java-11-pr/0.1/s2i-java-11-pr.yaml | 118 - task/s2i-java-11-pr/0.1/tests/resource.yaml | 20 - task/s2i-java-11-pr/0.1/tests/step.yaml | 13 - task/s2i-java-11/0.1/README.md | 119 - task/s2i-java-8-pr/0.1/README.md | 95 - task/s2i-java-8-pr/0.1/s2i-java-8-pr.yaml | 118 - task/s2i-java-8-pr/0.1/tests/resource.yaml | 22 - task/s2i-java-8-pr/0.1/tests/step.yaml | 13 - task/s2i-java-8/0.1/s2i-java-8.yaml | 117 - task/s2i-java-8/0.1/tests/step.yaml | 29 - task/{s2i-java-8 => s2i-java}/0.1/README.md | 34 +- .../0.1/s2i-java.yaml} | 16 +- .../0.1/tests/pv.yaml | 2 +- .../0.1/tests/step.yaml | 14 +- task/s2i-nodejs-pr/0.1/README.md | 92 - task/s2i-nodejs-pr/0.1/s2i-nodejs-pr.yaml | 73 - task/s2i-nodejs-pr/0.1/tests/resource.yaml | 22 - task/s2i-nodejs-pr/0.1/tests/step.yaml | 13 - task/s2i-nodejs/0.1/README.md | 14 +- task/s2i-nodejs/0.1/s2i-nodejs.yaml | 6 +- task/s2i-perl-pr/0.1/README.md | 95 - task/s2i-perl-pr/0.1/s2i-perl-pr.yaml | 73 - .../0.1/tests.disabled/resource.yaml | 22 - task/s2i-perl-pr/0.1/tests.disabled/step.yaml | 15 - task/s2i-perl/0.1/README.md | 12 +- task/s2i-perl/0.1/s2i-perl.yaml | 10 +- task/s2i-php-pr/0.1/README.md | 95 - task/s2i-php-pr/0.1/s2i-php-pr.yaml | 73 - task/s2i-php-pr/0.1/tests/resource.yaml | 22 - task/s2i-php-pr/0.1/tests/step.yaml | 15 - task/s2i-php/0.1/README.md | 11 +- task/s2i-php/0.1/s2i-php.yaml | 10 +- task/s2i-python-2-pr/0.1/README.md | 94 - task/s2i-python-2-pr/0.1/s2i-python-2-pr.yaml | 73 - task/s2i-python-2-pr/0.1/tests/resource.yaml | 22 - task/s2i-python-2-pr/0.1/tests/step.yaml | 13 - task/s2i-python-2/0.1/README.md | 121 - task/s2i-python-2/0.1/s2i-python-2.yaml | 72 - task/s2i-python-2/0.1/tests/pv.yaml | 11 - task/s2i-python-3-pr/0.1/README.md | 95 - task/s2i-python-3-pr/0.1/s2i-python-3-pr.yaml | 73 - task/s2i-python-3-pr/0.1/tests/resource.yaml | 22 - task/s2i-python-3-pr/0.1/tests/step.yaml | 13 - task/s2i-python-3/0.1/tests/pv.yaml | 11 - task/s2i-python-3/0.1/tests/step.yaml | 29 - .../0.1/README.md | 29 +- .../0.1/s2i-python.yaml} | 18 +- .../0.1/tests/pv.yaml | 2 +- .../0.1/tests/step.yaml | 14 +- task/s2i-ruby-pr/0.1/README.md | 96 - task/s2i-ruby-pr/0.1/s2i-ruby-pr.yaml | 73 - task/s2i-ruby-pr/0.1/tests/resource.yaml | 22 - task/s2i-ruby-pr/0.1/tests/step.yaml | 13 - task/s2i-ruby/0.1/README.md | 16 +- task/s2i-ruby/0.1/s2i-ruby.yaml | 10 +- 92 files changed, 365 insertions(+), 6098 deletions(-) delete mode 100644 task/buildah-pr/0.1/README.md delete mode 100644 task/buildah-pr/0.1/buildah-pr.yaml delete mode 100644 task/buildah-pr/0.1/tests/resource.yaml delete mode 100644 task/buildah-pr/0.1/tests/step.yaml delete mode 100644 task/s2i-dotnet-1-pr/0.1/README.md delete mode 100644 task/s2i-dotnet-1-pr/0.1/s2i-dotnet-1-pr.yaml delete mode 100644 task/s2i-dotnet-1-pr/0.1/tests/resource.yaml delete mode 100644 task/s2i-dotnet-1-pr/0.1/tests/step.yaml delete mode 100644 task/s2i-dotnet-1/0.1/s2i-dotnet-1.yaml delete mode 100644 task/s2i-dotnet-1/0.1/tests/step.yaml delete mode 100644 task/s2i-dotnet-2-pr/0.1/README.md delete mode 100644 task/s2i-dotnet-2-pr/0.1/s2i-dotnet-2-pr.yaml delete mode 100644 task/s2i-dotnet-2-pr/0.1/tests/resource.yaml delete mode 100644 task/s2i-dotnet-2-pr/0.1/tests/step.yaml delete mode 100644 task/s2i-dotnet-2/0.1/s2i-dotnet-2.yaml delete mode 100644 task/s2i-dotnet-2/0.1/tests/pv.yaml delete mode 100644 task/s2i-dotnet-2/0.1/tests/step.yaml delete mode 100644 task/s2i-dotnet-3-pr/0.1/README.md delete mode 100644 task/s2i-dotnet-3-pr/0.1/s2i-dotnet-3-pr.yaml delete mode 100644 task/s2i-dotnet-3-pr/0.1/tests/resource.yaml delete mode 100644 task/s2i-dotnet-3-pr/0.1/tests/step.yaml delete mode 100644 task/s2i-dotnet-3/0.1/tests/pv.yaml rename task/{s2i-dotnet-3 => s2i-dotnet}/0.1/README.md (83%) rename task/{s2i-dotnet-3/0.1/s2i-dotnet-3.yaml => s2i-dotnet/0.1/s2i-dotnet.yaml} (82%) rename task/{s2i-java-8 => s2i-dotnet}/0.1/tests/pv.yaml (83%) rename task/{s2i-dotnet-3 => s2i-dotnet}/0.1/tests/step.yaml (69%) delete mode 100644 task/s2i-eap-pr/0.1/README.md delete mode 100644 task/s2i-eap-pr/0.1/s2i-eap-pr.yaml delete mode 100644 task/s2i-go-pr/0.1/README.md delete mode 100644 task/s2i-go-pr/0.1/s2i-go-pr.yaml delete mode 100644 task/s2i-go-pr/0.1/tests/resource.yaml delete mode 100644 task/s2i-go-pr/0.1/tests/step.yaml delete mode 100644 task/s2i-java-11-pr/0.1/README.md delete mode 100644 task/s2i-java-11-pr/0.1/s2i-java-11-pr.yaml delete mode 100644 task/s2i-java-11-pr/0.1/tests/resource.yaml delete mode 100644 task/s2i-java-11-pr/0.1/tests/step.yaml delete mode 100644 task/s2i-java-11/0.1/README.md delete mode 100644 task/s2i-java-8-pr/0.1/README.md delete mode 100644 task/s2i-java-8-pr/0.1/s2i-java-8-pr.yaml delete mode 100644 task/s2i-java-8-pr/0.1/tests/resource.yaml delete mode 100644 task/s2i-java-8-pr/0.1/tests/step.yaml delete mode 100644 task/s2i-java-8/0.1/s2i-java-8.yaml delete mode 100644 task/s2i-java-8/0.1/tests/step.yaml rename task/{s2i-java-8 => s2i-java}/0.1/README.md (80%) rename task/{s2i-java-11/0.1/s2i-java-11.yaml => s2i-java/0.1/s2i-java.yaml} (88%) rename task/{s2i-java-11 => s2i-java}/0.1/tests/pv.yaml (82%) rename task/{s2i-java-11 => s2i-java}/0.1/tests/step.yaml (67%) delete mode 100644 task/s2i-nodejs-pr/0.1/README.md delete mode 100644 task/s2i-nodejs-pr/0.1/s2i-nodejs-pr.yaml delete mode 100644 task/s2i-nodejs-pr/0.1/tests/resource.yaml delete mode 100644 task/s2i-nodejs-pr/0.1/tests/step.yaml delete mode 100644 task/s2i-perl-pr/0.1/README.md delete mode 100644 task/s2i-perl-pr/0.1/s2i-perl-pr.yaml delete mode 100644 task/s2i-perl-pr/0.1/tests.disabled/resource.yaml delete mode 100644 task/s2i-perl-pr/0.1/tests.disabled/step.yaml delete mode 100644 task/s2i-php-pr/0.1/README.md delete mode 100644 task/s2i-php-pr/0.1/s2i-php-pr.yaml delete mode 100644 task/s2i-php-pr/0.1/tests/resource.yaml delete mode 100644 task/s2i-php-pr/0.1/tests/step.yaml delete mode 100644 task/s2i-python-2-pr/0.1/README.md delete mode 100644 task/s2i-python-2-pr/0.1/s2i-python-2-pr.yaml delete mode 100644 task/s2i-python-2-pr/0.1/tests/resource.yaml delete mode 100644 task/s2i-python-2-pr/0.1/tests/step.yaml delete mode 100644 task/s2i-python-2/0.1/README.md delete mode 100644 task/s2i-python-2/0.1/s2i-python-2.yaml delete mode 100644 task/s2i-python-2/0.1/tests/pv.yaml delete mode 100644 task/s2i-python-3-pr/0.1/README.md delete mode 100644 task/s2i-python-3-pr/0.1/s2i-python-3-pr.yaml delete mode 100644 task/s2i-python-3-pr/0.1/tests/resource.yaml delete mode 100644 task/s2i-python-3-pr/0.1/tests/step.yaml delete mode 100644 task/s2i-python-3/0.1/tests/pv.yaml delete mode 100644 task/s2i-python-3/0.1/tests/step.yaml rename task/{s2i-python-3 => s2i-python}/0.1/README.md (85%) rename task/{s2i-python-3/0.1/s2i-python-3.yaml => s2i-python/0.1/s2i-python.yaml} (79%) rename task/{s2i-dotnet-1 => s2i-python}/0.1/tests/pv.yaml (82%) rename task/{s2i-python-2 => s2i-python}/0.1/tests/step.yaml (66%) delete mode 100644 task/s2i-ruby-pr/0.1/README.md delete mode 100644 task/s2i-ruby-pr/0.1/s2i-ruby-pr.yaml delete mode 100644 task/s2i-ruby-pr/0.1/tests/resource.yaml delete mode 100644 task/s2i-ruby-pr/0.1/tests/step.yaml diff --git a/.tekton/pipeline.yaml b/.tekton/pipeline.yaml index 01a964d..8b9212d 100644 --- a/.tekton/pipeline.yaml +++ b/.tekton/pipeline.yaml @@ -2,1488 +2,28 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: buildah-pr + name: s2i-dotnet labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.14.3" - tekton.dev/tags: buildah - tekton.dev/displayName: "buildah pipelineresource" -spec: - description: >- - Buildah task builds source into a container image and - then pushes it to a container registry. - - Buildah Task builds source into a container image using Project Atomic's - Buildah build tool.It uses Buildah's support for building from Dockerfiles, - using its buildah bud command.This command executes the directives in the - Dockerfile to assemble a container image, then pushes that image to a - container registry. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - - name: DOCKERFILE - description: Path to the Dockerfile to build. - default: ./Dockerfile - - name: CONTEXT - description: Path to the directory to use as context. - default: . - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - - name: FORMAT - description: The format of the built container, oci or docker - default: "oci" - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: build - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'bud', '--storage-driver=vfs', '--format=$(params.FORMAT)', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '$(params.DOCKERFILE)', '-t', '$(resources.outputs.image.url)', '$(params.CONTEXT)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: buildah-pr-nocode -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/kelseyhightower/nocode ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: buildah-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-1" - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet-1-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, dotnet - tekton.dev/displayName: "s2i dotnet 1 pipelineresource" -spec: - description: >- - s2i-dotnet-1-pr task fetches a Git repository and builds and - pushes a container image using S2I and a .NET Core 1 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - - name: MINOR_VERSION - description: The minor version of the .NET Core 1 - default: '1' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/dotnet/dotnetcore-1$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-1-pr-repo -spec: - type: git - params: - - name: revision - value: dotnetcore-1.1 - - name: url - value: https://github.com/redhat-developer/s2i-dotnetcore-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-1-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-1-pr" - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet-1 - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, dotnet, workspace - tekton.dev/displayName: "s2i dotnet 1" -spec: - description: >- - s2i-dotnet-1 task clones a Git repository and builds and - pushes a container image using S2I and a .NET Core 1 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the .NET Core 1 - default: '1' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - workspaces: - - name: source - mountPath: /workspace/source - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/dotnet/dotnetcore-1$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: s2i-dotnet-1-workspace -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet-2-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, dotnet - tekton.dev/displayName: "s2i dotnet 2 pipelineresource" -spec: - description: >- - s2i-dotnet-2-pr task fetches a Git repository and builds and - pushes a container image using S2I and a .NET Core 2 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the .NET Core 2 - default: '2' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/dotnet/dotnet-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-2-pr-repo -spec: - type: git - params: - - name: revision - value: dotnetcore-2.2 - - name: url - value: https://github.com/redhat-developer/s2i-dotnetcore-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-2-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-2-pr" - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet-2 - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, dotnet, workspace - tekton.dev/displayName: "s2i dotnet 2" -spec: - description: >- - s2i-dotnet-2 task clones a Git repository and builds and - pushes a container image using S2I and a .NET Core 2 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - - name: MINOR_VERSION - description: The minor version of the .NET Core 2 - default: '2' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - workspaces: - - name: source - mountPath: /workspace/source - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/dotnet/dotnet-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: s2i-dotnet-2-workspace -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet-3-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, dotnet - tekton.dev/displayName: "s2i dotnet 3 pipelineresource" -spec: - description: >- - s2i-dotnet-3-pr task fetches a Git repository and builds and - pushes a container image using S2I and a .NET Core 3 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the .NET Core 3 - default: '1' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/dotnet:3.$(params.MINOR_VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - workingDir: $(resources.inputs.source.path) - image: $(params.BUILDER_IMAGE) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-3-pr-repo -spec: - type: git - params: - - name: revision - value: "dotnetcore-3.1" - - name: url - value: https://github.com/redhat-developer/s2i-dotnetcore-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-3-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-3-pr" - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet-3 - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, dotnet, workspace - tekton.dev/displayName: "s2i dotnet 3" -spec: - description: >- - s2i-dotnet-3 task fetches a Git repository and builds and - pushes a container image using S2I and a .NET Core 3 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - - name: MINOR_VERSION - description: The minor version of the .NET Core 3 - default: '1' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - workspaces: - - name: source - mountPath: /workspace/source - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/dotnet:3.$(params.MINOR_VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - workingDir: $(workspaces.source.path) - image: $(params.BUILDER_IMAGE) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: s2i-dotnet-3-workspace -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-go-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, go - tekton.dev/displayName: "s2i go pipelineresource" -spec: - description: >- - s2i-go-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Go builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/devtools/go-toolset-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-go-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/golang-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-go-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-go-pr" - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-go - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, go, workspace - tekton.dev/displayName: "s2i go" -spec: - description: >- - s2i-go task clones a Git repository and builds and - pushes a container image using S2I and a Go builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - workspaces: - - name: source - mountPath: /workspace/source - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/devtools/go-toolset-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - workingDir: $(workspaces.source.path) - image: $(params.BUILDER_IMAGE) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: s2i-go-workspace -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-java-11-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, java - tekton.dev/displayName: "s2i java 11 pipelineresource" -spec: - description: >- - s2i-java-11-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Java 11 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: PATH_CONTEXT - description: The location of the path to run s2i from - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: MAVEN_ARGS_APPEND - description: Additional Maven arguments - default: "" - type: string - - name: MAVEN_CLEAR_REPO - description: Remove the Maven repository after the artifact is built - default: "false" - type: string - - name: MAVEN_MIRROR_URL - description: The base URL of a mirror used for retrieving artifacts - default: "" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: gen-env-file - image: quay.io/openshift-pipeline/s2i - workingdir: /env-params - command: - - '/bin/sh' - - '-c' - args: - - |- - echo "MAVEN_CLEAR_REPO=$(params.MAVEN_CLEAR_REPO)" > env-file - - [[ '$(params.MAVEN_ARGS_APPEND)' != "" ]] && - echo "MAVEN_ARGS_APPEND=$(params.MAVEN_ARGS_APPEND)" >> env-file - - [[ '$(params.MAVEN_MIRROR_URL)' != "" ]] && - echo "MAVEN_MIRROR_URL=$(params.MAVEN_MIRROR_URL)" >> env-file - - echo "Generated Env file" - echo "------------------------------" - cat env-file - echo "------------------------------" - volumeMounts: - - name: envparams - mountPath: /env-params - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: - - 's2i' - - 'build' - - '$(params.PATH_CONTEXT)' - - 'registry.access.redhat.com/openjdk/openjdk-11-rhel7' - - '--image-scripts-url' - - 'image:///usr/local/s2i' - - '--as-dockerfile' - - '/gen-source/Dockerfile.gen' - - '--environment-file' - - '/env-params/env-file' - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: envparams - mountPath: /env-params - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - - name: envparams - emptyDir: {} - ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-java-11-pr-repo -spec: - type: git - params: - - name: url - value: https://github.com/piyush-garg/spring-petclinic ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-java-11-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-java-11-pr" - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-java-11 - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, java, workspace - tekton.dev/displayName: "s2i java 11" -spec: - description: >- - s2i-java-11 task clones a Git repository and builds and - pushes a container image using S2I and a Java 11 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: PATH_CONTEXT - description: The location of the path to run s2i from - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: MAVEN_ARGS_APPEND - description: Additional Maven arguments - default: "" - type: string - - name: MAVEN_CLEAR_REPO - description: Remove the Maven repository after the artifact is built - default: "false" - type: string - - name: MAVEN_MIRROR_URL - description: The base URL of a mirror used for retrieving artifacts - default: "" - type: string - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - workspaces: - - name: source - mountPath: /workspace/source - steps: - - name: gen-env-file - image: quay.io/openshift-pipeline/s2i - workingdir: /env-params - command: - - '/bin/sh' - - '-c' - args: - - |- - echo "MAVEN_CLEAR_REPO=$(params.MAVEN_CLEAR_REPO)" > env-file - - [[ '$(params.MAVEN_ARGS_APPEND)' != "" ]] && - echo "MAVEN_ARGS_APPEND=$(params.MAVEN_ARGS_APPEND)" >> env-file - - [[ '$(params.MAVEN_MIRROR_URL)' != "" ]] && - echo "MAVEN_MIRROR_URL=$(params.MAVEN_MIRROR_URL)" >> env-file - - echo "Generated Env file" - echo "------------------------------" - cat env-file - echo "------------------------------" - volumeMounts: - - name: envparams - mountPath: /env-params - - name: generate - image: quay.io/openshift-pipeline/s2i - workingdir: $(workspaces.source.path) - command: - - 's2i' - - 'build' - - '$(params.PATH_CONTEXT)' - - 'registry.access.redhat.com/openjdk/openjdk-11-rhel7' - - '--image-scripts-url' - - 'image:///usr/local/s2i' - - '--as-dockerfile' - - '/gen-source/Dockerfile.gen' - - '--environment-file' - - '/env-params/env-file' - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: envparams - mountPath: /env-params - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(workspaces.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - - name: envparams - emptyDir: {} - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: s2i-java-11-workspace -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-java-8-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, java - tekton.dev/displayName: "s2i java 8 pipelineresource" -spec: - description: >- - s2i-java-8-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Java 8 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: PATH_CONTEXT - description: The location of the path to run s2i from - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: MAVEN_ARGS_APPEND - description: Additional Maven arguments - default: "" - type: string - - name: MAVEN_CLEAR_REPO - description: Remove the Maven repository after the artifact is built - default: "false" - type: string - - name: MAVEN_MIRROR_URL - description: The base URL of a mirror used for retrieving artifacts - default: "" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: gen-env-file - image: quay.io/openshift-pipeline/s2i - workingdir: /env-params - command: - - '/bin/sh' - - '-c' - args: - - |- - echo "MAVEN_CLEAR_REPO=$(params.MAVEN_CLEAR_REPO)" > env-file - - [[ '$(params.MAVEN_ARGS_APPEND)' != "" ]] && - echo "MAVEN_ARGS_APPEND=$(params.MAVEN_ARGS_APPEND)" >> env-file - - [[ '$(params.MAVEN_MIRROR_URL)' != "" ]] && - echo "MAVEN_MIRROR_URL=$(params.MAVEN_MIRROR_URL)" >> env-file - - echo "Generated Env file" - echo "------------------------------" - cat env-file - echo "------------------------------" - volumeMounts: - - name: envparams - mountPath: /env-params - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: - - 's2i' - - 'build' - - '$(params.PATH_CONTEXT)' - - 'registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift' - - '--image-scripts-url' - - 'image:///usr/local/s2i' - - '--as-dockerfile' - - '/gen-source/Dockerfile.gen' - - '--environment-file' - - '/env-params/env-file' - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: envparams - mountPath: /env-params - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - - name: envparams - emptyDir: {} - ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-java-8-pr-repo -spec: - type: git - params: - - name: revision - value: "d367e2b4b41a2de899b0f438bc984a7c1c011b77" - - name: url - value: https://github.com/spring-projects/spring-petclinic ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-java-8-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-java-8-pr" - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-java-8 - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, java, workspace - tekton.dev/displayName: "s2i java 8" -spec: - description: >- - s2i-java-8 task clones a Git repository and builds and - pushes a container image using S2I and a Java 8 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: PATH_CONTEXT - description: The location of the path to run s2i from - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: MAVEN_ARGS_APPEND - description: Additional Maven arguments - default: "" - type: string - - name: MAVEN_CLEAR_REPO - description: Remove the Maven repository after the artifact is built - default: "false" - type: string - - name: MAVEN_MIRROR_URL - description: The base URL of a mirror used for retrieving artifacts - default: "" - type: string - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - workspaces: - - name: source - mountPath: /workspace/source - steps: - - name: gen-env-file - image: quay.io/openshift-pipeline/s2i - workingdir: /env-params - command: - - '/bin/sh' - - '-c' - args: - - |- - echo "MAVEN_CLEAR_REPO=$(params.MAVEN_CLEAR_REPO)" > env-file - - [[ '$(params.MAVEN_ARGS_APPEND)' != "" ]] && - echo "MAVEN_ARGS_APPEND=$(params.MAVEN_ARGS_APPEND)" >> env-file - - [[ '$(params.MAVEN_MIRROR_URL)' != "" ]] && - echo "MAVEN_MIRROR_URL=$(params.MAVEN_MIRROR_URL)" >> env-file - - echo "Generated Env file" - echo "------------------------------" - cat env-file - echo "------------------------------" - volumeMounts: - - name: envparams - mountPath: /env-params - - name: generate - image: quay.io/openshift-pipeline/s2i - workingdir: $(workspaces.source.path) - command: - - 's2i' - - 'build' - - '$(params.PATH_CONTEXT)' - - 'registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift' - - '--image-scripts-url' - - 'image:///usr/local/s2i' - - '--as-dockerfile' - - '/gen-source/Dockerfile.gen' - - '--environment-file' - - '/env-params/env-file' - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: envparams - mountPath: /env-params - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(workspaces.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - - name: envparams - emptyDir: {} - ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: s2i-java-8-workspace -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-nodejs-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, nodejs - tekton.dev/displayName: "s2i nodejs pipelineresource" -spec: - description: >- - s2i-nodejs-pr task fetches a Git repository and builds and - pushes a container image using S2I and a nodejs builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: VERSION - description: The version of the nodejs - default: '12' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/nodejs:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-nodejs-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/nodejs-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-nodejs-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-nodejs-pr" - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-nodejs - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, nodejs, workspace - tekton.dev/displayName: "s2i nodejs" + tekton.dev/pipelines.minVersion: "0.19" + tekton.dev/tags: s2i, dotnet, workspace + tekton.dev/displayName: "s2i dotnet" spec: description: >- - s2i-nodejs task clones a Git repository and builds and - pushes a container image using S2I and a nodejs builder image. + s2i-dotnet task fetches a Git repository and builds and + pushes a container image using S2I and a .NET Core builder image. results: - name: IMAGE_DIGEST description: Digest of the image just built. params: + - name: BUILDER_IMAGE + description: The location of the buildah builder image. + default: quay.io/buildah/stable:v1.17.0 - name: VERSION - description: The version of the nodejs - default: '12' + description: The tag of .NET imagestream for .NET version + default: '3.1-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. @@ -1496,9 +36,6 @@ spec: - name: IMAGE description: Location of the repo where image has to be pushed type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 workspaces: - name: source mountPath: /workspace/source @@ -1506,7 +43,7 @@ spec: - name: generate image: quay.io/openshift-pipeline/s2i workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/nodejs:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/dotnet:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source @@ -1520,8 +57,8 @@ spec: - name: gen-source mountPath: /gen-source - name: push - image: $(params.BUILDER_IMAGE) workingDir: $(workspaces.source.path) + image: $(params.BUILDER_IMAGE) command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] volumeMounts: - name: varlibcontainers @@ -1539,135 +76,36 @@ spec: apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: s2i-nodejs-workspace + name: s2i-dotnet-workspace spec: accessModes: - ReadWriteOnce resources: requests: storage: 100Mi - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-php-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, php - tekton.dev/displayName: "s2i php pipelineresource" -spec: - description: >- - s2i-php-pr task fetches a Git repository and builds and - pushes a container image using S2I and a PHP builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the php - default: '3' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/php:7.$(params.MINOR_VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-php-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/s2i-php-container/ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-php-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-php-pr" - --- apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: s2i-php + name: s2i-go labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, php, workspace - tekton.dev/displayName: "s2i php" + tekton.dev/pipelines.minVersion: "0.19" + tekton.dev/tags: s2i, go, workspace + tekton.dev/displayName: "s2i go" spec: description: >- - s2i-php task clones a Git repository and builds and - pushes a container image using S2I and a PHP builder image. + s2i-go task clones a Git repository and builds and + pushes a container image using S2I and a Go builder image. results: - name: IMAGE_DIGEST description: Digest of the image just built. params: - - name: MINOR_VERSION - description: The minor version of the php - default: '3' + - name: VERSION + description: The tag of go imagestream for go version + default: '1.14.7-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. @@ -1690,7 +128,7 @@ spec: - name: generate image: quay.io/openshift-pipeline/s2i workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/php:7.$(params.MINOR_VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/golang:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source @@ -1704,6 +142,7 @@ spec: - name: gen-source mountPath: /gen-source - name: push + workingDir: $(workspaces.source.path) image: $(params.BUILDER_IMAGE) command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] volumeMounts: @@ -1722,143 +161,56 @@ spec: apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: s2i-php-workspace + name: s2i-go-workspace spec: accessModes: - ReadWriteOnce resources: requests: storage: 100Mi - --- apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: s2i-python-2-pr + name: s2i-java labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, python - tekton.dev/displayName: "s2i python 2 pipelineresource" + tekton.dev/pipelines.minVersion: "0.19" + tekton.dev/tags: s2i, java, workspace + tekton.dev/displayName: "s2i java" spec: description: >- - s2i-python-2-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Python 2 builder image. + s2i-java task clones a Git repository and builds and + pushes a container image using S2I and a Java builder image. results: - name: IMAGE_DIGEST description: Digest of the image just built. params: - - name: MINOR_VERSION - description: The minor version of the python 2 - default: '7' + - name: VERSION + description: The tag of java imagestream for java version + default: 'openjdk-11-ubi8' type: string - name: PATH_CONTEXT - description: The location of the path to run s2i from. + description: The location of the path to run s2i from default: . type: string - name: TLSVERIFY description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) default: "true" type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/python-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-python-2-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/django-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-python-2-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-python-2-pr" - ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-python-2 - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, python, workspace - tekton.dev/displayName: "s2i python 2" -spec: - description: >- - s2i-python-2 task clones a Git repository and builds and - pushes a container image using S2I and a Python 2 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the python 2 - default: '7' + - name: MAVEN_ARGS_APPEND + description: Additional Maven arguments + default: "" type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . + - name: MAVEN_CLEAR_REPO + description: Remove the Maven repository after the artifact is built + default: "false" type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" + - name: MAVEN_MIRROR_URL + description: The base URL of a mirror used for retrieving artifacts + default: "" type: string - name: IMAGE description: Location of the repo where image has to be pushed @@ -1870,13 +222,48 @@ spec: - name: source mountPath: /workspace/source steps: + - name: gen-env-file + image: quay.io/openshift-pipeline/s2i + workingdir: /env-params + command: + - '/bin/sh' + - '-c' + args: + - |- + echo "MAVEN_CLEAR_REPO=$(params.MAVEN_CLEAR_REPO)" > env-file + + [[ '$(params.MAVEN_ARGS_APPEND)' != "" ]] && + echo "MAVEN_ARGS_APPEND=$(params.MAVEN_ARGS_APPEND)" >> env-file + + [[ '$(params.MAVEN_MIRROR_URL)' != "" ]] && + echo "MAVEN_MIRROR_URL=$(params.MAVEN_MIRROR_URL)" >> env-file + + echo "Generated Env file" + echo "------------------------------" + cat env-file + echo "------------------------------" + volumeMounts: + - name: envparams + mountPath: /env-params - name: generate image: quay.io/openshift-pipeline/s2i workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/python-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + command: + - 's2i' + - 'build' + - '$(params.PATH_CONTEXT)' + - 'image-registry.openshift-image-registry.svc:5000/openshift/java:$(params.VERSION)' + - '--image-scripts-url' + - 'image:///usr/local/s2i' + - '--as-dockerfile' + - '/gen-source/Dockerfile.gen' + - '--environment-file' + - '/env-params/env-file' volumeMounts: - name: gen-source mountPath: /gen-source + - name: envparams + mountPath: /env-params - name: build image: $(params.BUILDER_IMAGE) workingdir: /gen-source @@ -1888,7 +275,7 @@ spec: mountPath: /gen-source - name: push image: $(params.BUILDER_IMAGE) - workingdir: $(workspaces.source.path) + workingDir: $(workspaces.source.path) command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] volumeMounts: - name: varlibcontainers @@ -1901,42 +288,43 @@ spec: emptyDir: {} - name: gen-source emptyDir: {} + - name: envparams + emptyDir: {} --- apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: s2i-python-2-workspace + name: s2i-java-workspace spec: accessModes: - ReadWriteOnce resources: requests: storage: 100Mi - --- apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: s2i-python-3-pr + name: s2i-nodejs labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, python - tekton.dev/displayName: "s2i python 3 pipelineresource" + tekton.dev/pipelines.minVersion: "0.19" + tekton.dev/tags: s2i, nodejs, workspace + tekton.dev/displayName: "s2i nodejs" spec: description: >- - s2i-python-3-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Python 3 builder image. + s2i-nodejs task clones a Git repository and builds and + pushes a container image using S2I and a nodejs builder image. results: - name: IMAGE_DIGEST description: Digest of the image just built. params: - - name: MINOR_VERSION - description: The minor version of the python 3 - default: '6' + - name: VERSION + description: The tag of nodejs imagestream for nodejs version + default: '14-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. @@ -1946,28 +334,27 @@ spec: description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) default: "true" type: string + - name: IMAGE + description: Location of the repo where image has to be pushed + type: string - name: BUILDER_IMAGE description: The location of the buildah builder image. default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image + workspaces: + - name: source + mountPath: /workspace/source steps: - name: generate image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/python-3$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + workingdir: $(workspaces.source.path) + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/nodejs:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source - name: build image: $(params.BUILDER_IMAGE) workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] + command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] volumeMounts: - name: varlibcontainers mountPath: /var/lib/containers @@ -1975,14 +362,14 @@ spec: mountPath: /gen-source - name: push image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] + workingDir: $(workspaces.source.path) + command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] volumeMounts: - name: varlibcontainers mountPath: /var/lib/containers - name: digest-to-results image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST + script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST volumes: - name: varlibcontainers emptyDir: {} @@ -1990,51 +377,39 @@ spec: emptyDir: {} --- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-python-3-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/django-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource +apiVersion: v1 +kind: PersistentVolumeClaim metadata: - name: s2i-python-3-pr-image + name: s2i-nodejs-workspace spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-python-3-pr" - + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi --- apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: s2i-python-3 + name: s2i-php labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, python, workspace - tekton.dev/displayName: "s2i python 3" + tekton.dev/pipelines.minVersion: "0.19" + tekton.dev/tags: s2i, php, workspace + tekton.dev/displayName: "s2i php" spec: description: >- - s2i-python-3 task clones a Git repository and builds and - pushes a container image using S2I and a Python 3 builder image. + s2i-php task clones a Git repository and builds and + pushes a container image using S2I and a PHP builder image. results: - name: IMAGE_DIGEST description: Digest of the image just built. params: - - name: MINOR_VERSION - description: The minor version of the python 3 - default: '6' + - name: VERSION + description: The tag of php imagestream for php version + default: '7.4-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. @@ -2057,7 +432,7 @@ spec: - name: generate image: quay.io/openshift-pipeline/s2i workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/python-3$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/php:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source @@ -2071,8 +446,6 @@ spec: - name: gen-source mountPath: /gen-source - name: push - - workingDir: $(workspaces.source.path) image: $(params.BUILDER_IMAGE) command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] volumeMounts: @@ -2091,7 +464,7 @@ spec: apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: s2i-python-3-workspace + name: s2i-php-workspace spec: accessModes: - ReadWriteOnce @@ -2103,25 +476,25 @@ spec: apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: s2i-ruby-pr + name: s2i-python labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, ruby - tekton.dev/displayName: "s2i ruby pipelineresource" + tekton.dev/pipelines.minVersion: "0.19" + tekton.dev/tags: s2i, python, workspace + tekton.dev/displayName: "s2i python" spec: description: >- - s2i-ruby-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Ruby builder image. + s2i-python task clones a Git repository and builds and + pushes a container image using S2I and a Python builder image. results: - name: IMAGE_DIGEST description: Digest of the image just built. params: - - name: MINOR_VERSION - description: The minor version of the ruby - default: '5' + - name: VERSION + description: The tag of python imagestream for python version + default: '3.8-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. @@ -2131,43 +504,43 @@ spec: description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) default: "true" type: string + - name: IMAGE + description: Location of the repo where image has to be pushed + type: string - name: BUILDER_IMAGE description: The location of the buildah builder image. default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image + workspaces: + - name: source + mountPath: /workspace/source steps: - name: generate image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/ruby-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + workingdir: $(workspaces.source.path) + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/python:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source - name: build image: $(params.BUILDER_IMAGE) workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] + command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] volumeMounts: - name: varlibcontainers mountPath: /var/lib/containers - name: gen-source mountPath: /gen-source - name: push + + workingDir: $(workspaces.source.path) image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] + command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] volumeMounts: - name: varlibcontainers mountPath: /var/lib/containers - name: digest-to-results image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST + script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST volumes: - name: varlibcontainers emptyDir: {} @@ -2175,27 +548,16 @@ spec: emptyDir: {} --- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-ruby-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/ruby-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource +apiVersion: v1 +kind: PersistentVolumeClaim metadata: - name: s2i-ruby-pr-image + name: s2i-python-workspace spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-ruby-pr" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 100Mi --- apiVersion: tekton.dev/v1beta1 @@ -2205,7 +567,7 @@ metadata: labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" + tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, ruby, workspace tekton.dev/displayName: "s2i ruby" spec: @@ -2217,9 +579,9 @@ spec: - name: IMAGE_DIGEST description: Digest of the image just built. params: - - name: MINOR_VERSION - description: The minor version of the ruby - default: '5' + - name: VERSION + description: The tag of ruby imagestream for ruby version + default: '2.7-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. @@ -2242,7 +604,7 @@ spec: - name: generate image: quay.io/openshift-pipeline/s2i workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/ruby-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/ruby:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source @@ -2270,7 +632,6 @@ spec: emptyDir: {} - name: gen-source emptyDir: {} - --- apiVersion: v1 kind: PersistentVolumeClaim @@ -2294,69 +655,14 @@ spec: - name: revision workspaces: - name: source - - name: s2i-dotnet-1-workspace - - name: s2i-dotnet-2-workspace - - name: s2i-dotnet-3-workspace + - name: s2i-dotnet-workspace - name: s2i-go-workspace - - name: s2i-java-11-workspace - - name: s2i-java-8-workspace + - name: s2i-java-workspace - name: s2i-nodejs-workspace - name: s2i-php-workspace - - name: s2i-python-2-workspace - - name: s2i-python-3-workspace + - name: s2i-python-workspace - name: s2i-ruby-workspace - - resources: - - name: buildah-pr-nocode - type: git - - name: buildah-pr-image - type: image - - name: s2i-dotnet-1-pr-repo - type: git - - name: s2i-dotnet-1-pr-image - type: image - - name: s2i-dotnet-2-pr-repo - type: git - - name: s2i-dotnet-2-pr-image - type: image - - name: s2i-dotnet-3-pr-repo - type: git - - name: s2i-dotnet-3-pr-image - type: image - - name: s2i-go-pr-repo - type: git - - name: s2i-go-pr-image - type: image - - name: s2i-java-11-pr-repo - type: git - - name: s2i-java-11-pr-image - type: image - - name: s2i-java-8-pr-repo - type: git - - name: s2i-java-8-pr-image - type: image - - name: s2i-nodejs-pr-repo - type: git - - name: s2i-nodejs-pr-image - type: image - - name: s2i-php-pr-repo - type: git - - name: s2i-php-pr-image - type: image - - name: s2i-python-2-pr-repo - type: git - - name: s2i-python-2-pr-image - type: image - - name: s2i-python-3-pr-repo - type: git - - name: s2i-python-3-pr-image - type: image - - name: s2i-ruby-pr-repo - type: git - - name: s2i-ruby-pr-image - type: image - - + tasks: - name: fetch @@ -2444,143 +750,8 @@ spec: script: | echo "OK: pre-step has passed" - - name: buildah-pr - params: - - name: TLSVERIFY - value: 'false' - resources: - inputs: - - name: source - resource: buildah-pr-nocode - outputs: - - name: image - resource: buildah-pr-image - runAfter: - - prestep - taskRef: - name: buildah-pr - - - name: s2i-dotnet-1-pr-run - params: - - name: TLSVERIFY - value: 'false' - - name: PATH_CONTEXT - value: app - resources: - inputs: - - name: source - resource: s2i-dotnet-1-pr-repo - outputs: - - name: image - resource: s2i-dotnet-1-pr-image - runAfter: - - prestep - taskRef: - name: s2i-dotnet-1-pr - - - name: fetch-repository-s2i-dotnet-1 - params: - - name: url - value: https://github.com/redhat-developer/s2i-dotnetcore-ex - - name: subdirectory - value: '' - - name: deleteExisting - value: 'true' - - name: revision - value: dotnetcore-1.1 - runAfter: - - prestep - taskRef: - name: git-clone - workspaces: - - name: output - workspace: s2i-dotnet-1-workspace - - name: s2i-dotnet-1-test - params: - - name: TLSVERIFY - value: 'false' - - name: PATH_CONTEXT - value: app - - name: IMAGE - value: image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-1 - runAfter: - - fetch-repository-s2i-dotnet-1 - taskRef: - name: s2i-dotnet-1 - workspaces: - - name: source - workspace: s2i-dotnet-1-workspace - - - name: s2i-dotnet-2-pr-run - params: - - name: TLSVERIFY - value: 'false' - - name: PATH_CONTEXT - value: app - resources: - inputs: - - name: source - resource: s2i-dotnet-2-pr-repo - outputs: - - name: image - resource: s2i-dotnet-2-pr-image - runAfter: - - prestep - taskRef: - name: s2i-dotnet-2-pr - - - name: fetch-repository-s2i-dotnet-2 - params: - - name: url - value: https://github.com/redhat-developer/s2i-dotnetcore-ex - - name: subdirectory - value: '' - - name: deleteExisting - value: 'true' - - name: revision - value: dotnetcore-2.2 - runAfter: - - prestep - taskRef: - name: git-clone - workspaces: - - name: output - workspace: s2i-dotnet-2-workspace - - name: s2i-dotnet-2-test - params: - - name: TLSVERIFY - value: 'false' - - name: PATH_CONTEXT - value: app - - name: IMAGE - value: image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-2 - runAfter: - - fetch-repository-s2i-dotnet-2 - taskRef: - name: s2i-dotnet-2 - workspaces: - - name: source - workspace: s2i-dotnet-2-workspace - - - name: s2i-dotnet-3-pr-run - params: - - name: TLSVERIFY - value: 'false' - - name: PATH_CONTEXT - value: app - resources: - inputs: - - name: source - resource: s2i-dotnet-3-pr-repo - outputs: - - name: image - resource: s2i-dotnet-3-pr-image - runAfter: - - prestep - taskRef: - name: s2i-dotnet-3-pr - - name: fetch-repository-s2i-dotnet-3 + - name: fetch-repository-s2i-dotnet params: - name: url value: https://github.com/redhat-developer/s2i-dotnetcore-ex @@ -2596,38 +767,22 @@ spec: name: git-clone workspaces: - name: output - workspace: s2i-dotnet-3-workspace - - name: s2i-dotnet-3-test + workspace: s2i-dotnet-workspace + - name: s2i-dotnet-test params: - name: TLSVERIFY value: 'false' - name: PATH_CONTEXT value: app - name: IMAGE - value: image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-3 + value: image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet runAfter: - - fetch-repository-s2i-dotnet-3 + - fetch-repository-s2i-dotnet taskRef: - name: s2i-dotnet-3 + name: s2i-dotnet workspaces: - name: source - workspace: s2i-dotnet-3-workspace - - - name: s2i-go-pr - params: - - name: TLSVERIFY - value: 'false' - resources: - inputs: - - name: source - resource: s2i-go-pr-repo - outputs: - - name: image - resource: s2i-go-pr-image - runAfter: - - prestep - taskRef: - name: s2i-go-pr + workspace: s2i-dotnet-workspace - name: fetch-repository-s2i-go params: @@ -2660,23 +815,7 @@ spec: - name: source workspace: s2i-go-workspace - - name: s2i-java-11-pr - params: - - name: TLSVERIFY - value: 'false' - resources: - inputs: - - name: source - resource: s2i-java-11-pr-repo - outputs: - - name: image - resource: s2i-java-11-pr-image - runAfter: - - prestep - taskRef: - name: s2i-java-11-pr - - - name: fetch-repository-s2i-java-11 + - name: fetch-repository-s2i-java params: - name: url value: https://github.com/piyush-garg/spring-petclinic @@ -2692,83 +831,20 @@ spec: name: git-clone workspaces: - name: output - workspace: s2i-java-11-workspace - - name: s2i-java-11-test - params: - - name: TLSVERIFY - value: 'false' - - name: IMAGE - value: image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-java-11 - runAfter: - - fetch-repository-s2i-java-11 - taskRef: - name: s2i-java-11 - workspaces: - - name: source - workspace: s2i-java-11-workspace - - - name: s2i-java-8-pr - params: - - name: TLSVERIFY - value: 'false' - resources: - inputs: - - name: source - resource: s2i-java-8-pr-repo - outputs: - - name: image - resource: s2i-java-8-pr-image - runAfter: - - prestep - taskRef: - name: s2i-java-8-pr - - - name: fetch-repository-s2i-java-8 - params: - - name: url - value: https://github.com/spring-projects/spring-petclinic - - name: subdirectory - value: '' - - name: deleteExisting - value: 'true' - - name: revision - value: d367e2b4b41a2de899b0f438bc984a7c1c011b77 - runAfter: - - prestep - taskRef: - name: git-clone - workspaces: - - name: output - workspace: s2i-java-8-workspace - - name: s2i-java-8-test + workspace: s2i-java-workspace + - name: s2i-java-test params: - name: TLSVERIFY value: 'false' - name: IMAGE - value: image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-java-8 + value: image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-java runAfter: - - fetch-repository-s2i-java-8 + - fetch-repository-s2i-java taskRef: - name: s2i-java-8 + name: s2i-java workspaces: - name: source - workspace: s2i-java-8-workspace - - - name: s2i-nodejs-pr - params: - - name: TLSVERIFY - value: 'false' - resources: - inputs: - - name: source - resource: s2i-nodejs-pr-repo - outputs: - - name: image - resource: s2i-nodejs-pr-image - runAfter: - - prestep - taskRef: - name: s2i-nodejs-pr + workspace: s2i-java-workspace - name: fetch-repository-s2i-nodejs params: @@ -2801,24 +877,6 @@ spec: - name: source workspace: s2i-nodejs-workspace - - name: s2i-php-pr - params: - - name: TLSVERIFY - value: 'false' - - name: PATH_CONTEXT - value: test/test-app - resources: - inputs: - - name: source - resource: s2i-php-pr-repo - outputs: - - name: image - resource: s2i-php-pr-image - runAfter: - - prestep - taskRef: - name: s2i-php-pr - - name: fetch-repository-s2i-php params: - name: url @@ -2852,70 +910,7 @@ spec: - name: source workspace: s2i-php-workspace - - name: s2i-python-2-pr - params: - - name: TLSVERIFY - value: 'false' - resources: - inputs: - - name: source - resource: s2i-python-2-pr-repo - outputs: - - name: image - resource: s2i-python-2-pr-image - runAfter: - - prestep - taskRef: - name: s2i-python-2-pr - - - name: fetch-repository-s2i-python-2 - params: - - name: url - value: https://github.com/sclorg/django-ex - - name: subdirectory - value: '' - - name: deleteExisting - value: 'true' - - name: revision - value: master - runAfter: - - prestep - taskRef: - name: git-clone - workspaces: - - name: output - workspace: s2i-python-2-workspace - - name: s2i-python-2-test - params: - - name: TLSVERIFY - value: 'false' - - name: IMAGE - value: image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-python-2 - runAfter: - - fetch-repository-s2i-python-2 - taskRef: - name: s2i-python-2 - workspaces: - - name: source - workspace: s2i-python-2-workspace - - - name: s2i-python-3-pr - params: - - name: TLSVERIFY - value: 'false' - resources: - inputs: - - name: source - resource: s2i-python-3-pr-repo - outputs: - - name: image - resource: s2i-python-3-pr-image - runAfter: - - prestep - taskRef: - name: s2i-python-3-pr - - - name: fetch-repository-s2i-python-3 + - name: fetch-repository-s2i-python params: - name: url value: https://github.com/sclorg/django-ex @@ -2931,36 +926,20 @@ spec: name: git-clone workspaces: - name: output - workspace: s2i-python-3-workspace - - name: s2i-python-3-test + workspace: s2i-python-workspace + - name: s2i-python-test params: - name: TLSVERIFY value: 'false' - name: IMAGE - value: image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-python-3 + value: image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-python runAfter: - - fetch-repository-s2i-python-3 + - fetch-repository-s2i-python taskRef: - name: s2i-python-3 + name: s2i-python workspaces: - name: source - workspace: s2i-python-3-workspace - - - name: s2i-ruby-pr - params: - - name: TLSVERIFY - value: 'false' - resources: - inputs: - - name: source - resource: s2i-ruby-pr-repo - outputs: - - name: image - resource: s2i-ruby-pr-image - runAfter: - - prestep - taskRef: - name: s2i-ruby-pr + workspace: s2i-python-workspace - name: fetch-repository-s2i-ruby params: @@ -2993,7 +972,6 @@ spec: - name: source workspace: s2i-ruby-workspace - finally: - name: finally taskSpec: @@ -3051,115 +1029,25 @@ spec: resources: requests: storage: 500Mi - - - name: s2i-dotnet-1-workspace - persistentvolumeclaim: - claimName: s2i-dotnet-1-workspace - - name: s2i-dotnet-2-workspace - persistentvolumeclaim: - claimName: s2i-dotnet-2-workspace - - name: s2i-dotnet-3-workspace + + - name: s2i-dotnet-workspace persistentvolumeclaim: - claimName: s2i-dotnet-3-workspace + claimName: s2i-dotnet-workspace - name: s2i-go-workspace persistentvolumeclaim: claimName: s2i-go-workspace - - name: s2i-java-11-workspace + - name: s2i-java-workspace persistentvolumeclaim: - claimName: s2i-java-11-workspace - - name: s2i-java-8-workspace - persistentvolumeclaim: - claimName: s2i-java-8-workspace + claimName: s2i-java-workspace - name: s2i-nodejs-workspace persistentvolumeclaim: claimName: s2i-nodejs-workspace - name: s2i-php-workspace persistentvolumeclaim: claimName: s2i-php-workspace - - name: s2i-python-2-workspace - persistentvolumeclaim: - claimName: s2i-python-2-workspace - - name: s2i-python-3-workspace + - name: s2i-python-workspace persistentvolumeclaim: - claimName: s2i-python-3-workspace + claimName: s2i-python-workspace - name: s2i-ruby-workspace persistentvolumeclaim: claimName: s2i-ruby-workspace - - - - resources: - - name: buildah-pr-nocode - resourceRef: - name: buildah-pr-nocode - - name: buildah-pr-image - resourceRef: - name: buildah-pr-image - - name: s2i-dotnet-1-pr-repo - resourceRef: - name: s2i-dotnet-1-pr-repo - - name: s2i-dotnet-1-pr-image - resourceRef: - name: s2i-dotnet-1-pr-image - - name: s2i-dotnet-2-pr-repo - resourceRef: - name: s2i-dotnet-2-pr-repo - - name: s2i-dotnet-2-pr-image - resourceRef: - name: s2i-dotnet-2-pr-image - - name: s2i-dotnet-3-pr-repo - resourceRef: - name: s2i-dotnet-3-pr-repo - - name: s2i-dotnet-3-pr-image - resourceRef: - name: s2i-dotnet-3-pr-image - - name: s2i-go-pr-repo - resourceRef: - name: s2i-go-pr-repo - - name: s2i-go-pr-image - resourceRef: - name: s2i-go-pr-image - - name: s2i-java-11-pr-repo - resourceRef: - name: s2i-java-11-pr-repo - - name: s2i-java-11-pr-image - resourceRef: - name: s2i-java-11-pr-image - - name: s2i-java-8-pr-repo - resourceRef: - name: s2i-java-8-pr-repo - - name: s2i-java-8-pr-image - resourceRef: - name: s2i-java-8-pr-image - - name: s2i-nodejs-pr-repo - resourceRef: - name: s2i-nodejs-pr-repo - - name: s2i-nodejs-pr-image - resourceRef: - name: s2i-nodejs-pr-image - - name: s2i-php-pr-repo - resourceRef: - name: s2i-php-pr-repo - - name: s2i-php-pr-image - resourceRef: - name: s2i-php-pr-image - - name: s2i-python-2-pr-repo - resourceRef: - name: s2i-python-2-pr-repo - - name: s2i-python-2-pr-image - resourceRef: - name: s2i-python-2-pr-image - - name: s2i-python-3-pr-repo - resourceRef: - name: s2i-python-3-pr-repo - - name: s2i-python-3-pr-image - resourceRef: - name: s2i-python-3-pr-image - - name: s2i-ruby-pr-repo - resourceRef: - name: s2i-ruby-pr-repo - - name: s2i-ruby-pr-image - resourceRef: - name: s2i-ruby-pr-image - - diff --git a/task/buildah-pr/0.1/README.md b/task/buildah-pr/0.1/README.md deleted file mode 100644 index 88704e4..0000000 --- a/task/buildah-pr/0.1/README.md +++ /dev/null @@ -1,99 +0,0 @@ -# Buildah (PipelineResource) - -This Task builds source into a container image using Project Atomic's -[Buildah](https://github.com/projectatomic/buildah) build tool. It uses -Buildah's support for building from -[`Dockerfile`](https://docs.docker.com/engine/reference/builder/)s, using its -`buildah bud` command. This command executes the directives in the `Dockerfile` -to assemble a container image, then pushes that image to a container registry. - -## Install the Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/buildah-pr/0.1/buildah-pr.yaml -``` - -## Inputs - -### Parameters - -* **BUILDER_IMAGE:**: The name of the image containing the Buildah tool. See - note below. (_default:_ quay.io/buildah/stable:v1.17.0) -* **DOCKERFILE**: The path to the `Dockerfile` to execute (_default:_ - `./Dockerfile`) -* **CONTEXT**: Path to the directory to use as context (_default:_ - `.`) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) -* **FORMAT**: The format of the built container, oci or docker (_default:_ - `oci`) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specify the image that should - be built. - -## Creating a ServiceAccount - -Buildah builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the Task to fetch a Git repo, and build and push a container -image using Buildah. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: buildah-build-my-repo -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: buildah-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/my-user/my-repo - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: gcr.io/my-repo/my-image -``` - -In this example, the Git repo being built is expected to have a `Dockerfile` at -the root of the repository. \ No newline at end of file diff --git a/task/buildah-pr/0.1/buildah-pr.yaml b/task/buildah-pr/0.1/buildah-pr.yaml deleted file mode 100644 index acdddea..0000000 --- a/task/buildah-pr/0.1/buildah-pr.yaml +++ /dev/null @@ -1,69 +0,0 @@ ---- -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: buildah-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.14.3" - tekton.dev/tags: buildah - tekton.dev/displayName: "buildah pipelineresource" -spec: - description: >- - Buildah task builds source into a container image and - then pushes it to a container registry. - - Buildah Task builds source into a container image using Project Atomic's - Buildah build tool.It uses Buildah's support for building from Dockerfiles, - using its buildah bud command.This command executes the directives in the - Dockerfile to assemble a container image, then pushes that image to a - container registry. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - - name: DOCKERFILE - description: Path to the Dockerfile to build. - default: ./Dockerfile - - name: CONTEXT - description: Path to the directory to use as context. - default: . - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - - name: FORMAT - description: The format of the built container, oci or docker - default: "oci" - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: build - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'bud', '--storage-driver=vfs', '--format=$(params.FORMAT)', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '$(params.DOCKERFILE)', '-t', '$(resources.outputs.image.url)', '$(params.CONTEXT)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} diff --git a/task/buildah-pr/0.1/tests/resource.yaml b/task/buildah-pr/0.1/tests/resource.yaml deleted file mode 100644 index ad2edac..0000000 --- a/task/buildah-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: buildah-pr-nocode -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/kelseyhightower/nocode ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: buildah-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-1" diff --git a/task/buildah-pr/0.1/tests/step.yaml b/task/buildah-pr/0.1/tests/step.yaml deleted file mode 100644 index 7cdb2c5..0000000 --- a/task/buildah-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- name: buildah-pr - taskRef: - name: buildah-pr - resources: - outputs: - - name: image - resource: buildah-pr-image - inputs: - - name: source - resource: buildah-pr-nocode - params: - - name: TLSVERIFY - value: "false" diff --git a/task/s2i-dotnet-1-pr/0.1/README.md b/task/s2i-dotnet-1-pr/0.1/README.md deleted file mode 100644 index 545de7e..0000000 --- a/task/s2i-dotnet-1-pr/0.1/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# .NET Core 1 Source-to-Image (PipelineResource) - -This task can be used for building `.NET Core 1` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This tasks uses the s2i-dotnet image build from [redhat-developer/s2i-dotnetcore](https://github.com/redhat-developer/s2i-dotnetcore). - -.NET Core versions currently provided are: - -- 1.0 (RHEL 7, CentOS 7) -- 1.1 (RHEL 7) - -## Installing the .NET Core 1 Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-dotnet-1-pr/0.1/s2i-dotnet-1-pr.yaml -``` - -## Inputs - -### Parameters - -* **MINOR_VERSION**: Minor version of the .NET Core 1 - (_default: 1_) -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: ._) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the .NET Core 1 Task to fetch a Git repository and builds and -pushes a container image using S2I and a .NET Core 1 builder image. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-dotnet-1-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-dotnet-1-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-dotnet-1-pr/0.1/s2i-dotnet-1-pr.yaml b/task/s2i-dotnet-1-pr/0.1/s2i-dotnet-1-pr.yaml deleted file mode 100644 index 81f7d5d..0000000 --- a/task/s2i-dotnet-1-pr/0.1/s2i-dotnet-1-pr.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet-1-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, dotnet - tekton.dev/displayName: "s2i dotnet 1 pipelineresource" -spec: - description: >- - s2i-dotnet-1-pr task fetches a Git repository and builds and - pushes a container image using S2I and a .NET Core 1 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - - name: MINOR_VERSION - description: The minor version of the .NET Core 1 - default: '1' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/dotnet/dotnetcore-1$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-dotnet-1-pr/0.1/tests/resource.yaml b/task/s2i-dotnet-1-pr/0.1/tests/resource.yaml deleted file mode 100644 index 8eab767..0000000 --- a/task/s2i-dotnet-1-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-1-pr-repo -spec: - type: git - params: - - name: revision - value: dotnetcore-1.1 - - name: url - value: https://github.com/redhat-developer/s2i-dotnetcore-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-1-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-1-pr" diff --git a/task/s2i-dotnet-1-pr/0.1/tests/step.yaml b/task/s2i-dotnet-1-pr/0.1/tests/step.yaml deleted file mode 100644 index 26e00f2..0000000 --- a/task/s2i-dotnet-1-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- name: s2i-dotnet-1-pr-run - taskRef: - name: s2i-dotnet-1-pr - resources: - outputs: - - name: image - resource: s2i-dotnet-1-pr-image - inputs: - - name: source - resource: s2i-dotnet-1-pr-repo - params: - - name: TLSVERIFY - value: "false" - - name: PATH_CONTEXT - value: "app" diff --git a/task/s2i-dotnet-1/0.1/s2i-dotnet-1.yaml b/task/s2i-dotnet-1/0.1/s2i-dotnet-1.yaml deleted file mode 100644 index 6cbdb6c..0000000 --- a/task/s2i-dotnet-1/0.1/s2i-dotnet-1.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet-1 - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, dotnet, workspace - tekton.dev/displayName: "s2i dotnet 1" -spec: - description: >- - s2i-dotnet-1 task clones a Git repository and builds and - pushes a container image using S2I and a .NET Core 1 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the .NET Core 1 - default: '1' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - workspaces: - - name: source - mountPath: /workspace/source - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/dotnet/dotnetcore-1$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-dotnet-1/0.1/tests/step.yaml b/task/s2i-dotnet-1/0.1/tests/step.yaml deleted file mode 100644 index 1ff0051..0000000 --- a/task/s2i-dotnet-1/0.1/tests/step.yaml +++ /dev/null @@ -1,31 +0,0 @@ -- name: fetch-repository-s2i-dotnet-1 - taskRef: - name: git-clone - workspaces: - - name: output - workspace: s2i-dotnet-1-workspace - params: - - name: url - value: https://github.com/redhat-developer/s2i-dotnetcore-ex - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: revision - value: "dotnetcore-1.1" - -- name: s2i-dotnet-1-test - taskRef: - name: s2i-dotnet-1 - runAfter: - - fetch-repository-s2i-dotnet-1 - workspaces: - - name: source - workspace: s2i-dotnet-1-workspace - params: - - name: TLSVERIFY - value: "false" - - name: PATH_CONTEXT - value: "app" - - name: IMAGE - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-1" diff --git a/task/s2i-dotnet-2-pr/0.1/README.md b/task/s2i-dotnet-2-pr/0.1/README.md deleted file mode 100644 index a56ece7..0000000 --- a/task/s2i-dotnet-2-pr/0.1/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# .NET Core 2 Source-to-Image (PipelineResource) - -This task can be used for building `.NET Core 2` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This tasks uses the s2i-dotnet image build from [redhat-developer/s2i-dotnetcore](https://github.com/redhat-developer/s2i-dotnetcore). - -.NET Core versions currently provided are: - -- 2.1 (RHEL 7, RHEL 8, CentOS 7) -- 2.2 (RHEL 7, CentOS 7) - -## Installing the .NET Core 2 Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-dotnet-2-pr/0.1/s2i-dotnet-2-pr.yaml -``` - -## Inputs - -### Parameters - -* **MINOR_VERSION**: Minor version of the .NET Core 2 - (_default: 2_) -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: ._) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the .NET Core 2 Task to fetch a Git repository and builds and -pushes a container image using S2I and a .NET Core 2 builder image. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-dotnet-2-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-dotnet-2-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-dotnet-2-pr/0.1/s2i-dotnet-2-pr.yaml b/task/s2i-dotnet-2-pr/0.1/s2i-dotnet-2-pr.yaml deleted file mode 100644 index 3b97f40..0000000 --- a/task/s2i-dotnet-2-pr/0.1/s2i-dotnet-2-pr.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet-2-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, dotnet - tekton.dev/displayName: "s2i dotnet 2 pipelineresource" -spec: - description: >- - s2i-dotnet-2-pr task fetches a Git repository and builds and - pushes a container image using S2I and a .NET Core 2 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the .NET Core 2 - default: '2' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/dotnet/dotnet-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-dotnet-2-pr/0.1/tests/resource.yaml b/task/s2i-dotnet-2-pr/0.1/tests/resource.yaml deleted file mode 100644 index 31bb3d0..0000000 --- a/task/s2i-dotnet-2-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-2-pr-repo -spec: - type: git - params: - - name: revision - value: dotnetcore-2.2 - - name: url - value: https://github.com/redhat-developer/s2i-dotnetcore-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-2-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-2-pr" diff --git a/task/s2i-dotnet-2-pr/0.1/tests/step.yaml b/task/s2i-dotnet-2-pr/0.1/tests/step.yaml deleted file mode 100644 index 1f9f1b4..0000000 --- a/task/s2i-dotnet-2-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- name: s2i-dotnet-2-pr-run - taskRef: - name: s2i-dotnet-2-pr - resources: - outputs: - - name: image - resource: s2i-dotnet-2-pr-image - inputs: - - name: source - resource: s2i-dotnet-2-pr-repo - params: - - name: TLSVERIFY - value: "false" - - name: PATH_CONTEXT - value: "app" diff --git a/task/s2i-dotnet-2/0.1/s2i-dotnet-2.yaml b/task/s2i-dotnet-2/0.1/s2i-dotnet-2.yaml deleted file mode 100644 index be0af5c..0000000 --- a/task/s2i-dotnet-2/0.1/s2i-dotnet-2.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet-2 - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, dotnet, workspace - tekton.dev/displayName: "s2i dotnet 2" -spec: - description: >- - s2i-dotnet-2 task clones a Git repository and builds and - pushes a container image using S2I and a .NET Core 2 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - - name: MINOR_VERSION - description: The minor version of the .NET Core 2 - default: '2' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - workspaces: - - name: source - mountPath: /workspace/source - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/dotnet/dotnet-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-dotnet-2/0.1/tests/pv.yaml b/task/s2i-dotnet-2/0.1/tests/pv.yaml deleted file mode 100644 index f47b6a9..0000000 --- a/task/s2i-dotnet-2/0.1/tests/pv.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: s2i-dotnet-2-workspace -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi diff --git a/task/s2i-dotnet-2/0.1/tests/step.yaml b/task/s2i-dotnet-2/0.1/tests/step.yaml deleted file mode 100644 index 8f73b97..0000000 --- a/task/s2i-dotnet-2/0.1/tests/step.yaml +++ /dev/null @@ -1,31 +0,0 @@ -- name: fetch-repository-s2i-dotnet-2 - taskRef: - name: git-clone - workspaces: - - name: output - workspace: s2i-dotnet-2-workspace - params: - - name: url - value: https://github.com/redhat-developer/s2i-dotnetcore-ex - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: revision - value: "dotnetcore-2.2" - -- name: s2i-dotnet-2-test - taskRef: - name: s2i-dotnet-2 - runAfter: - - fetch-repository-s2i-dotnet-2 - workspaces: - - name: source - workspace: s2i-dotnet-2-workspace - params: - - name: TLSVERIFY - value: "false" - - name: PATH_CONTEXT - value: "app" - - name: IMAGE - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-2" diff --git a/task/s2i-dotnet-3-pr/0.1/README.md b/task/s2i-dotnet-3-pr/0.1/README.md deleted file mode 100644 index bd67881..0000000 --- a/task/s2i-dotnet-3-pr/0.1/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# .NET Core 3 Source-to-Image (PipelineResource) - -This task can be used for building `.NET Core 3` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This tasks uses the s2i-dotnet image build from [redhat-developer/s2i-dotnetcore](https://github.com/redhat-developer/s2i-dotnetcore). - -.NET Core versions currently provided are: - -- 3.0 (RHEL 7, RHEL 8) -- 3.1 (RHEL 7, CentOS 7) - -## Installing the .NET Core 3 Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-dotnet-3-pr/0.1/s2i-dotnet-3-pr.yaml -``` - -## Inputs - -### Parameters - -* **MINOR_VERSION**: Minor version of the .NET Core 3 - (_default: 1_) -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: ._) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the .NET Core 3 Task to fetch a Git repository and builds and -pushes a container image using S2I and a .NET Core 3 builder image. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-dotnet-3-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-dotnet-3-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-dotnet-3-pr/0.1/s2i-dotnet-3-pr.yaml b/task/s2i-dotnet-3-pr/0.1/s2i-dotnet-3-pr.yaml deleted file mode 100644 index 2e0ddf9..0000000 --- a/task/s2i-dotnet-3-pr/0.1/s2i-dotnet-3-pr.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet-3-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, dotnet - tekton.dev/displayName: "s2i dotnet 3 pipelineresource" -spec: - description: >- - s2i-dotnet-3-pr task fetches a Git repository and builds and - pushes a container image using S2I and a .NET Core 3 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the .NET Core 3 - default: '1' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/dotnet:3.$(params.MINOR_VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - workingDir: $(resources.inputs.source.path) - image: $(params.BUILDER_IMAGE) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-dotnet-3-pr/0.1/tests/resource.yaml b/task/s2i-dotnet-3-pr/0.1/tests/resource.yaml deleted file mode 100644 index 04a5f2c..0000000 --- a/task/s2i-dotnet-3-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-3-pr-repo -spec: - type: git - params: - - name: revision - value: "dotnetcore-3.1" - - name: url - value: https://github.com/redhat-developer/s2i-dotnetcore-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-dotnet-3-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-3-pr" diff --git a/task/s2i-dotnet-3-pr/0.1/tests/step.yaml b/task/s2i-dotnet-3-pr/0.1/tests/step.yaml deleted file mode 100644 index 5363498..0000000 --- a/task/s2i-dotnet-3-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- name: s2i-dotnet-3-pr-run - taskRef: - name: s2i-dotnet-3-pr - resources: - outputs: - - name: image - resource: s2i-dotnet-3-pr-image - inputs: - - name: source - resource: s2i-dotnet-3-pr-repo - params: - - name: TLSVERIFY - value: "false" - - name: PATH_CONTEXT - value: "app" diff --git a/task/s2i-dotnet-3/0.1/tests/pv.yaml b/task/s2i-dotnet-3/0.1/tests/pv.yaml deleted file mode 100644 index 26a2eac..0000000 --- a/task/s2i-dotnet-3/0.1/tests/pv.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: s2i-dotnet-3-workspace -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi diff --git a/task/s2i-dotnet-3/0.1/README.md b/task/s2i-dotnet/0.1/README.md similarity index 83% rename from task/s2i-dotnet-3/0.1/README.md rename to task/s2i-dotnet/0.1/README.md index fb02d81..0f25455 100644 --- a/task/s2i-dotnet-3/0.1/README.md +++ b/task/s2i-dotnet/0.1/README.md @@ -1,25 +1,28 @@ -# .NET Core 3 Source-to-Image +# .NET Core Source-to-Image -This task can be used for building `.NET Core 3` apps as reproducible Docker +This task can be used for building `.NET Core` apps as reproducible Docker images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) is a toolkit and a workflow for building reproducible container images from source code. This tasks uses the s2i-dotnet image build from [redhat-developer/s2i-dotnetcore](https://github.com/redhat-developer/s2i-dotnetcore). .NET Core versions currently provided are: +- 2.1 +- 2.7-el7 +- 2.1-ubi8 +- 3.1 +- 3.1-el7 +- 3.1-ubi8 -- 3.0 (RHEL 7, RHEL 8) -- 3.1 (RHEL 7, CentOS 7) - -## Installing the .NET Core 3 Task +## Installing the .NET Core Task ``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-dotnet-3/0.1/s2i-dotnet-3.yaml +kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-dotnet/0.1/s2i-dotnet.yaml ``` ## Parameters -* **MINOR_VERSION**: Minor version of the .NET Core 3 - (_default: 1_) +* **VERSION**: Version of the .NET Core + (_default: 3.1-ubi8_) * **PATH_CONTEXT**: Source path from where S2I command needs to be run (_default: ._) * **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a @@ -59,7 +62,7 @@ oc adm policy add-role-to-user edit -z pipeline apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: - name: s2i-dotnet-3-pipeline + name: s2i-dotnet-pipeline spec: params: - name: IMAGE @@ -83,7 +86,7 @@ spec: value: "true" - name: s2i taskRef: - name: s2i-dotnet-3 + name: s2i-dotnet workspaces: - name: source workspace: shared-workspace @@ -94,19 +97,19 @@ spec: ## Creating the pipelinerun -This PipelineRun runs the .NET Core 3 Task to fetch a Git repository and builds and -pushes a container image using S2I and a .NET Core 3 builder image. +This PipelineRun runs the .NET Core Task to fetch a Git repository and builds and +pushes a container image using S2I and a .NET Core builder image. ```yaml apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: - name: s2i-dotnet-3-pipelinerun + name: s2i-dotnet-pipelinerun spec: # Use service account with git and image repo credentials serviceAccountName: pipeline pipelineRunRef: - name: s2i-dotnet-3-pipeline + name: s2i-dotnet-pipeline params: - name: IMAGE value: quay.io/my-repo/my-image-name diff --git a/task/s2i-dotnet-3/0.1/s2i-dotnet-3.yaml b/task/s2i-dotnet/0.1/s2i-dotnet.yaml similarity index 82% rename from task/s2i-dotnet-3/0.1/s2i-dotnet-3.yaml rename to task/s2i-dotnet/0.1/s2i-dotnet.yaml index ce0cd9a..16884bf 100644 --- a/task/s2i-dotnet-3/0.1/s2i-dotnet-3.yaml +++ b/task/s2i-dotnet/0.1/s2i-dotnet.yaml @@ -1,17 +1,17 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: s2i-dotnet-3 + name: s2i-dotnet labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" + tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, dotnet, workspace - tekton.dev/displayName: "s2i dotnet 3" + tekton.dev/displayName: "s2i dotnet" spec: description: >- - s2i-dotnet-3 task fetches a Git repository and builds and - pushes a container image using S2I and a .NET Core 3 builder image. + s2i-dotnet task fetches a Git repository and builds and + pushes a container image using S2I and a .NET Core builder image. results: - name: IMAGE_DIGEST @@ -20,9 +20,9 @@ spec: - name: BUILDER_IMAGE description: The location of the buildah builder image. default: quay.io/buildah/stable:v1.17.0 - - name: MINOR_VERSION - description: The minor version of the .NET Core 3 - default: '1' + - name: VERSION + description: The tag of .NET imagestream for .NET version + default: '3.1-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. @@ -42,7 +42,7 @@ spec: - name: generate image: quay.io/openshift-pipeline/s2i workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/dotnet:3.$(params.MINOR_VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/dotnet:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source diff --git a/task/s2i-java-8/0.1/tests/pv.yaml b/task/s2i-dotnet/0.1/tests/pv.yaml similarity index 83% rename from task/s2i-java-8/0.1/tests/pv.yaml rename to task/s2i-dotnet/0.1/tests/pv.yaml index c7ec0e9..1644666 100644 --- a/task/s2i-java-8/0.1/tests/pv.yaml +++ b/task/s2i-dotnet/0.1/tests/pv.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: s2i-java-8-workspace + name: s2i-dotnet-workspace spec: accessModes: - ReadWriteOnce diff --git a/task/s2i-dotnet-3/0.1/tests/step.yaml b/task/s2i-dotnet/0.1/tests/step.yaml similarity index 69% rename from task/s2i-dotnet-3/0.1/tests/step.yaml rename to task/s2i-dotnet/0.1/tests/step.yaml index f797cf5..eacbaf8 100644 --- a/task/s2i-dotnet-3/0.1/tests/step.yaml +++ b/task/s2i-dotnet/0.1/tests/step.yaml @@ -1,9 +1,9 @@ -- name: fetch-repository-s2i-dotnet-3 +- name: fetch-repository-s2i-dotnet taskRef: name: git-clone workspaces: - name: output - workspace: s2i-dotnet-3-workspace + workspace: s2i-dotnet-workspace params: - name: url value: https://github.com/redhat-developer/s2i-dotnetcore-ex @@ -14,18 +14,18 @@ - name: revision value: "dotnetcore-3.1" -- name: s2i-dotnet-3-test +- name: s2i-dotnet-test taskRef: - name: s2i-dotnet-3 + name: s2i-dotnet runAfter: - - fetch-repository-s2i-dotnet-3 + - fetch-repository-s2i-dotnet workspaces: - name: source - workspace: s2i-dotnet-3-workspace + workspace: s2i-dotnet-workspace params: - name: TLSVERIFY value: "false" - name: PATH_CONTEXT value: "app" - name: IMAGE - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet-3" + value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-dotnet" diff --git a/task/s2i-eap-pr/0.1/README.md b/task/s2i-eap-pr/0.1/README.md deleted file mode 100644 index 9adf923..0000000 --- a/task/s2i-eap-pr/0.1/README.md +++ /dev/null @@ -1,114 +0,0 @@ -# Java EAP Source-to-Image (PipelineResource) - -This task can be used for building `Java EAP` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) is a toolkit and a workflow for building reproducible container images from source code. This java eap task uses `registry.redhat.io/jboss-eap-7-tech-preview/eap-cd-openshift-rhel8` builder image. - -This current version of the Java EAP S2I builder image supports OpenJDK 11, EAP CD 18, and Maven 3.5.4-5. - -## Installing the Java EAP Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-eap-pr/0.1/s2i-eap-pr.yaml -``` - -## Parameters - -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: `.`_) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) (_default:_ `true`) - -## Resources - -### Inputs - -* **source**: A `git`-type `PipelineResource` specifying the location of the source to build. - -### Outputs - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -Example: -``` -apiVersion: v1 -kind: ConfigMap -metadata: - name: s2i-eap-configmap -data: - env-file: | - MAVEN_ARGS_APPEND=-Dcom.redhat.xpaas.repo.jbossorg - GALLEON_PROVISION_DEFAULT_FAT_SERVER=true -``` - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -As EAP requires terms acceptance, a secret is needed for pulling the s2i source image. Create a secret with an Red Hat account (if you don't have one, join the [Developer Program](https://developers.redhat.com/) or register for a [30-day Trial Subscription](https://access.redhat.com/products/red-hat-jboss-enterprise-application-platform/evaluation)) and link it to the pipeline ServiceAccount. - -``` -oc create secret docker-registry \ - --docker-server=registry.redhat.io \ - --docker-username= \ - --docker-password= \ - --docker-email= - -oc secrets link pipeline -``` - - -## Creating the taskrun - -This TaskRun runs the java EAP Task to fetch a Git repository and builds and pushes a container image using S2I and a Java EAP builder image. It is an example based on an existing BuildConfig of EAP: - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-eap-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-eap-pr - params: - - name: PATH_CONTEXT - value: kitchensink - - name: TLSVERIFY - value: 'false' - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/jboss-developer/jboss-eap-quickstarts - - name: revision - value: openshift - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: image-registry.openshift-image-registry.svc:5000/my-namespace/my-image-name -``` diff --git a/task/s2i-eap-pr/0.1/s2i-eap-pr.yaml b/task/s2i-eap-pr/0.1/s2i-eap-pr.yaml deleted file mode 100644 index 04d73c2..0000000 --- a/task/s2i-eap-pr/0.1/s2i-eap-pr.yaml +++ /dev/null @@ -1,93 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-eap-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, eap - tekton.dev/displayName: "s2i eap pipelineresource" -spec: - description: >- - s2i-eap-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Java EAP builder image - - This current version of the Java EAP S2I builder image supports - OpenJDK 11, EAP CD 18, and Maven 3.5.4-5. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: PATH_CONTEXT - description: The location of the path to run s2i from - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - stepTemplate: - envFrom: - - configMapRef: - name: s2i-eap-configmap # used for build env - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: - - 's2i' - - 'build' - - '$(params.PATH_CONTEXT)' - - 'registry.redhat.io/jboss-eap-7-tech-preview/eap-cd-openshift-rhel8' - - '--assemble-user' - - '185' - - '--image-scripts-url' - - 'image:///usr/local/s2i' - - '--as-dockerfile' - - '/gen-source/Dockerfile.gen' - - '--environment-file' - - '/env-params/env-file' - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: envparams - mountPath: /env-params - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - - name: envparams - configMap: - name: s2i-eap-configmap diff --git a/task/s2i-eap/0.1/s2i-eap.yaml b/task/s2i-eap/0.1/s2i-eap.yaml index 6704f6d..867d8ff 100644 --- a/task/s2i-eap/0.1/s2i-eap.yaml +++ b/task/s2i-eap/0.1/s2i-eap.yaml @@ -5,7 +5,7 @@ metadata: labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" + tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, eap tekton.dev/displayName: "s2i eap" spec: diff --git a/task/s2i-go-pr/0.1/README.md b/task/s2i-go-pr/0.1/README.md deleted file mode 100644 index 65995f2..0000000 --- a/task/s2i-go-pr/0.1/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# Go Source-to-Image (PipelineResource) - -This task can be used for building `GO` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This tasks uses the s2i-go image build from [sclorg/golang-container](https://github.com/sclorg/golang-container). - -GO versions currently provided are: - -- 1.11 - -## Installing the Go Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-go-pr/0.1/s2i-go-pr.yaml -``` - -## Inputs - -### Parameters - -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: ._) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the Go Task to fetch a Git repository and builds and -pushes a container image using S2I and a Go builder image. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-go-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-go-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-go-pr/0.1/s2i-go-pr.yaml b/task/s2i-go-pr/0.1/s2i-go-pr.yaml deleted file mode 100644 index a9bd7b9..0000000 --- a/task/s2i-go-pr/0.1/s2i-go-pr.yaml +++ /dev/null @@ -1,69 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-go-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, go - tekton.dev/displayName: "s2i go pipelineresource" -spec: - description: >- - s2i-go-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Go builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/devtools/go-toolset-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-go-pr/0.1/tests/resource.yaml b/task/s2i-go-pr/0.1/tests/resource.yaml deleted file mode 100644 index 00b20fa..0000000 --- a/task/s2i-go-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-go-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/golang-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-go-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-go-pr" diff --git a/task/s2i-go-pr/0.1/tests/step.yaml b/task/s2i-go-pr/0.1/tests/step.yaml deleted file mode 100644 index 8f52f7b..0000000 --- a/task/s2i-go-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- name: s2i-go-pr - taskRef: - name: s2i-go-pr - resources: - outputs: - - name: image - resource: s2i-go-pr-image - inputs: - - name: source - resource: s2i-go-pr-repo - params: - - name: TLSVERIFY - value: "false" diff --git a/task/s2i-go/0.1/README.md b/task/s2i-go/0.1/README.md index 66133ad..ddf3db4 100644 --- a/task/s2i-go/0.1/README.md +++ b/task/s2i-go/0.1/README.md @@ -7,7 +7,8 @@ from source code. This tasks uses the s2i-go image build from [sclorg/golang-con GO versions currently provided are: -- 1.11 +- 1.13.4-ubi7 +- 1.14.7-ubi8 ## Installing the Go Task @@ -17,6 +18,8 @@ kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/m ## Parameters +* **VERSION**: The tag of go imagestream for go version + (_default: 1.14.7-ubi8_) * **PATH_CONTEXT**: Source path from where S2I command needs to be run (_default: ._) * **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a diff --git a/task/s2i-go/0.1/s2i-go.yaml b/task/s2i-go/0.1/s2i-go.yaml index ab58c56..0d3119d 100644 --- a/task/s2i-go/0.1/s2i-go.yaml +++ b/task/s2i-go/0.1/s2i-go.yaml @@ -5,7 +5,7 @@ metadata: labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" + tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, go, workspace tekton.dev/displayName: "s2i go" spec: @@ -17,6 +17,10 @@ spec: - name: IMAGE_DIGEST description: Digest of the image just built. params: + - name: VERSION + description: The tag of go imagestream for go version + default: '1.14.7-ubi8' + type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. default: . @@ -38,7 +42,7 @@ spec: - name: generate image: quay.io/openshift-pipeline/s2i workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/devtools/go-toolset-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/golang:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source diff --git a/task/s2i-java-11-pr/0.1/README.md b/task/s2i-java-11-pr/0.1/README.md deleted file mode 100644 index 74e4c7e..0000000 --- a/task/s2i-java-11-pr/0.1/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# Java 11 Source-to-Image (PipelineResource) - -This task can be used for building `Java 11` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This java 11 task uses `registry.access.redhat.com/openjdk/openjdk-11-rhel7` builder image - -## Installing the Java 11 Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-java-11-pr/0.1/s2i-java-11-pr.yaml -``` - -## Inputs - -### Parameters - -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: `.`_) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) -* **MAVEN_ARGS_APPEND**: Additional Maven arguments (_optional_, _no default_) -* **MAVEN_CLEAR_REPO**: Remove the Maven repository after the artifact is - built (_default:_ `false`) -* **MAVEN_MIRROR_URL**: The base URL of a mirror used for retrieving artifacts - ((_optional_, _no default_)) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the java 11 Task to fetch a Git repository and builds and -pushes a container image using S2I and a Java 11 builder image. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-java11-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-java-11-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-java-11-pr/0.1/s2i-java-11-pr.yaml b/task/s2i-java-11-pr/0.1/s2i-java-11-pr.yaml deleted file mode 100644 index 935276a..0000000 --- a/task/s2i-java-11-pr/0.1/s2i-java-11-pr.yaml +++ /dev/null @@ -1,118 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-java-11-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, java - tekton.dev/displayName: "s2i java 11 pipelineresource" -spec: - description: >- - s2i-java-11-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Java 11 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: PATH_CONTEXT - description: The location of the path to run s2i from - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: MAVEN_ARGS_APPEND - description: Additional Maven arguments - default: "" - type: string - - name: MAVEN_CLEAR_REPO - description: Remove the Maven repository after the artifact is built - default: "false" - type: string - - name: MAVEN_MIRROR_URL - description: The base URL of a mirror used for retrieving artifacts - default: "" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: gen-env-file - image: quay.io/openshift-pipeline/s2i - workingdir: /env-params - command: - - '/bin/sh' - - '-c' - args: - - |- - echo "MAVEN_CLEAR_REPO=$(params.MAVEN_CLEAR_REPO)" > env-file - - [[ '$(params.MAVEN_ARGS_APPEND)' != "" ]] && - echo "MAVEN_ARGS_APPEND=$(params.MAVEN_ARGS_APPEND)" >> env-file - - [[ '$(params.MAVEN_MIRROR_URL)' != "" ]] && - echo "MAVEN_MIRROR_URL=$(params.MAVEN_MIRROR_URL)" >> env-file - - echo "Generated Env file" - echo "------------------------------" - cat env-file - echo "------------------------------" - volumeMounts: - - name: envparams - mountPath: /env-params - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: - - 's2i' - - 'build' - - '$(params.PATH_CONTEXT)' - - 'registry.access.redhat.com/openjdk/openjdk-11-rhel7' - - '--image-scripts-url' - - 'image:///usr/local/s2i' - - '--as-dockerfile' - - '/gen-source/Dockerfile.gen' - - '--environment-file' - - '/env-params/env-file' - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: envparams - mountPath: /env-params - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - - name: envparams - emptyDir: {} diff --git a/task/s2i-java-11-pr/0.1/tests/resource.yaml b/task/s2i-java-11-pr/0.1/tests/resource.yaml deleted file mode 100644 index 38c07cf..0000000 --- a/task/s2i-java-11-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,20 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-java-11-pr-repo -spec: - type: git - params: - - name: url - value: https://github.com/piyush-garg/spring-petclinic ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-java-11-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-java-11-pr" diff --git a/task/s2i-java-11-pr/0.1/tests/step.yaml b/task/s2i-java-11-pr/0.1/tests/step.yaml deleted file mode 100644 index e04b6d0..0000000 --- a/task/s2i-java-11-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- name: s2i-java-11-pr - taskRef: - name: s2i-java-11-pr - resources: - outputs: - - name: image - resource: s2i-java-11-pr-image - inputs: - - name: source - resource: s2i-java-11-pr-repo - params: - - name: TLSVERIFY - value: "false" diff --git a/task/s2i-java-11/0.1/README.md b/task/s2i-java-11/0.1/README.md deleted file mode 100644 index cb9f583..0000000 --- a/task/s2i-java-11/0.1/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# Java 11 Source-to-Image - -This task can be used for building `Java 11` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This java 11 task uses `registry.access.redhat.com/openjdk/openjdk-11-rhel7` builder image - -## Installing the Java 11 Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-java-11/0.1/s2i-java-11.yaml -``` - -## Parameters - -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: `.`_) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) -* **MAVEN_ARGS_APPEND**: Additional Maven arguments (_optional_, _no default_) -* **MAVEN_CLEAR_REPO**: Remove the Maven repository after the artifact is - built (_default:_ `false`) -* **MAVEN_MIRROR_URL**: The base URL of a mirror used for retrieving artifacts - ((_optional_, _no default_)) - -## Workspaces - -* **source**: A workspace specifying the location of the source to - build. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Using a `Pipeline` with `git-clone` - -```yaml -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: s2i-java-11-pipeline -spec: - params: - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - workspaces: - - name: shared-workspace - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: shared-workspace - params: - - name: url - value: https://github.com/username/reponame - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: s2i - taskRef: - name: s2i-java-11 - workspaces: - - name: source - workspace: shared-workspace - params: - - name: IMAGE - value: $(params.IMAGE) -``` - -## Creating the pipelinerun - -This PipelineRun runs the Java 11 Task to fetch a Git repository and builds and -pushes a container image using S2I and a Java 11 builder image. - -```yaml -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: s2i-java-11-pipelinerun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - pipelineRunRef: - name: s2i-java-11-pipeline - params: - - name: IMAGE - value: quay.io/my-repo/my-image-name - workspaces: - - name: shared-data - volumeClaimTemplate: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi -``` diff --git a/task/s2i-java-8-pr/0.1/README.md b/task/s2i-java-8-pr/0.1/README.md deleted file mode 100644 index 22077ca..0000000 --- a/task/s2i-java-8-pr/0.1/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Java 8 Source-to-Image (PipelineResource) - -This task can be used for building `Java 8` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This java 8 task uses `registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift` builder image - -The current version of the Java S2I builder image supports OpenJDK 1.8, Jolokia 1.3.5, and Maven 3.3.9-2.8 - -## Installing the Java 8 Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-java-8-pr/0.1/s2i-java-8-pr.yaml -``` - -## Inputs - -### Parameters - -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: `.`_) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) -* **MAVEN_ARGS_APPEND**: Additional Maven arguments (_optional_, _no default_) -* **MAVEN_CLEAR_REPO**: Remove the Maven repository after the artifact is - built (_default:_ `false`) -* **MAVEN_MIRROR_URL**: The base URL of a mirror used for retrieving artifacts - ((_optional_, _no default_)) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the java 8 Task to fetch a Git repository and builds and -pushes a container image using S2I and a Java 8 builder image. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-java8-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-java-8-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-java-8-pr/0.1/s2i-java-8-pr.yaml b/task/s2i-java-8-pr/0.1/s2i-java-8-pr.yaml deleted file mode 100644 index abeb511..0000000 --- a/task/s2i-java-8-pr/0.1/s2i-java-8-pr.yaml +++ /dev/null @@ -1,118 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-java-8-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, java - tekton.dev/displayName: "s2i java 8 pipelineresource" -spec: - description: >- - s2i-java-8-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Java 8 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: PATH_CONTEXT - description: The location of the path to run s2i from - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: MAVEN_ARGS_APPEND - description: Additional Maven arguments - default: "" - type: string - - name: MAVEN_CLEAR_REPO - description: Remove the Maven repository after the artifact is built - default: "false" - type: string - - name: MAVEN_MIRROR_URL - description: The base URL of a mirror used for retrieving artifacts - default: "" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: gen-env-file - image: quay.io/openshift-pipeline/s2i - workingdir: /env-params - command: - - '/bin/sh' - - '-c' - args: - - |- - echo "MAVEN_CLEAR_REPO=$(params.MAVEN_CLEAR_REPO)" > env-file - - [[ '$(params.MAVEN_ARGS_APPEND)' != "" ]] && - echo "MAVEN_ARGS_APPEND=$(params.MAVEN_ARGS_APPEND)" >> env-file - - [[ '$(params.MAVEN_MIRROR_URL)' != "" ]] && - echo "MAVEN_MIRROR_URL=$(params.MAVEN_MIRROR_URL)" >> env-file - - echo "Generated Env file" - echo "------------------------------" - cat env-file - echo "------------------------------" - volumeMounts: - - name: envparams - mountPath: /env-params - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: - - 's2i' - - 'build' - - '$(params.PATH_CONTEXT)' - - 'registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift' - - '--image-scripts-url' - - 'image:///usr/local/s2i' - - '--as-dockerfile' - - '/gen-source/Dockerfile.gen' - - '--environment-file' - - '/env-params/env-file' - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: envparams - mountPath: /env-params - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - - name: envparams - emptyDir: {} diff --git a/task/s2i-java-8-pr/0.1/tests/resource.yaml b/task/s2i-java-8-pr/0.1/tests/resource.yaml deleted file mode 100644 index 1f5dcf1..0000000 --- a/task/s2i-java-8-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-java-8-pr-repo -spec: - type: git - params: - - name: revision - value: "d367e2b4b41a2de899b0f438bc984a7c1c011b77" - - name: url - value: https://github.com/spring-projects/spring-petclinic ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-java-8-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-java-8-pr" diff --git a/task/s2i-java-8-pr/0.1/tests/step.yaml b/task/s2i-java-8-pr/0.1/tests/step.yaml deleted file mode 100644 index e7f5468..0000000 --- a/task/s2i-java-8-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- name: s2i-java-8-pr - taskRef: - name: s2i-java-8-pr - resources: - outputs: - - name: image - resource: s2i-java-8-pr-image - inputs: - - name: source - resource: s2i-java-8-pr-repo - params: - - name: TLSVERIFY - value: "false" diff --git a/task/s2i-java-8/0.1/s2i-java-8.yaml b/task/s2i-java-8/0.1/s2i-java-8.yaml deleted file mode 100644 index 9bab338..0000000 --- a/task/s2i-java-8/0.1/s2i-java-8.yaml +++ /dev/null @@ -1,117 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-java-8 - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, java, workspace - tekton.dev/displayName: "s2i java 8" -spec: - description: >- - s2i-java-8 task clones a Git repository and builds and - pushes a container image using S2I and a Java 8 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: PATH_CONTEXT - description: The location of the path to run s2i from - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: MAVEN_ARGS_APPEND - description: Additional Maven arguments - default: "" - type: string - - name: MAVEN_CLEAR_REPO - description: Remove the Maven repository after the artifact is built - default: "false" - type: string - - name: MAVEN_MIRROR_URL - description: The base URL of a mirror used for retrieving artifacts - default: "" - type: string - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - workspaces: - - name: source - mountPath: /workspace/source - steps: - - name: gen-env-file - image: quay.io/openshift-pipeline/s2i - workingdir: /env-params - command: - - '/bin/sh' - - '-c' - args: - - |- - echo "MAVEN_CLEAR_REPO=$(params.MAVEN_CLEAR_REPO)" > env-file - - [[ '$(params.MAVEN_ARGS_APPEND)' != "" ]] && - echo "MAVEN_ARGS_APPEND=$(params.MAVEN_ARGS_APPEND)" >> env-file - - [[ '$(params.MAVEN_MIRROR_URL)' != "" ]] && - echo "MAVEN_MIRROR_URL=$(params.MAVEN_MIRROR_URL)" >> env-file - - echo "Generated Env file" - echo "------------------------------" - cat env-file - echo "------------------------------" - volumeMounts: - - name: envparams - mountPath: /env-params - - name: generate - image: quay.io/openshift-pipeline/s2i - workingdir: $(workspaces.source.path) - command: - - 's2i' - - 'build' - - '$(params.PATH_CONTEXT)' - - 'registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift' - - '--image-scripts-url' - - 'image:///usr/local/s2i' - - '--as-dockerfile' - - '/gen-source/Dockerfile.gen' - - '--environment-file' - - '/env-params/env-file' - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: envparams - mountPath: /env-params - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(workspaces.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} - - name: envparams - emptyDir: {} diff --git a/task/s2i-java-8/0.1/tests/step.yaml b/task/s2i-java-8/0.1/tests/step.yaml deleted file mode 100644 index 036f274..0000000 --- a/task/s2i-java-8/0.1/tests/step.yaml +++ /dev/null @@ -1,29 +0,0 @@ -- name: fetch-repository-s2i-java-8 - taskRef: - name: git-clone - workspaces: - - name: output - workspace: s2i-java-8-workspace - params: - - name: url - value: https://github.com/spring-projects/spring-petclinic - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: revision - value: "d367e2b4b41a2de899b0f438bc984a7c1c011b77" - -- name: s2i-java-8-test - taskRef: - name: s2i-java-8 - runAfter: - - fetch-repository-s2i-java-8 - workspaces: - - name: source - workspace: s2i-java-8-workspace - params: - - name: TLSVERIFY - value: "false" - - name: IMAGE - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-java-8" diff --git a/task/s2i-java-8/0.1/README.md b/task/s2i-java/0.1/README.md similarity index 80% rename from task/s2i-java-8/0.1/README.md rename to task/s2i-java/0.1/README.md index 6010b9b..818fd7a 100644 --- a/task/s2i-java-8/0.1/README.md +++ b/task/s2i-java/0.1/README.md @@ -1,20 +1,29 @@ -# Java 8 Source-to-Image +# Java Source-to-Image -This task can be used for building `Java 8` apps as reproducible Docker +This task can be used for building `Java` apps as reproducible Docker images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) is a toolkit and a workflow for building reproducible container images -from source code. This java 8 task uses `registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift` builder image +from source code. This java task uses `image-registry.openshift-image-registry.svc:5000/openshift/java` builder image -The current version of the Java S2I builder image supports OpenJDK 1.8, Jolokia 1.3.5, and Maven 3.3.9-2.8 +Java versions currently provided are: -## Installing the Java 8 Task +- 11 +- openjdk-11-el7 +- openjdk-11-ubi8 +- 8 +- openjdk-8-el7 +- openjdk-8-ubi8 + +## Installing the Java Task ``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-java-8/0.1/s2i-java-8.yaml +kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-java/0.1/s2i-java.yaml ``` ## Parameters +* **VERSION**: The tag of java imagestream for java version + (_default: openjdk-11-ubi8_) * **PATH_CONTEXT**: Source path from where S2I command needs to be run (_default: `.`_) * **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a @@ -24,7 +33,6 @@ kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/m built (_default:_ `false`) * **MAVEN_MIRROR_URL**: The base URL of a mirror used for retrieving artifacts ((_optional_, _no default_)) -* **IMAGE**: Location of the repo where image has to be pushed. ## Workspaces @@ -59,7 +67,7 @@ oc adm policy add-role-to-user edit -z pipeline apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: - name: s2i-java-8-pipeline + name: s2i-java-pipeline spec: params: - name: IMAGE @@ -83,7 +91,7 @@ spec: value: "true" - name: s2i taskRef: - name: s2i-java-8 + name: s2i-java workspaces: - name: source workspace: shared-workspace @@ -94,19 +102,19 @@ spec: ## Creating the pipelinerun -This PipelineRun runs the Java 8 Task to fetch a Git repository and builds and -pushes a container image using S2I and a Java 8 builder image. +This PipelineRun runs the Java Task to fetch a Git repository and builds and +pushes a container image using S2I and a Java builder image. ```yaml apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: - name: s2i-java-8-pipelinerun + name: s2i-java-pipelinerun spec: # Use service account with git and image repo credentials serviceAccountName: pipeline pipelineRunRef: - name: s2i-java-8-pipeline + name: s2i-java-pipeline params: - name: IMAGE value: quay.io/my-repo/my-image-name diff --git a/task/s2i-java-11/0.1/s2i-java-11.yaml b/task/s2i-java/0.1/s2i-java.yaml similarity index 88% rename from task/s2i-java-11/0.1/s2i-java-11.yaml rename to task/s2i-java/0.1/s2i-java.yaml index d04c12b..8f635e3 100644 --- a/task/s2i-java-11/0.1/s2i-java-11.yaml +++ b/task/s2i-java/0.1/s2i-java.yaml @@ -1,22 +1,26 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: s2i-java-11 + name: s2i-java labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" + tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, java, workspace - tekton.dev/displayName: "s2i java 11" + tekton.dev/displayName: "s2i java" spec: description: >- - s2i-java-11 task clones a Git repository and builds and - pushes a container image using S2I and a Java 11 builder image. + s2i-java task clones a Git repository and builds and + pushes a container image using S2I and a Java builder image. results: - name: IMAGE_DIGEST description: Digest of the image just built. params: + - name: VERSION + description: The tag of java imagestream for java version + default: 'openjdk-11-ubi8' + type: string - name: PATH_CONTEXT description: The location of the path to run s2i from default: . @@ -77,7 +81,7 @@ spec: - 's2i' - 'build' - '$(params.PATH_CONTEXT)' - - 'registry.access.redhat.com/openjdk/openjdk-11-rhel7' + - 'image-registry.openshift-image-registry.svc:5000/openshift/java:$(params.VERSION)' - '--image-scripts-url' - 'image:///usr/local/s2i' - '--as-dockerfile' diff --git a/task/s2i-java-11/0.1/tests/pv.yaml b/task/s2i-java/0.1/tests/pv.yaml similarity index 82% rename from task/s2i-java-11/0.1/tests/pv.yaml rename to task/s2i-java/0.1/tests/pv.yaml index fade182..0e1aaee 100644 --- a/task/s2i-java-11/0.1/tests/pv.yaml +++ b/task/s2i-java/0.1/tests/pv.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: s2i-java-11-workspace + name: s2i-java-workspace spec: accessModes: - ReadWriteOnce diff --git a/task/s2i-java-11/0.1/tests/step.yaml b/task/s2i-java/0.1/tests/step.yaml similarity index 67% rename from task/s2i-java-11/0.1/tests/step.yaml rename to task/s2i-java/0.1/tests/step.yaml index abb771d..436fce8 100644 --- a/task/s2i-java-11/0.1/tests/step.yaml +++ b/task/s2i-java/0.1/tests/step.yaml @@ -1,9 +1,9 @@ -- name: fetch-repository-s2i-java-11 +- name: fetch-repository-s2i-java taskRef: name: git-clone workspaces: - name: output - workspace: s2i-java-11-workspace + workspace: s2i-java-workspace params: - name: url value: https://github.com/piyush-garg/spring-petclinic @@ -14,16 +14,16 @@ - name: revision value: "main" -- name: s2i-java-11-test +- name: s2i-java--test taskRef: - name: s2i-java-11 + name: s2i-java runAfter: - - fetch-repository-s2i-java-11 + - fetch-repository-s2i-java workspaces: - name: source - workspace: s2i-java-11-workspace + workspace: s2i-java-workspace params: - name: TLSVERIFY value: "false" - name: IMAGE - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-java-11" + value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-java" diff --git a/task/s2i-nodejs-pr/0.1/README.md b/task/s2i-nodejs-pr/0.1/README.md deleted file mode 100644 index 6175e32..0000000 --- a/task/s2i-nodejs-pr/0.1/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# Nodejs Source-to-Image (PipelineResource) - -This task can be used for building `Nodejs` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This tasks uses the Node.js S2I builder image from [sclorg/s2i-nodejs-container](https://github.com/sclorg/s2i-nodejs-container). - -Node.js versions currently provided are: - -- Node.js 10 -- Node.js 12 - -## Installing the Nodejs Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-nodejs-pr/0.1/s2i-nodejs-pr.yaml -``` - -## Inputs - -### Parameters - -* **VERSION**: Version of the Node.js - (_default: 12_) -* **PATH_CONTEXT**: Source path from where the S2I command needs to be run - (_default: ._) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a `ServiceAccount`. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the `ServiceAccount` to run privileged containers. Due to security considerations, OpenShift does not allow containers to run as privileged containers by default. - -Run the following in order to create a `ServiceAccount` named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This `TaskRun` runs the Node.js `Task` to fetch a Git repository and builds and -pushes a container image using S2I and a [Node.js S2I builder image](https://github.com/sclorg/s2i-nodejs-container). - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-nodejs-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-nodejs-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-nodejs-pr/0.1/s2i-nodejs-pr.yaml b/task/s2i-nodejs-pr/0.1/s2i-nodejs-pr.yaml deleted file mode 100644 index e19ae41..0000000 --- a/task/s2i-nodejs-pr/0.1/s2i-nodejs-pr.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-nodejs-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, nodejs - tekton.dev/displayName: "s2i nodejs pipelineresource" -spec: - description: >- - s2i-nodejs-pr task fetches a Git repository and builds and - pushes a container image using S2I and a nodejs builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: VERSION - description: The version of the nodejs - default: '12' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/nodejs:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-nodejs-pr/0.1/tests/resource.yaml b/task/s2i-nodejs-pr/0.1/tests/resource.yaml deleted file mode 100644 index 66deeee..0000000 --- a/task/s2i-nodejs-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-nodejs-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/nodejs-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-nodejs-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-nodejs-pr" diff --git a/task/s2i-nodejs-pr/0.1/tests/step.yaml b/task/s2i-nodejs-pr/0.1/tests/step.yaml deleted file mode 100644 index 3df9c61..0000000 --- a/task/s2i-nodejs-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- name: s2i-nodejs-pr - taskRef: - name: s2i-nodejs-pr - resources: - outputs: - - name: image - resource: s2i-nodejs-pr-image - inputs: - - name: source - resource: s2i-nodejs-pr-repo - params: - - name: TLSVERIFY - value: "false" diff --git a/task/s2i-nodejs/0.1/README.md b/task/s2i-nodejs/0.1/README.md index 0acbabb..dde3c43 100644 --- a/task/s2i-nodejs/0.1/README.md +++ b/task/s2i-nodejs/0.1/README.md @@ -7,8 +7,14 @@ from source code. This tasks uses the Node.js S2I builder image from [sclorg/s2i Node.js versions currently provided are: -- Node.js 10 -- Node.js 12 +- 10 +- 10-ubi7 +- 10-ubi8 +- 12 +- 12-ubi7 +- 12-ubi8 +- 14-ubi7 +- 14-ubi8 ## Installing the Nodejs Task @@ -18,8 +24,8 @@ kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/m ## Parameters -* **VERSION**: Version of the Node.js - (_default: 12_) +* **VERSION**: The tag of nodejs imagestream for nodejs version + (_default: 14-ubi8_) * **PATH_CONTEXT**: Source path from where the S2I command needs to be run (_default: ._) * **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a diff --git a/task/s2i-nodejs/0.1/s2i-nodejs.yaml b/task/s2i-nodejs/0.1/s2i-nodejs.yaml index ee2cc94..8567283 100644 --- a/task/s2i-nodejs/0.1/s2i-nodejs.yaml +++ b/task/s2i-nodejs/0.1/s2i-nodejs.yaml @@ -5,7 +5,7 @@ metadata: labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" + tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, nodejs, workspace tekton.dev/displayName: "s2i nodejs" spec: @@ -18,8 +18,8 @@ spec: description: Digest of the image just built. params: - name: VERSION - description: The version of the nodejs - default: '12' + description: The tag of nodejs imagestream for nodejs version + default: '14-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. diff --git a/task/s2i-perl-pr/0.1/README.md b/task/s2i-perl-pr/0.1/README.md deleted file mode 100644 index 5099cbe..0000000 --- a/task/s2i-perl-pr/0.1/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Perl Source-to-Image (PipelineResource) - -This task can be used for building `Perl` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This tasks uses the s2i-perl image build from [sclorg/s2i-perl-container](https://github.com/sclorg/s2i-perl-container). - -Perl versions currently provided are: - -- Perl 5.24 -- Perl 5.26 - -## Installing the Perl Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-perl-pr/0.1/s2i-perl-pr.yaml -``` - -## Inputs - -### Parameters - -* **MINOR_VERSION**: Minor version of the Perl5 - (_default: 26_) -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: ._) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the perl Task to fetch a Git repository and builds and -pushes a container image using S2I and a perl builder image. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-perl-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-perl-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-perl-pr/0.1/s2i-perl-pr.yaml b/task/s2i-perl-pr/0.1/s2i-perl-pr.yaml deleted file mode 100644 index f72b506..0000000 --- a/task/s2i-perl-pr/0.1/s2i-perl-pr.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-perl-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, perl - tekton.dev/displayName: "s2i perl pipelineresource" -spec: - description: >- - s2i-perl-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Perl builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the perl - default: '26' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/perl-5$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-perl-pr/0.1/tests.disabled/resource.yaml b/task/s2i-perl-pr/0.1/tests.disabled/resource.yaml deleted file mode 100644 index 550818b..0000000 --- a/task/s2i-perl-pr/0.1/tests.disabled/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-perl-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/s2i-perl-container ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-perl-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-perl-pr" diff --git a/task/s2i-perl-pr/0.1/tests.disabled/step.yaml b/task/s2i-perl-pr/0.1/tests.disabled/step.yaml deleted file mode 100644 index 2cc840e..0000000 --- a/task/s2i-perl-pr/0.1/tests.disabled/step.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- name: s2i-perl-pr - taskRef: - name: s2i-perl-pr - resources: - outputs: - - name: image - resource: s2i-perl-pr-image - inputs: - - name: source - resource: s2i-perl-pr-repo - params: - - name: TLSVERIFY - value: "false" - - name: PATH_CONTEXT - value: "examples/sample-test-app" diff --git a/task/s2i-perl/0.1/README.md b/task/s2i-perl/0.1/README.md index 73d8df7..eb962d8 100644 --- a/task/s2i-perl/0.1/README.md +++ b/task/s2i-perl/0.1/README.md @@ -7,8 +7,12 @@ from source code. This tasks uses the s2i-perl image build from [sclorg/s2i-perl Perl versions currently provided are: -- Perl 5.24 -- Perl 5.26 +- 5.26 +- 5.26-el7 +- 5.26-ubi8 +- 5.30 +- 5.30-el7 +- 5.30-ubi8 ## Installing the Perl Task @@ -18,8 +22,8 @@ kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/m ## Parameters -* **MINOR_VERSION**: Minor version of the Perl5 - (_default: 26_) +* **VERSION**: The tag of perl imagestream for perl version + (_default: 5.30-ubi8_) * **PATH_CONTEXT**: Source path from where S2I command needs to be run (_default: ._) * **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a diff --git a/task/s2i-perl/0.1/s2i-perl.yaml b/task/s2i-perl/0.1/s2i-perl.yaml index 8f836c3..b778e22 100644 --- a/task/s2i-perl/0.1/s2i-perl.yaml +++ b/task/s2i-perl/0.1/s2i-perl.yaml @@ -5,7 +5,7 @@ metadata: labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" + tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, perl, workspace tekton.dev/displayName: "s2i perl" spec: @@ -17,9 +17,9 @@ spec: - name: IMAGE_DIGEST description: Digest of the image just built. params: - - name: MINOR_VERSION - description: The minor version of the perl - default: '26' + - name: VERSION + description: The tag of perl imagestream for perl version + default: '5.30-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. @@ -42,7 +42,7 @@ spec: - name: generate image: quay.io/openshift-pipeline/s2i workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/perl-5$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/perl:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source diff --git a/task/s2i-php-pr/0.1/README.md b/task/s2i-php-pr/0.1/README.md deleted file mode 100644 index bf00044..0000000 --- a/task/s2i-php-pr/0.1/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# PHP Source-to-Image (PipelineResource) - -This task can be used for building `PHP` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This tasks uses the s2i-php image build from [sclorg/s2i-php-container](https://github.com/sclorg/s2i-php-container). - -PHP versions currently provided are: - -- PHP 7.3 -- PHP 7.2 - -## Installing the PHP Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-php-pr/0.1/s2i-php-pr.yaml -``` - -## Inputs - -### Parameters - -* **MINOR_VERSION**: Minor version of the PHP 7 - (_default: 3_) -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: ._) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the php Task to fetch a Git repository and builds and -pushes a container image using S2I and a php builder image. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-php-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-php-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-php-pr/0.1/s2i-php-pr.yaml b/task/s2i-php-pr/0.1/s2i-php-pr.yaml deleted file mode 100644 index 6baee4e..0000000 --- a/task/s2i-php-pr/0.1/s2i-php-pr.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-php-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, php - tekton.dev/displayName: "s2i php pipelineresource" -spec: - description: >- - s2i-php-pr task fetches a Git repository and builds and - pushes a container image using S2I and a PHP builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the php - default: '3' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/php:7.$(params.MINOR_VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-php-pr/0.1/tests/resource.yaml b/task/s2i-php-pr/0.1/tests/resource.yaml deleted file mode 100644 index adea366..0000000 --- a/task/s2i-php-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-php-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/s2i-php-container/ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-php-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-php-pr" diff --git a/task/s2i-php-pr/0.1/tests/step.yaml b/task/s2i-php-pr/0.1/tests/step.yaml deleted file mode 100644 index dd2e7c0..0000000 --- a/task/s2i-php-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,15 +0,0 @@ -- name: s2i-php-pr - taskRef: - name: s2i-php-pr - resources: - outputs: - - name: image - resource: s2i-php-pr-image - inputs: - - name: source - resource: s2i-php-pr-repo - params: - - name: TLSVERIFY - value: "false" - - name: PATH_CONTEXT - value: "test/test-app" diff --git a/task/s2i-php/0.1/README.md b/task/s2i-php/0.1/README.md index 1b10535..8c98970 100644 --- a/task/s2i-php/0.1/README.md +++ b/task/s2i-php/0.1/README.md @@ -7,8 +7,11 @@ from source code. This tasks uses the s2i-php image build from [sclorg/s2i-php-c PHP versions currently provided are: -- PHP 7.3 -- PHP 7.2 +- 7.4-ubi8 +- 7.3 +- 7.3-ubi7 +- 7.3-ubi8 +- 7.2-ubi8 ## Installing the PHP Task @@ -18,8 +21,8 @@ kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/m ## Parameters -* **MINOR_VERSION**: Minor version of the PHP 7 - (_default: 3_) +* **VERSION**: The tag of php imagestream for php version + (_default: 7.4-ubi8_) * **PATH_CONTEXT**: Source path from where S2I command needs to be run (_default: ._) * **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a diff --git a/task/s2i-php/0.1/s2i-php.yaml b/task/s2i-php/0.1/s2i-php.yaml index 37fb0ae..10fcbf3 100644 --- a/task/s2i-php/0.1/s2i-php.yaml +++ b/task/s2i-php/0.1/s2i-php.yaml @@ -5,7 +5,7 @@ metadata: labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" + tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, php, workspace tekton.dev/displayName: "s2i php" spec: @@ -17,9 +17,9 @@ spec: - name: IMAGE_DIGEST description: Digest of the image just built. params: - - name: MINOR_VERSION - description: The minor version of the php - default: '3' + - name: VERSION + description: The tag of php imagestream for php version + default: '7.4-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. @@ -42,7 +42,7 @@ spec: - name: generate image: quay.io/openshift-pipeline/s2i workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/php:7.$(params.MINOR_VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/php:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source diff --git a/task/s2i-python-2-pr/0.1/README.md b/task/s2i-python-2-pr/0.1/README.md deleted file mode 100644 index e166789..0000000 --- a/task/s2i-python-2-pr/0.1/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# Python 2 Source-to-Image (PipelineResource) - -This task can be used for building `Python` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This tasks uses the s2i-python image build from [sclorg/s2i-python-container](https://github.com/sclorg/s2i-python-container). - -Python 2 versions currently provided are: - -- Python 2.7 - -## Installing the Python Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-python-2-pr/0.1/s2i-python-2-pr.yaml -``` - -## Inputs - -### Parameters - -* **MINOR_VERSION**: Minor version of the Python 2 - (_default: 7_) -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: ._) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the python 2 Task to fetch a Git repository and builds and -pushes a container image using S2I and a python 2 builder image. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-python-2-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-python-2-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-python-2-pr/0.1/s2i-python-2-pr.yaml b/task/s2i-python-2-pr/0.1/s2i-python-2-pr.yaml deleted file mode 100644 index 54b7eb5..0000000 --- a/task/s2i-python-2-pr/0.1/s2i-python-2-pr.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-python-2-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, python - tekton.dev/displayName: "s2i python 2 pipelineresource" -spec: - description: >- - s2i-python-2-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Python 2 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the python 2 - default: '7' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/python-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-python-2-pr/0.1/tests/resource.yaml b/task/s2i-python-2-pr/0.1/tests/resource.yaml deleted file mode 100644 index 4467fd3..0000000 --- a/task/s2i-python-2-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-python-2-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/django-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-python-2-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-python-2-pr" diff --git a/task/s2i-python-2-pr/0.1/tests/step.yaml b/task/s2i-python-2-pr/0.1/tests/step.yaml deleted file mode 100644 index 7905e5a..0000000 --- a/task/s2i-python-2-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- name: s2i-python-2-pr - taskRef: - name: s2i-python-2-pr - resources: - outputs: - - name: image - resource: s2i-python-2-pr-image - inputs: - - name: source - resource: s2i-python-2-pr-repo - params: - - name: TLSVERIFY - value: "false" diff --git a/task/s2i-python-2/0.1/README.md b/task/s2i-python-2/0.1/README.md deleted file mode 100644 index c103068..0000000 --- a/task/s2i-python-2/0.1/README.md +++ /dev/null @@ -1,121 +0,0 @@ -# Python 2 Source-to-Image - -This task can be used for building `Python` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This tasks uses the s2i-python image build from [sclorg/s2i-python-container](https://github.com/sclorg/s2i-python-container). - -Python 2 versions currently provided are: - -- Python 2.7 - -## Installing the Python Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-python-2/0.1/s2i-python-2.yaml -``` - -## Parameters - -* **MINOR_VERSION**: Minor version of the Python 2 - (_default: 7_) -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: ._) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) -* **IMAGE**: Location of the repo where image has to be pushed. - -## Workspaces - -* **source**: A workspace specifying the location of the source to - build. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Using a `Pipeline` with `git-clone` - -```yaml -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: s2i-python-2-pipeline -spec: - params: - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - workspaces: - - name: shared-workspace - tasks: - - name: fetch-repository - taskRef: - name: git-clone - workspaces: - - name: output - workspace: shared-workspace - params: - - name: url - value: https://github.com/username/reponame - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: s2i - taskRef: - name: s2i-python-2 - workspaces: - - name: source - workspace: shared-workspace - params: - - name: IMAGE - value: $(params.IMAGE) -``` - -## Creating the pipelinerun - -This PipelineRun runs the python 2 Task to fetch a Git repository and builds and -pushes a container image using S2I and a python 2 builder image. - -```yaml -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: - name: s2i-python-2-pipelinerun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - pipelineRunRef: - name: s2i-python-2-pipeline - params: - - name: IMAGE - value: quay.io/my-repo/my-image-name - workspaces: - - name: shared-data - volumeClaimTemplate: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi -``` diff --git a/task/s2i-python-2/0.1/s2i-python-2.yaml b/task/s2i-python-2/0.1/s2i-python-2.yaml deleted file mode 100644 index 96cefb7..0000000 --- a/task/s2i-python-2/0.1/s2i-python-2.yaml +++ /dev/null @@ -1,72 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-python-2 - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, python, workspace - tekton.dev/displayName: "s2i python 2" -spec: - description: >- - s2i-python-2 task clones a Git repository and builds and - pushes a container image using S2I and a Python 2 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the python 2 - default: '7' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: IMAGE - description: Location of the repo where image has to be pushed - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - workspaces: - - name: source - mountPath: /workspace/source - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/python-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(params.IMAGE)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingdir: $(workspaces.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(workspaces.source.path)/image-digest', '$(params.IMAGE)', 'docker://$(params.IMAGE)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(workspaces.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-python-2/0.1/tests/pv.yaml b/task/s2i-python-2/0.1/tests/pv.yaml deleted file mode 100644 index 794f93f..0000000 --- a/task/s2i-python-2/0.1/tests/pv.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: s2i-python-2-workspace -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi diff --git a/task/s2i-python-3-pr/0.1/README.md b/task/s2i-python-3-pr/0.1/README.md deleted file mode 100644 index d084f0e..0000000 --- a/task/s2i-python-3-pr/0.1/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Python 3 Source-to-Image (PipelineResource) - -This task can be used for building `Python` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This tasks uses the s2i-python image build from [sclorg/s2i-python-container](https://github.com/sclorg/s2i-python-container). - -Python 3 versions currently provided are: - -- Python 3.5 -- Python 3.6 - -## Installing the Python Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-python-3-pr/0.1/s2i-python-3.yaml -``` - -## Inputs - -### Parameters - -* **MINOR_VERSION**: Minor version of the Python 3 - (_default: 6_) -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: ._) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the python 3 Task to fetch a Git repository and builds and -pushes a container image using S2I and a python 3 builder image. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-python-3-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-python-3-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-python-3-pr/0.1/s2i-python-3-pr.yaml b/task/s2i-python-3-pr/0.1/s2i-python-3-pr.yaml deleted file mode 100644 index 379555e..0000000 --- a/task/s2i-python-3-pr/0.1/s2i-python-3-pr.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-python-3-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, python - tekton.dev/displayName: "s2i python 3 pipelineresource" -spec: - description: >- - s2i-python-3-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Python 3 builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the python 3 - default: '6' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/python-3$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-python-3-pr/0.1/tests/resource.yaml b/task/s2i-python-3-pr/0.1/tests/resource.yaml deleted file mode 100644 index 6293096..0000000 --- a/task/s2i-python-3-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-python-3-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/django-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-python-3-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-python-3-pr" diff --git a/task/s2i-python-3-pr/0.1/tests/step.yaml b/task/s2i-python-3-pr/0.1/tests/step.yaml deleted file mode 100644 index 788fc80..0000000 --- a/task/s2i-python-3-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- name: s2i-python-3-pr - taskRef: - name: s2i-python-3-pr - resources: - outputs: - - name: image - resource: s2i-python-3-pr-image - inputs: - - name: source - resource: s2i-python-3-pr-repo - params: - - name: TLSVERIFY - value: "false" diff --git a/task/s2i-python-3/0.1/tests/pv.yaml b/task/s2i-python-3/0.1/tests/pv.yaml deleted file mode 100644 index d266654..0000000 --- a/task/s2i-python-3/0.1/tests/pv.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: s2i-python-3-workspace -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 100Mi diff --git a/task/s2i-python-3/0.1/tests/step.yaml b/task/s2i-python-3/0.1/tests/step.yaml deleted file mode 100644 index 5365638..0000000 --- a/task/s2i-python-3/0.1/tests/step.yaml +++ /dev/null @@ -1,29 +0,0 @@ -- name: fetch-repository-s2i-python-3 - taskRef: - name: git-clone - workspaces: - - name: output - workspace: s2i-python-3-workspace - params: - - name: url - value: https://github.com/sclorg/django-ex - - name: subdirectory - value: "" - - name: deleteExisting - value: "true" - - name: revision - value: "master" - -- name: s2i-python-3-test - taskRef: - name: s2i-python-3 - runAfter: - - fetch-repository-s2i-python-3 - workspaces: - - name: source - workspace: s2i-python-3-workspace - params: - - name: TLSVERIFY - value: "false" - - name: IMAGE - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-python-3" diff --git a/task/s2i-python-3/0.1/README.md b/task/s2i-python/0.1/README.md similarity index 85% rename from task/s2i-python-3/0.1/README.md rename to task/s2i-python/0.1/README.md index d318640..d91a68d 100644 --- a/task/s2i-python-3/0.1/README.md +++ b/task/s2i-python/0.1/README.md @@ -1,25 +1,30 @@ -# Python 3 Source-to-Image +# Python Source-to-Image This task can be used for building `Python` apps as reproducible Docker images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) is a toolkit and a workflow for building reproducible container images from source code. This tasks uses the s2i-python image build from [sclorg/s2i-python-container](https://github.com/sclorg/s2i-python-container). -Python 3 versions currently provided are: +Python versions currently provided are: -- Python 3.5 -- Python 3.6 +- 3.8 +- 3.8-ubi8 +- 3.8-ubi7 +- 3.6-ubi8 +- 2.7 +- 2.7-ubi7 +- 2.7-ubi8 ## Installing the Python Task ``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-python-3/0.1/s2i-python-3.yaml +kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-python/0.1/s2i-python.yaml ``` ## Parameters -* **MINOR_VERSION**: Minor version of the Python 3 - (_default: 6_) +* **VERSION**: The tag of python imagestream for python version + (_default: 3.8-ubi8_) * **PATH_CONTEXT**: Source path from where S2I command needs to be run (_default: ._) * **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a @@ -59,7 +64,7 @@ oc adm policy add-role-to-user edit -z pipeline apiVersion: tekton.dev/v1beta1 kind: Pipeline metadata: - name: s2i-python-3-pipeline + name: s2i-python-pipeline spec: params: - name: IMAGE @@ -94,19 +99,19 @@ spec: ## Creating the pipelinerun -This PipelineRun runs the python 3 Task to fetch a Git repository and builds and -pushes a container image using S2I and a python 3 builder image. +This PipelineRun runs the python Task to fetch a Git repository and builds and +pushes a container image using S2I and a python builder image. ```yaml apiVersion: tekton.dev/v1beta1 kind: PipelineRun metadata: - name: s2i-python-3-pipelinerun + name: s2i-python-pipelinerun spec: # Use service account with git and image repo credentials serviceAccountName: pipeline pipelineRunRef: - name: s2i-python-3-pipeline + name: s2i-python-pipeline params: - name: IMAGE value: quay.io/my-repo/my-image-name diff --git a/task/s2i-python-3/0.1/s2i-python-3.yaml b/task/s2i-python/0.1/s2i-python.yaml similarity index 79% rename from task/s2i-python-3/0.1/s2i-python-3.yaml rename to task/s2i-python/0.1/s2i-python.yaml index 34232e0..756ec4e 100644 --- a/task/s2i-python-3/0.1/s2i-python-3.yaml +++ b/task/s2i-python/0.1/s2i-python.yaml @@ -1,25 +1,25 @@ apiVersion: tekton.dev/v1beta1 kind: Task metadata: - name: s2i-python-3 + name: s2i-python labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" + tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, python, workspace - tekton.dev/displayName: "s2i python 3" + tekton.dev/displayName: "s2i python" spec: description: >- - s2i-python-3 task clones a Git repository and builds and - pushes a container image using S2I and a Python 3 builder image. + s2i-python task clones a Git repository and builds and + pushes a container image using S2I and a Python builder image. results: - name: IMAGE_DIGEST description: Digest of the image just built. params: - - name: MINOR_VERSION - description: The minor version of the python 3 - default: '6' + - name: VERSION + description: The tag of python imagestream for python version + default: '3.8-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. @@ -42,7 +42,7 @@ spec: - name: generate image: quay.io/openshift-pipeline/s2i workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/python-3$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/python:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source diff --git a/task/s2i-dotnet-1/0.1/tests/pv.yaml b/task/s2i-python/0.1/tests/pv.yaml similarity index 82% rename from task/s2i-dotnet-1/0.1/tests/pv.yaml rename to task/s2i-python/0.1/tests/pv.yaml index b283c4b..1fa70b0 100644 --- a/task/s2i-dotnet-1/0.1/tests/pv.yaml +++ b/task/s2i-python/0.1/tests/pv.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: s2i-dotnet-1-workspace + name: s2i-python-workspace spec: accessModes: - ReadWriteOnce diff --git a/task/s2i-python-2/0.1/tests/step.yaml b/task/s2i-python/0.1/tests/step.yaml similarity index 66% rename from task/s2i-python-2/0.1/tests/step.yaml rename to task/s2i-python/0.1/tests/step.yaml index 9d84eb1..3a72f7a 100644 --- a/task/s2i-python-2/0.1/tests/step.yaml +++ b/task/s2i-python/0.1/tests/step.yaml @@ -1,9 +1,9 @@ -- name: fetch-repository-s2i-python-2 +- name: fetch-repository-s2i-python taskRef: name: git-clone workspaces: - name: output - workspace: s2i-python-2-workspace + workspace: s2i-python-workspace params: - name: url value: https://github.com/sclorg/django-ex @@ -14,16 +14,16 @@ - name: revision value: "master" -- name: s2i-python-2-test +- name: s2i-python-test taskRef: - name: s2i-python-2 + name: s2i-python runAfter: - - fetch-repository-s2i-python-2 + - fetch-repository-s2i-python workspaces: - name: source - workspace: s2i-python-2-workspace + workspace: s2i-python-workspace params: - name: TLSVERIFY value: "false" - name: IMAGE - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-python-2" + value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-python" diff --git a/task/s2i-ruby-pr/0.1/README.md b/task/s2i-ruby-pr/0.1/README.md deleted file mode 100644 index b595118..0000000 --- a/task/s2i-ruby-pr/0.1/README.md +++ /dev/null @@ -1,96 +0,0 @@ -# Ruby Source-to-Image (PipelineResource) - -This task can be used for building `Ruby` apps as reproducible Docker -images using Source-to-Image. [Source-to-Image (S2I)](https://github.com/openshift/source-to-image) -is a toolkit and a workflow for building reproducible container images -from source code. This tasks uses the s2i-ruby image build from [sclorg/s2i-ruby-container](https://github.com/sclorg/s2i-ruby-container). - -Ruby versions currently provided are: - -- Ruby 2.3 -- Ruby 2.4 -- Ruby 2.5 - -## Installing the Ruby Task - -``` -kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/master/task/s2i-ruby-pr/0.1/s2i-ruby-pr.yaml -``` - -## Inputs - -### Parameters - -* **MINOR_VERSION**: Minor version of the Ruby 2 - (_default: 5_) -* **PATH_CONTEXT**: Source path from where S2I command needs to be run - (_default: ._) -* **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a - non-TLS registry) (_default:_ `true`) - - -### Resources - -* **source**: A `git`-type `PipelineResource` specifying the location of the - source to build. - -## Outputs - -### Resources - -* **image**: An `image`-type `PipelineResource` specifying the image that should - be built. - -## Creating a ServiceAccount - -S2I builds an image and pushes it to the destination registry which is -defined as a parameter. The image needs proper credentials to be -authenticated by the remote container registry. These credentials can -be provided through a serviceaccount. See [Authentication](https://github.com/tektoncd/pipeline/blob/master/docs/auth.md#basic-authentication-docker) -for further details. - -If you run on OpenShift, you also need to allow the service -account to run privileged containers. Due to security considerations -OpenShift does not allow containers to run as privileged containers -by default. - -Run the following in order to create a service account named -`pipelines` on OpenShift and allow it to run privileged containers: - -``` -oc create serviceaccount pipeline -oc adm policy add-scc-to-user privileged -z pipeline -oc adm policy add-role-to-user edit -z pipeline -``` - -## Creating the taskrun - -This TaskRun runs the ruby Task to fetch a Git repository and builds and -pushes a container image using S2I and a ruby builder image. - -``` -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: - name: s2i-ruby-pr-taskrun -spec: - # Use service account with git and image repo credentials - serviceAccountName: pipeline - taskRef: - name: s2i-ruby-pr - resources: - inputs: - - name: source - resourceSpec: - type: git - params: - - name: url - value: https://github.com/username/reponame - outputs: - - name: image - resourceSpec: - type: image - params: - - name: url - value: quay.io/my-repo/my-image-name -``` diff --git a/task/s2i-ruby-pr/0.1/s2i-ruby-pr.yaml b/task/s2i-ruby-pr/0.1/s2i-ruby-pr.yaml deleted file mode 100644 index 7051e69..0000000 --- a/task/s2i-ruby-pr/0.1/s2i-ruby-pr.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-ruby-pr - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.11.3" - tekton.dev/tags: s2i, ruby - tekton.dev/displayName: "s2i ruby pipelineresource" -spec: - description: >- - s2i-ruby-pr task fetches a Git repository and builds and - pushes a container image using S2I and a Ruby builder image. - - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - params: - - name: MINOR_VERSION - description: The minor version of the ruby - default: '5' - type: string - - name: PATH_CONTEXT - description: The location of the path to run s2i from. - default: . - type: string - - name: TLSVERIFY - description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) - default: "true" - type: string - - name: BUILDER_IMAGE - description: The location of the buildah builder image. - default: quay.io/buildah/stable:v1.17.0 - resources: - inputs: - - name: source - type: git - outputs: - - name: image - type: image - steps: - - name: generate - image: quay.io/openshift-pipeline/s2i - workingDir: $(resources.inputs.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/ruby-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] - volumeMounts: - - name: gen-source - mountPath: /gen-source - - name: build - image: $(params.BUILDER_IMAGE) - workingdir: /gen-source - command: ['buildah', 'bud', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '/gen-source/Dockerfile.gen', '-t', '$(resources.outputs.image.url)', '.'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: gen-source - mountPath: /gen-source - - name: push - image: $(params.BUILDER_IMAGE) - workingDir: $(resources.inputs.source.path) - command: ['buildah', 'push', '--storage-driver=vfs', '--tls-verify=$(params.TLSVERIFY)', '--digestfile=$(resources.inputs.source.path)/image-digest', '$(resources.outputs.image.url)', 'docker://$(resources.outputs.image.url)'] - volumeMounts: - - name: varlibcontainers - mountPath: /var/lib/containers - - name: digest-to-results - image: $(params.BUILDER_IMAGE) - script: cat $(resources.inputs.source.path)/image-digest | tee /tekton/results/IMAGE_DIGEST - volumes: - - name: varlibcontainers - emptyDir: {} - - name: gen-source - emptyDir: {} diff --git a/task/s2i-ruby-pr/0.1/tests/resource.yaml b/task/s2i-ruby-pr/0.1/tests/resource.yaml deleted file mode 100644 index 2763d65..0000000 --- a/task/s2i-ruby-pr/0.1/tests/resource.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-ruby-pr-repo -spec: - type: git - params: - - name: revision - value: master - - name: url - value: https://github.com/sclorg/ruby-ex ---- -apiVersion: tekton.dev/v1alpha1 -kind: PipelineResource -metadata: - name: s2i-ruby-pr-image -spec: - type: image - params: - - name: url - value: "image-registry.openshift-image-registry.svc:5000/{{namespace}}/s2i-ruby-pr" diff --git a/task/s2i-ruby-pr/0.1/tests/step.yaml b/task/s2i-ruby-pr/0.1/tests/step.yaml deleted file mode 100644 index ff975a3..0000000 --- a/task/s2i-ruby-pr/0.1/tests/step.yaml +++ /dev/null @@ -1,13 +0,0 @@ -- name: s2i-ruby-pr - taskRef: - name: s2i-ruby-pr - resources: - outputs: - - name: image - resource: s2i-ruby-pr-image - inputs: - - name: source - resource: s2i-ruby-pr-repo - params: - - name: TLSVERIFY - value: "false" diff --git a/task/s2i-ruby/0.1/README.md b/task/s2i-ruby/0.1/README.md index 17af7ff..db8bed6 100644 --- a/task/s2i-ruby/0.1/README.md +++ b/task/s2i-ruby/0.1/README.md @@ -7,9 +7,15 @@ from source code. This tasks uses the s2i-ruby image build from [sclorg/s2i-ruby Ruby versions currently provided are: -- Ruby 2.3 -- Ruby 2.4 -- Ruby 2.5 +- 2.7 +- 2.7-ubi7 +- 2.7-ubi8 +- 2.6 +- 2.6-ubi7 +- 2.6-ubi8 +- 2.5 +- 2.5-ubi7 +- 2.5-ubi8 ## Installing the Ruby Task @@ -19,8 +25,8 @@ kubectl apply -f https://raw.githubusercontent.com/openshift/pipelines-catalog/m ## Parameters -* **MINOR_VERSION**: Minor version of the Ruby 2 - (_default: 5_) +* **VERSION**: The tag of ruby imagestream for ruby version + (_default: 2.7-ubi8_) * **PATH_CONTEXT**: Source path from where S2I command needs to be run (_default: ._) * **TLSVERIFY**: Verify the TLS on the registry endpoint (for push/pull to a diff --git a/task/s2i-ruby/0.1/s2i-ruby.yaml b/task/s2i-ruby/0.1/s2i-ruby.yaml index f4af9b8..72de4bd 100644 --- a/task/s2i-ruby/0.1/s2i-ruby.yaml +++ b/task/s2i-ruby/0.1/s2i-ruby.yaml @@ -5,7 +5,7 @@ metadata: labels: app.kubernetes.io/version: "0.1" annotations: - tekton.dev/pipelines.minVersion: "0.11.3" + tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, ruby, workspace tekton.dev/displayName: "s2i ruby" spec: @@ -17,9 +17,9 @@ spec: - name: IMAGE_DIGEST description: Digest of the image just built. params: - - name: MINOR_VERSION - description: The minor version of the ruby - default: '5' + - name: VERSION + description: The tag of ruby imagestream for ruby version + default: '2.7-ubi8' type: string - name: PATH_CONTEXT description: The location of the path to run s2i from. @@ -42,7 +42,7 @@ spec: - name: generate image: quay.io/openshift-pipeline/s2i workingdir: $(workspaces.source.path) - command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'registry.access.redhat.com/rhscl/ruby-2$(params.MINOR_VERSION)-rhel7', '--as-dockerfile', '/gen-source/Dockerfile.gen'] + command: ['s2i', 'build', '$(params.PATH_CONTEXT)', 'image-registry.openshift-image-registry.svc:5000/openshift/ruby:$(params.VERSION)', '--as-dockerfile', '/gen-source/Dockerfile.gen'] volumeMounts: - name: gen-source mountPath: /gen-source From d840709c98bb8a8abbac98ab006f0beb262b5266 Mon Sep 17 00:00:00 2001 From: Pradeep Kumar Date: Fri, 12 Mar 2021 17:17:51 +0530 Subject: [PATCH 2/2] update version to same as osp 1.4.0 --- .tekton/pipeline.yaml | 14 +++++++------- task/s2i-dotnet/0.1/s2i-dotnet.yaml | 2 +- task/s2i-eap/0.1/s2i-eap.yaml | 2 +- task/s2i-go/0.1/s2i-go.yaml | 2 +- task/s2i-java/0.1/s2i-java.yaml | 2 +- task/s2i-nodejs/0.1/s2i-nodejs.yaml | 2 +- task/s2i-perl/0.1/s2i-perl.yaml | 2 +- task/s2i-php/0.1/s2i-php.yaml | 2 +- task/s2i-python/0.1/s2i-python.yaml | 2 +- task/s2i-ruby/0.1/s2i-ruby.yaml | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.tekton/pipeline.yaml b/.tekton/pipeline.yaml index 8b9212d..1a4c2ea 100644 --- a/.tekton/pipeline.yaml +++ b/.tekton/pipeline.yaml @@ -4,7 +4,7 @@ kind: Task metadata: name: s2i-dotnet labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, dotnet, workspace @@ -89,7 +89,7 @@ kind: Task metadata: name: s2i-go labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, go, workspace @@ -174,7 +174,7 @@ kind: Task metadata: name: s2i-java labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, java, workspace @@ -308,7 +308,7 @@ kind: Task metadata: name: s2i-nodejs labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, nodejs, workspace @@ -393,7 +393,7 @@ kind: Task metadata: name: s2i-php labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, php, workspace @@ -478,7 +478,7 @@ kind: Task metadata: name: s2i-python labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, python, workspace @@ -565,7 +565,7 @@ kind: Task metadata: name: s2i-ruby labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, ruby, workspace diff --git a/task/s2i-dotnet/0.1/s2i-dotnet.yaml b/task/s2i-dotnet/0.1/s2i-dotnet.yaml index 16884bf..56f4114 100644 --- a/task/s2i-dotnet/0.1/s2i-dotnet.yaml +++ b/task/s2i-dotnet/0.1/s2i-dotnet.yaml @@ -3,7 +3,7 @@ kind: Task metadata: name: s2i-dotnet labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, dotnet, workspace diff --git a/task/s2i-eap/0.1/s2i-eap.yaml b/task/s2i-eap/0.1/s2i-eap.yaml index 867d8ff..b462d5e 100644 --- a/task/s2i-eap/0.1/s2i-eap.yaml +++ b/task/s2i-eap/0.1/s2i-eap.yaml @@ -3,7 +3,7 @@ kind: Task metadata: name: s2i-eap labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, eap diff --git a/task/s2i-go/0.1/s2i-go.yaml b/task/s2i-go/0.1/s2i-go.yaml index 0d3119d..ad2abc4 100644 --- a/task/s2i-go/0.1/s2i-go.yaml +++ b/task/s2i-go/0.1/s2i-go.yaml @@ -3,7 +3,7 @@ kind: Task metadata: name: s2i-go labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, go, workspace diff --git a/task/s2i-java/0.1/s2i-java.yaml b/task/s2i-java/0.1/s2i-java.yaml index 8f635e3..d66896e 100644 --- a/task/s2i-java/0.1/s2i-java.yaml +++ b/task/s2i-java/0.1/s2i-java.yaml @@ -3,7 +3,7 @@ kind: Task metadata: name: s2i-java labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, java, workspace diff --git a/task/s2i-nodejs/0.1/s2i-nodejs.yaml b/task/s2i-nodejs/0.1/s2i-nodejs.yaml index 8567283..af3859f 100644 --- a/task/s2i-nodejs/0.1/s2i-nodejs.yaml +++ b/task/s2i-nodejs/0.1/s2i-nodejs.yaml @@ -3,7 +3,7 @@ kind: Task metadata: name: s2i-nodejs labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, nodejs, workspace diff --git a/task/s2i-perl/0.1/s2i-perl.yaml b/task/s2i-perl/0.1/s2i-perl.yaml index b778e22..0b0573f 100644 --- a/task/s2i-perl/0.1/s2i-perl.yaml +++ b/task/s2i-perl/0.1/s2i-perl.yaml @@ -3,7 +3,7 @@ kind: Task metadata: name: s2i-perl labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, perl, workspace diff --git a/task/s2i-php/0.1/s2i-php.yaml b/task/s2i-php/0.1/s2i-php.yaml index 10fcbf3..925b15b 100644 --- a/task/s2i-php/0.1/s2i-php.yaml +++ b/task/s2i-php/0.1/s2i-php.yaml @@ -3,7 +3,7 @@ kind: Task metadata: name: s2i-php labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, php, workspace diff --git a/task/s2i-python/0.1/s2i-python.yaml b/task/s2i-python/0.1/s2i-python.yaml index 756ec4e..a13d806 100644 --- a/task/s2i-python/0.1/s2i-python.yaml +++ b/task/s2i-python/0.1/s2i-python.yaml @@ -3,7 +3,7 @@ kind: Task metadata: name: s2i-python labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, python, workspace diff --git a/task/s2i-ruby/0.1/s2i-ruby.yaml b/task/s2i-ruby/0.1/s2i-ruby.yaml index 72de4bd..2d8efc0 100644 --- a/task/s2i-ruby/0.1/s2i-ruby.yaml +++ b/task/s2i-ruby/0.1/s2i-ruby.yaml @@ -3,7 +3,7 @@ kind: Task metadata: name: s2i-ruby labels: - app.kubernetes.io/version: "0.1" + app.kubernetes.io/version: "1.4.0" annotations: tekton.dev/pipelines.minVersion: "0.19" tekton.dev/tags: s2i, ruby, workspace