diff --git a/experimental/artifacthub-repo.yml b/experimental/artifacthub-repo.yml deleted file mode 100644 index 98291b10..00000000 --- a/experimental/artifacthub-repo.yml +++ /dev/null @@ -1,8 +0,0 @@ -repositoryID: 6b1e3fa7-3d04-47d2-9b3e-14009e0d52b3 -owners: - - name: vdemeester - email: vdemeest@redhat.com -#ignore: # (optional, packages that should not be indexed by Artifact Hub) -# - name: package1 -# - name: package2 # Exact match -# version: beta # Regular expression (when omitted, all versions are ignored) diff --git a/experimental/pipelines/artifacthub-repo.yml b/experimental/pipelines/artifacthub-repo.yml deleted file mode 100644 index ad519dec..00000000 --- a/experimental/pipelines/artifacthub-repo.yml +++ /dev/null @@ -1,4 +0,0 @@ -repositoryID: a7f7e814-7308-4272-b3e3-71ac67bcf4c4 -owners: - - name: vdemeester - email: vdemeest@redhat.com \ No newline at end of file diff --git a/experimental/pipelines/go-ko/v0.1.0/go-ko.yaml b/experimental/pipelines/go-ko/v0.1.0/go-ko.yaml deleted file mode 100644 index 994dba00..00000000 --- a/experimental/pipelines/go-ko/v0.1.0/go-ko.yaml +++ /dev/null @@ -1,43 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Pipeline -metadata: - name: go-ko -spec: - params: - - name: gitURL - description: the git URL to build - - name: gitRevision - description: the git revision to build - - name: package - description: package to release - tasks: - - name: clone - taskRef: - name: git-clone - workspaces: - - name: output - workspace: sources - params: - - name: url - value: $(params.gitURL) - - name: revision - value: $(params.gitRevision) - - name: ko-build - runAfter: [ clone ] - taskRef: - name: go-ko-image - params: - - name: package - value: $(params.package) - - name: packages - value: ./... - workspaces: - - name: sources - workspace: sources - workspaces: - - name: sources - results: - - name: commit-sha - description: the sha of the commit that was released - value: $(tasks.clone.results.commit) - diff --git a/experimental/tasks/artifacthub-repo.yml b/experimental/tasks/artifacthub-repo.yml deleted file mode 100644 index d7096d3e..00000000 --- a/experimental/tasks/artifacthub-repo.yml +++ /dev/null @@ -1,8 +0,0 @@ -repositoryID: 0b580f09-c7b5-4c62-9f67-4208d4da28e3 -owners: - - name: vdemeester - email: vdemeest@redhat.com -#ignore: # (optional, packages that should not be indexed by Artifact Hub) -# - name: package1 -# - name: package2 # Exact match -# version: beta # Regular expression (when omitted, all versions are ignored) diff --git a/experimental/tasks/go-crane-image/0.3.0/README.md b/experimental/tasks/go-crane-image/0.3.0/README.md deleted file mode 100644 index 21d36e75..00000000 --- a/experimental/tasks/go-crane-image/0.3.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-crane-image - -Build an oci using go and crane. diff --git a/experimental/tasks/go-crane-image/0.3.0/go-crane-image.yaml b/experimental/tasks/go-crane-image/0.3.0/go-crane-image.yaml deleted file mode 100644 index 5ecddab7..00000000 --- a/experimental/tasks/go-crane-image/0.3.0/go-crane-image.yaml +++ /dev/null @@ -1,148 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-crane-image - labels: - app.kubernetes.io/version: "0.3.0" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go crane image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-crane-image Task will build a container image based of off a go project to be compiled, using crane. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-go - image: docker.io/library/golang:$(params.go.version) - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - go env - go build -o $(params.app) $(params.package) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: publish-image - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - # Prepare the layer to add - mkdir output - cp $(params.app) ./output - # FIXME: extra things to copy ? - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - APPEND_FLAGS="--new_tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - if [[ -n "$(params.image.base)" ]]; then - APPEND_FLAGS="--base $(params.image.base) ${APPEND_FLAGS}" - fi - - MUTATE_FLAGS="--entrypoint=/$(params.app) --tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --label ${LABEL}" - done - done <<< "$(params.image.labels)" - - crane mutate $( \ - crane append ${APPEND_FLAGS} \ - --new_layer <(cd ./output && tar -f - -c .) \ - ) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-crane-image/0.3.1/README.md b/experimental/tasks/go-crane-image/0.3.1/README.md deleted file mode 100644 index 21d36e75..00000000 --- a/experimental/tasks/go-crane-image/0.3.1/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-crane-image - -Build an oci using go and crane. diff --git a/experimental/tasks/go-crane-image/0.3.1/go-crane-image.yaml b/experimental/tasks/go-crane-image/0.3.1/go-crane-image.yaml deleted file mode 100644 index 202a18a2..00000000 --- a/experimental/tasks/go-crane-image/0.3.1/go-crane-image.yaml +++ /dev/null @@ -1,148 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-crane-image - labels: - app.kubernetes.io/version: "0.3.1" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go crane image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-crane-image Task will build a container image based of off a go project to be compiled, using crane. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-go - image: docker.io/library/golang:$(params.go.version) - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - go env - go build -o $(params.app) $(params.package) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: publish-image - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - # Prepare the layer to add - mkdir output - cp $(params.app) ./output - # FIXME: extra things to copy ? - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - APPEND_FLAGS="--new_tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - if [[ -n "$(params.image.base)" ]]; then - APPEND_FLAGS="--base $(params.image.base) ${APPEND_FLAGS}" - fi - - MUTATE_FLAGS="--entrypoint=/$(params.app) --tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --label ${LABEL}" - done - done <<< "$(params.image.labels)" - - crane mutate $( \ - crane append ${APPEND_FLAGS} \ - --new_layer <(cd ./output && tar -f - -c .) \ - ) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-crane-image/0.4.0/README.md b/experimental/tasks/go-crane-image/0.4.0/README.md deleted file mode 100644 index 21d36e75..00000000 --- a/experimental/tasks/go-crane-image/0.4.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-crane-image - -Build an oci using go and crane. diff --git a/experimental/tasks/go-crane-image/0.4.0/go-crane-image.yaml b/experimental/tasks/go-crane-image/0.4.0/go-crane-image.yaml deleted file mode 100644 index 2a957dcf..00000000 --- a/experimental/tasks/go-crane-image/0.4.0/go-crane-image.yaml +++ /dev/null @@ -1,148 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-crane-image - labels: - app.kubernetes.io/version: "0.4.0" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go crane image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-crane-image Task will build a container image based of off a go project to be compiled, using crane. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-go - image: docker.io/library/golang:$(params.go.version) - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - go env - go build -o $(params.app) $(params.package) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: publish-image - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - # Prepare the layer to add - mkdir output - cp $(params.app) ./output - # FIXME: extra things to copy ? - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - APPEND_FLAGS="--new_tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - if [[ -n "$(params.image.base)" ]]; then - APPEND_FLAGS="--base $(params.image.base) ${APPEND_FLAGS}" - fi - - MUTATE_FLAGS="--entrypoint=/$(params.app) --tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --label ${LABEL}" - done - done <<< "$(params.image.labels)" - - crane mutate $( \ - crane append ${APPEND_FLAGS} \ - --new_layer <(cd ./output && tar -f - -c .) \ - ) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-crane-image/v0.1.0/go-crane-image.yaml b/experimental/tasks/go-crane-image/v0.1.0/go-crane-image.yaml deleted file mode 100644 index b82684f6..00000000 --- a/experimental/tasks/go-crane-image/v0.1.0/go-crane-image.yaml +++ /dev/null @@ -1,151 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-crane-image - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go crane image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-crane-image Task will build a container image based of off a go - project to be compiled, using crane. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary - and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. - The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-go - image: docker.io/library/golang:$(params.go.version) - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - go env - go build -o $(params.app) $(params.package) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: publish-image - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - # Prepare the layer to add - mkdir output - cp $(params.app) ./output - # FIXME: extra things to copy ? - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - APPEND_FLAGS="--new_tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - if [[ -n "$(params.image.base)" ]]; then - APPEND_FLAGS="--base $(params.image.base) ${APPEND_FLAGS}" - fi - - MUTATE_FLAGS="--entrypoint=/$(params.app) --tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --label ${LABEL}" - done - done <<< "$(params.image.labels)" - - crane mutate $( \ - crane append ${APPEND_FLAGS} \ - --new_layer <(cd ./output && tar -f - -c .) \ - ) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-crane-image/v0.2.0/go-crane-image.yaml b/experimental/tasks/go-crane-image/v0.2.0/go-crane-image.yaml deleted file mode 100644 index 13c501f0..00000000 --- a/experimental/tasks/go-crane-image/v0.2.0/go-crane-image.yaml +++ /dev/null @@ -1,151 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-crane-image - labels: - app.kubernetes.io/version: "0.2.0" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go crane image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-crane-image Task will build a container image based of off a go - project to be compiled, using crane. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary - and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. - The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-go - image: docker.io/library/golang:$(params.go.version) - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - go env - go build -o $(params.app) $(params.package) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: publish-image - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - # Prepare the layer to add - mkdir output - cp $(params.app) ./output - # FIXME: extra things to copy ? - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - APPEND_FLAGS="--new_tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - if [[ -n "$(params.image.base)" ]]; then - APPEND_FLAGS="--base $(params.image.base) ${APPEND_FLAGS}" - fi - - MUTATE_FLAGS="--entrypoint=/$(params.app) --tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --label ${LABEL}" - done - done <<< "$(params.image.labels)" - - crane mutate $( \ - crane append ${APPEND_FLAGS} \ - --new_layer <(cd ./output && tar -f - -c .) \ - ) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-crane-image/v0.3.0/README.md b/experimental/tasks/go-crane-image/v0.3.0/README.md deleted file mode 100644 index 21d36e75..00000000 --- a/experimental/tasks/go-crane-image/v0.3.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-crane-image - -Build an oci using go and crane. diff --git a/experimental/tasks/go-crane-image/v0.3.0/go-crane-image.yaml b/experimental/tasks/go-crane-image/v0.3.0/go-crane-image.yaml deleted file mode 100644 index 5ecddab7..00000000 --- a/experimental/tasks/go-crane-image/v0.3.0/go-crane-image.yaml +++ /dev/null @@ -1,148 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-crane-image - labels: - app.kubernetes.io/version: "0.3.0" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go crane image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-crane-image Task will build a container image based of off a go project to be compiled, using crane. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-go - image: docker.io/library/golang:$(params.go.version) - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - go env - go build -o $(params.app) $(params.package) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: publish-image - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - # Prepare the layer to add - mkdir output - cp $(params.app) ./output - # FIXME: extra things to copy ? - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - APPEND_FLAGS="--new_tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - if [[ -n "$(params.image.base)" ]]; then - APPEND_FLAGS="--base $(params.image.base) ${APPEND_FLAGS}" - fi - - MUTATE_FLAGS="--entrypoint=/$(params.app) --tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --label ${LABEL}" - done - done <<< "$(params.image.labels)" - - crane mutate $( \ - crane append ${APPEND_FLAGS} \ - --new_layer <(cd ./output && tar -f - -c .) \ - ) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-crane-image/v0.3.1/README.md b/experimental/tasks/go-crane-image/v0.3.1/README.md deleted file mode 100644 index 21d36e75..00000000 --- a/experimental/tasks/go-crane-image/v0.3.1/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-crane-image - -Build an oci using go and crane. diff --git a/experimental/tasks/go-crane-image/v0.3.1/go-crane-image.yaml b/experimental/tasks/go-crane-image/v0.3.1/go-crane-image.yaml deleted file mode 100644 index 202a18a2..00000000 --- a/experimental/tasks/go-crane-image/v0.3.1/go-crane-image.yaml +++ /dev/null @@ -1,148 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-crane-image - labels: - app.kubernetes.io/version: "0.3.1" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go crane image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-crane-image Task will build a container image based of off a go project to be compiled, using crane. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-go - image: docker.io/library/golang:$(params.go.version) - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - go env - go build -o $(params.app) $(params.package) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: publish-image - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - # Prepare the layer to add - mkdir output - cp $(params.app) ./output - # FIXME: extra things to copy ? - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - APPEND_FLAGS="--new_tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - if [[ -n "$(params.image.base)" ]]; then - APPEND_FLAGS="--base $(params.image.base) ${APPEND_FLAGS}" - fi - - MUTATE_FLAGS="--entrypoint=/$(params.app) --tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --label ${LABEL}" - done - done <<< "$(params.image.labels)" - - crane mutate $( \ - crane append ${APPEND_FLAGS} \ - --new_layer <(cd ./output && tar -f - -c .) \ - ) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-crane-image/v0.4.0/README.md b/experimental/tasks/go-crane-image/v0.4.0/README.md deleted file mode 100644 index 21d36e75..00000000 --- a/experimental/tasks/go-crane-image/v0.4.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-crane-image - -Build an oci using go and crane. diff --git a/experimental/tasks/go-crane-image/v0.4.0/go-crane-image.yaml b/experimental/tasks/go-crane-image/v0.4.0/go-crane-image.yaml deleted file mode 100644 index 2a957dcf..00000000 --- a/experimental/tasks/go-crane-image/v0.4.0/go-crane-image.yaml +++ /dev/null @@ -1,148 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-crane-image - labels: - app.kubernetes.io/version: "0.4.0" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go crane image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-crane-image Task will build a container image based of off a go project to be compiled, using crane. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-go - image: docker.io/library/golang:$(params.go.version) - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - go env - go build -o $(params.app) $(params.package) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: publish-image - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - # Prepare the layer to add - mkdir output - cp $(params.app) ./output - # FIXME: extra things to copy ? - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - APPEND_FLAGS="--new_tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - if [[ -n "$(params.image.base)" ]]; then - APPEND_FLAGS="--base $(params.image.base) ${APPEND_FLAGS}" - fi - - MUTATE_FLAGS="--entrypoint=/$(params.app) --tag $(params.image.prefix)/$(params.app):$(params.image.tag)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --label ${LABEL}" - done - done <<< "$(params.image.labels)" - - crane mutate $( \ - crane append ${APPEND_FLAGS} \ - --new_layer <(cd ./output && tar -f - -c .) \ - ) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-ko-image/0.3.0/README.md b/experimental/tasks/go-ko-image/0.3.0/README.md deleted file mode 100644 index f3c6c1e3..00000000 --- a/experimental/tasks/go-ko-image/0.3.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-ko-image - -Build an oci image using go and ko. diff --git a/experimental/tasks/go-ko-image/0.3.0/go-ko-image.yaml b/experimental/tasks/go-ko-image/0.3.0/go-ko-image.yaml deleted file mode 100644 index 34048a7f..00000000 --- a/experimental/tasks/go-ko-image/0.3.0/go-ko-image.yaml +++ /dev/null @@ -1,175 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-ko-image - labels: - app.kubernetes.io/version: "0.3.0" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go ko image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-koimage Task will build a container image based of off a go project using ko. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: flags - description: >- - ko extra flags to pass to the ko command - default: "--sbom none" - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - # FIXME: support go version - # version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - # version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-and-publish - image: ghcr.io/ko-build/ko:latest - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - KO_FLAGS="$(params.flags) --tags $(params.image.tag)" - if [[ "$(params.image.push)" == "false" ]]; then - KO_FLAGS="${KO_FLAGS} --push=false" - fi - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - KO_FLAGS="${KO_FLAGS} --image-label ${LABEL}" - done - done <<< "$(params.image.labels)" - - go env - - echo "defaultBaseImage: $(params.image.base)" > .ko.yaml - - set -x - ko build --base-import-paths ${KO_FLAGS} $(params.package) > $(results.IMAGE_URL.path) - set +x - - KO_OUTPUT=$(results.IMAGE_URL.path) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: KO_DOCKER_REPO - value: $(params.image.prefix) - - name: add-metadata - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - if [[ -z "$(params.image.envs)" ]]; then - echo "Not doing anything as there is no envs specified" - fi - - MUTATE_FLAGS=" --tag $(params.image.prefix)/$(params.app)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - crane mutate $(cat $(results.IMAGE_URL.path)) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-ko-image/0.3.1/README.md b/experimental/tasks/go-ko-image/0.3.1/README.md deleted file mode 100644 index f3c6c1e3..00000000 --- a/experimental/tasks/go-ko-image/0.3.1/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-ko-image - -Build an oci image using go and ko. diff --git a/experimental/tasks/go-ko-image/0.3.1/go-ko-image.yaml b/experimental/tasks/go-ko-image/0.3.1/go-ko-image.yaml deleted file mode 100644 index 039bd96c..00000000 --- a/experimental/tasks/go-ko-image/0.3.1/go-ko-image.yaml +++ /dev/null @@ -1,175 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-ko-image - labels: - app.kubernetes.io/version: "0.3.1" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go ko image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-koimage Task will build a container image based of off a go project using ko. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: flags - description: >- - ko extra flags to pass to the ko command - default: "--sbom none" - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - # FIXME: support go version - # version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - # version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-and-publish - image: ghcr.io/ko-build/ko:latest - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - KO_FLAGS="$(params.flags) --tags $(params.image.tag)" - if [[ "$(params.image.push)" == "false" ]]; then - KO_FLAGS="${KO_FLAGS} --push=false" - fi - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - KO_FLAGS="${KO_FLAGS} --image-label ${LABEL}" - done - done <<< "$(params.image.labels)" - - go env - - echo "defaultBaseImage: $(params.image.base)" > .ko.yaml - - set -x - ko build --base-import-paths ${KO_FLAGS} $(params.package) > $(results.IMAGE_URL.path) - set +x - - KO_OUTPUT=$(results.IMAGE_URL.path) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: KO_DOCKER_REPO - value: $(params.image.prefix) - - name: add-metadata - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - if [[ -z "$(params.image.envs)" ]]; then - echo "Not doing anything as there is no envs specified" - fi - - MUTATE_FLAGS=" --tag $(params.image.prefix)/$(params.app)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - crane mutate $(cat $(results.IMAGE_URL.path)) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-ko-image/0.4.0/README.md b/experimental/tasks/go-ko-image/0.4.0/README.md deleted file mode 100644 index f3c6c1e3..00000000 --- a/experimental/tasks/go-ko-image/0.4.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-ko-image - -Build an oci image using go and ko. diff --git a/experimental/tasks/go-ko-image/0.4.0/go-ko-image.yaml b/experimental/tasks/go-ko-image/0.4.0/go-ko-image.yaml deleted file mode 100644 index 9aee0246..00000000 --- a/experimental/tasks/go-ko-image/0.4.0/go-ko-image.yaml +++ /dev/null @@ -1,175 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-ko-image - labels: - app.kubernetes.io/version: "0.4.0" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go ko image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-koimage Task will build a container image based of off a go project using ko. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: flags - description: >- - ko extra flags to pass to the ko command - default: "--sbom none" - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - # FIXME: support go version - # version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - # version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-and-publish - image: ghcr.io/ko-build/ko:latest - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - KO_FLAGS="$(params.flags) --tags $(params.image.tag)" - if [[ "$(params.image.push)" == "false" ]]; then - KO_FLAGS="${KO_FLAGS} --push=false" - fi - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - KO_FLAGS="${KO_FLAGS} --image-label ${LABEL}" - done - done <<< "$(params.image.labels)" - - go env - - echo "defaultBaseImage: $(params.image.base)" > .ko.yaml - - set -x - ko build --base-import-paths ${KO_FLAGS} $(params.package) > $(results.IMAGE_URL.path) - set +x - - KO_OUTPUT=$(results.IMAGE_URL.path) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: KO_DOCKER_REPO - value: $(params.image.prefix) - - name: add-metadata - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - if [[ -z "$(params.image.envs)" ]]; then - echo "Not doing anything as there is no envs specified" - fi - - MUTATE_FLAGS=" --tag $(params.image.prefix)/$(params.app)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - crane mutate $(cat $(results.IMAGE_URL.path)) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-ko-image/v0.1.0/go-ko-image.yaml b/experimental/tasks/go-ko-image/v0.1.0/go-ko-image.yaml deleted file mode 100644 index 0baf5ea2..00000000 --- a/experimental/tasks/go-ko-image/v0.1.0/go-ko-image.yaml +++ /dev/null @@ -1,178 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-ko-image - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go ko image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-koimage Task will build a container image based of off a go - project using ko. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary - and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. - The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: flags - description: >- - ko extra flags to pass to the ko command - default: "--sbom none" - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - # FIXME: support go version - # version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - # version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-and-publish - image: ghcr.io/ko-build/ko:latest - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - KO_FLAGS="$(params.flags) --tags $(params.image.tag)" - if [[ "$(params.image.push)" == "false" ]]; then - KO_FLAGS="${KO_FLAGS} --push=false" - fi - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - KO_FLAGS="${KO_FLAGS} --image-label ${LABEL}" - done - done <<< "$(params.image.labels)" - - go env - - echo "defaultBaseImage: $(params.image.base)" > .ko.yaml - - set -x - ko build --base-import-paths ${KO_FLAGS} $(params.package) > $(results.IMAGE_URL.path) - set +x - - KO_OUTPUT=$(results.IMAGE_URL.path) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: KO_DOCKER_REPO - value: $(params.image.prefix) - - name: add-metadata - image: ghcr.io/shortain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - if [[ -z "$(params.image.envs)" ]]; then - echo "Not doing anything as there is no envs specified" - fi - - MUTATE_FLAGS=" --tag $(params.image.prefix)/$(params.app)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - crane mutate $(cat $(results.IMAGE_URL.path)) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-ko-image/v0.2.0/go-ko-image.yaml b/experimental/tasks/go-ko-image/v0.2.0/go-ko-image.yaml deleted file mode 100644 index b3e40057..00000000 --- a/experimental/tasks/go-ko-image/v0.2.0/go-ko-image.yaml +++ /dev/null @@ -1,178 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-ko-image - labels: - app.kubernetes.io/version: "0.2.0" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go ko image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-koimage Task will build a container image based of off a go - project using ko. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary - and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. - The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: flags - description: >- - ko extra flags to pass to the ko command - default: "--sbom none" - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - # FIXME: support go version - # version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - # version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-and-publish - image: ghcr.io/ko-build/ko:latest - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - KO_FLAGS="$(params.flags) --tags $(params.image.tag)" - if [[ "$(params.image.push)" == "false" ]]; then - KO_FLAGS="${KO_FLAGS} --push=false" - fi - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - KO_FLAGS="${KO_FLAGS} --image-label ${LABEL}" - done - done <<< "$(params.image.labels)" - - go env - - echo "defaultBaseImage: $(params.image.base)" > .ko.yaml - - set -x - ko build --base-import-paths ${KO_FLAGS} $(params.package) > $(results.IMAGE_URL.path) - set +x - - KO_OUTPUT=$(results.IMAGE_URL.path) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: KO_DOCKER_REPO - value: $(params.image.prefix) - - name: add-metadata - image: ghcr.io/shortain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - if [[ -z "$(params.image.envs)" ]]; then - echo "Not doing anything as there is no envs specified" - fi - - MUTATE_FLAGS=" --tag $(params.image.prefix)/$(params.app)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - crane mutate $(cat $(results.IMAGE_URL.path)) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-ko-image/v0.3.0/README.md b/experimental/tasks/go-ko-image/v0.3.0/README.md deleted file mode 100644 index f3c6c1e3..00000000 --- a/experimental/tasks/go-ko-image/v0.3.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-ko-image - -Build an oci image using go and ko. diff --git a/experimental/tasks/go-ko-image/v0.3.0/go-ko-image.yaml b/experimental/tasks/go-ko-image/v0.3.0/go-ko-image.yaml deleted file mode 100644 index 34048a7f..00000000 --- a/experimental/tasks/go-ko-image/v0.3.0/go-ko-image.yaml +++ /dev/null @@ -1,175 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-ko-image - labels: - app.kubernetes.io/version: "0.3.0" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go ko image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-koimage Task will build a container image based of off a go project using ko. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: flags - description: >- - ko extra flags to pass to the ko command - default: "--sbom none" - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - # FIXME: support go version - # version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - # version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-and-publish - image: ghcr.io/ko-build/ko:latest - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - KO_FLAGS="$(params.flags) --tags $(params.image.tag)" - if [[ "$(params.image.push)" == "false" ]]; then - KO_FLAGS="${KO_FLAGS} --push=false" - fi - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - KO_FLAGS="${KO_FLAGS} --image-label ${LABEL}" - done - done <<< "$(params.image.labels)" - - go env - - echo "defaultBaseImage: $(params.image.base)" > .ko.yaml - - set -x - ko build --base-import-paths ${KO_FLAGS} $(params.package) > $(results.IMAGE_URL.path) - set +x - - KO_OUTPUT=$(results.IMAGE_URL.path) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: KO_DOCKER_REPO - value: $(params.image.prefix) - - name: add-metadata - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - if [[ -z "$(params.image.envs)" ]]; then - echo "Not doing anything as there is no envs specified" - fi - - MUTATE_FLAGS=" --tag $(params.image.prefix)/$(params.app)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - crane mutate $(cat $(results.IMAGE_URL.path)) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-ko-image/v0.3.1/README.md b/experimental/tasks/go-ko-image/v0.3.1/README.md deleted file mode 100644 index f3c6c1e3..00000000 --- a/experimental/tasks/go-ko-image/v0.3.1/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-ko-image - -Build an oci image using go and ko. diff --git a/experimental/tasks/go-ko-image/v0.3.1/go-ko-image.yaml b/experimental/tasks/go-ko-image/v0.3.1/go-ko-image.yaml deleted file mode 100644 index 039bd96c..00000000 --- a/experimental/tasks/go-ko-image/v0.3.1/go-ko-image.yaml +++ /dev/null @@ -1,175 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-ko-image - labels: - app.kubernetes.io/version: "0.3.1" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go ko image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-koimage Task will build a container image based of off a go project using ko. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: flags - description: >- - ko extra flags to pass to the ko command - default: "--sbom none" - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - # FIXME: support go version - # version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - # version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-and-publish - image: ghcr.io/ko-build/ko:latest - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - KO_FLAGS="$(params.flags) --tags $(params.image.tag)" - if [[ "$(params.image.push)" == "false" ]]; then - KO_FLAGS="${KO_FLAGS} --push=false" - fi - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - KO_FLAGS="${KO_FLAGS} --image-label ${LABEL}" - done - done <<< "$(params.image.labels)" - - go env - - echo "defaultBaseImage: $(params.image.base)" > .ko.yaml - - set -x - ko build --base-import-paths ${KO_FLAGS} $(params.package) > $(results.IMAGE_URL.path) - set +x - - KO_OUTPUT=$(results.IMAGE_URL.path) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: KO_DOCKER_REPO - value: $(params.image.prefix) - - name: add-metadata - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - if [[ -z "$(params.image.envs)" ]]; then - echo "Not doing anything as there is no envs specified" - fi - - MUTATE_FLAGS=" --tag $(params.image.prefix)/$(params.app)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - crane mutate $(cat $(results.IMAGE_URL.path)) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/go-ko-image/v0.4.0/README.md b/experimental/tasks/go-ko-image/v0.4.0/README.md deleted file mode 100644 index f3c6c1e3..00000000 --- a/experimental/tasks/go-ko-image/v0.4.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# go-ko-image - -Build an oci image using go and ko. diff --git a/experimental/tasks/go-ko-image/v0.4.0/go-ko-image.yaml b/experimental/tasks/go-ko-image/v0.4.0/go-ko-image.yaml deleted file mode 100644 index 9aee0246..00000000 --- a/experimental/tasks/go-ko-image/v0.4.0/go-ko-image.yaml +++ /dev/null @@ -1,175 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: go-ko-image - labels: - app.kubernetes.io/version: "0.4.0" - annotations: - tekton.dev/pipelines.minVersion: "0.40.0" - tekton.dev/categories: language - tekton.dev/tags: go - tekton.dev/displayName: "go ko image" - tekton.dev/platforms: "linux/amd64,linux/s390x,linux/ppc64le,linux/arm64" -spec: - description: >- - The go-koimage Task will build a container image based of off a go project using ko. - workspaces: - - name: source - description: The go source to build - - name: dockerconfig - description: Includes a docker `config.json` or `.dockerconfigjson` - optional: true - params: - - name: app - description: >- - The name of the "application" to build. This will have an impact on the binary and possibly the image reference - - name: package - description: >- - The package to build. It needs to be a package `main` that compiles into a binary. The default value is `.`, usual value can be `./cmd/{name}` - default: . - - name: flags - description: >- - ko extra flags to pass to the ko command - default: "--sbom none" - - name: image - description: >- - The image specific options such as prefix, labels, env, … - type: object - properties: - base: {type: string} - labels: {type: string} - envs: {type: string} - push: {type: string} - prefix: {type: string} - tag: {type: string} - default: - base: "" - labels: "" - envs: "" - push: "true" - tag: "latest" - - name: go - description: >- - Golang options, such as flags, version, … - type: object - properties: - # FIXME: support go version - # version: {type: string} - GOFLAGS: {type: string} - GOOS: {type: string} - GOARCH: {type: string} - CGO_ENABLED: {type: string} - default: - # version: "1.18" - GOFLAGS: "-v" - GOOS: "" - GOARCH: "" - CGO_ENABLED: "0" - results: - - name: IMAGE_DIGEST - description: Digest of the image just built. - - name: IMAGE_URL - description: URL of the image just built. - steps: - - name: build-and-publish - image: ghcr.io/ko-build/ko:latest - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - KO_FLAGS="$(params.flags) --tags $(params.image.tag)" - if [[ "$(params.image.push)" == "false" ]]; then - KO_FLAGS="${KO_FLAGS} --push=false" - fi - - # labels - while IFS=';' read -ra LABELS; do - for LABEL in "${LABELS[@]}"; do - KO_FLAGS="${KO_FLAGS} --image-label ${LABEL}" - done - done <<< "$(params.image.labels)" - - go env - - echo "defaultBaseImage: $(params.image.base)" > .ko.yaml - - set -x - ko build --base-import-paths ${KO_FLAGS} $(params.package) > $(results.IMAGE_URL.path) - set +x - - KO_OUTPUT=$(results.IMAGE_URL.path) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - env: - - name: GOFLAGS - value: "$(params.go.GOFLAGS)" - - name: GOOS - value: "$(params.go.GOOS)" - - name: GOARCH - value: "$(params.go.GOARCH)" - - name: CGO_ENABLED - value: "$(params.go.CGO_ENABLED)" - - name: KO_DOCKER_REPO - value: $(params.image.prefix) - - name: add-metadata - image: ghcr.io/shortbrain/golang-tasks/crane:main - workingDir: $(workspaces.source.path) - script: | - #!/usr/bin/env bash - set -e - - if [[ "$(params.image.push)" == "false" ]]; then - echo "Not doing anything as push is disabled" - echo -n "" > $(resutls.IMAGE_DIGEST.path) - echo -n "" > $(resutls.IMAGE_URL.path) - exit 0 - fi - - if [[ "$(workspaces.dockerconfig.bound)" == "true" ]]; then - # if config.json exists at workspace root, we use that - if test -f "$(workspaces.dockerconfig.path)/config.json"; then - export DOCKER_CONFIG="$(workspaces.dockerconfig.path)" - # else we look for .dockerconfigjson at the root - elif test -f "$(workspaces.dockerconfig.path)/.dockerconfigjson"; then - cp "$(workspaces.dockerconfig.path)/.dockerconfigjson" "$HOME/.docker/config.json" - export DOCKER_CONFIG="$HOME/.docker" - # need to error out if neither files are present - else - echo "neither 'config.json' nor '.dockerconfigjson' found at workspace root" - exit 1 - fi - fi - - if [[ -z "$(params.image.envs)" ]]; then - echo "Not doing anything as there is no envs specified" - fi - - MUTATE_FLAGS=" --tag $(params.image.prefix)/$(params.app)" - # envs - while IFS=';' read -ra ENVS; do - for ENV in "${ENVS[@]}"; do - MUTATE_FLAGS="${MUTATE_FLAGS} --env ${ENV}" - done - done <<< "$(params.image.envs)" - - crane mutate $(cat $(results.IMAGE_URL.path)) \ - ${MUTATE_FLAGS} > crane_output - CRANE_OUTPUT=$(cat crane_output) - echo -n ${CRANE_OUTPUT#*@} > $(results.IMAGE_DIGEST.path) - echo -n ${CRANE_OUTPUT} > $(results.IMAGE_URL.path) - # echo -n ${CRANE_OUTPUT%@*} > $(results.IMAGE_URL.path) diff --git a/experimental/tasks/task-buildah/0.1.1/README.md b/experimental/tasks/task-buildah/0.1.1/README.md deleted file mode 100644 index 8c0a41f0..00000000 --- a/experimental/tasks/task-buildah/0.1.1/README.md +++ /dev/null @@ -1,76 +0,0 @@ -`Buildah` Tekton Task ------------------------ - -# Abstract - -The `buildah` Task is meant to build [OCI][OCI] container images without the requirement of container runtime daemon like Docker daemon using [Buildah][Buildah], the Task results contain the image name and the SHA256 image digest. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: {} -spec: - pipelineRef: - name: task-buildah - params: - - name: IMAGE - value: your-image-name - - name: TLS_VERIFY - value: true - - name: VERBOSE - value: false - workspaces: - - name: source - persistentVolumeClaim: - claimName: your-pvc-name -``` -You'll need to replace `your-image-name` with the actual name of the image you want to build, and `your-pvc-name` with the name of the PersistentVolumeClaim where your source code is stored. -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspace - -| Name | Optional | Description | -| :------------ | :------------------------: | :--------------------------- | -| `source` | `false` | Container build context, like for instnace a application source code followed by a `Containerfile`. | - - -## Params - -| Param | Type | Default | Description | -| :------------ | :------------------------: | :--------------------------- | :------------------------- | -| `IMAGE` | `string` | (required) | Fully qualified source container image name, including tag, to be built by buildah. | -| `CONTAINERFILE_PATH` | `string` | `Containerfile` | Path to the `Containerfile` (or `Dockerfile`) relative to the `source` workspace. | -| `TLS_VERIFY` | `string` | `true` | Sets the TLS verification flags, `true` is recommended. | -| `VERBOSE` | `string` | `false` | Shows a more verbose (debug) output. | -| `SUBDIRECTORY` | `string` | `.` | Relative subdirectory to the `source` Workspace for the build-context. | -| `STORAGE_DRIVER` | `string` | `overlay` | Set buildah storage driver to reflect the currrent cluster node's settings. | -| `BUILD_EXTRA_ARGS` | `string` | `` | Extra parameters passed for the build command when building images. | -| `PUSH_EXTRA_ARGS` | `string` | `` | Extra parameters passed for the push command when pushing images. | -| `SKIP_PUSH` | `string` | `false` | Skip pushing the image to the container registry. | - - -## Results - -| Result | Description | -| :------------ | :------------------------- | -| `IMAGE_URL` | Fully qualified image name. | -| `IMAGE_DIGEST` | SHA256 digest of the image just built. | - -[tektonPipelineAuth]: https://tekton.dev/docs/pipelines/auth/#configuring-docker-authentication-for-docker -[Buildah]: https://github.com/containers/buildah -[OCI]: https://opencontainers.org/ - diff --git a/experimental/tasks/task-buildah/0.1.1/task-buildah.yaml b/experimental/tasks/task-buildah/0.1.1/task-buildah.yaml deleted file mode 100644 index f2b21801..00000000 --- a/experimental/tasks/task-buildah/0.1.1/task-buildah.yaml +++ /dev/null @@ -1,136 +0,0 @@ ---- -# Source: task-containers/templates/task-buildah.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: buildah - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Buildah task builds source into a container image and - then pushes it to a container registry. - - workspaces: - - name: source - optional: false - description: | - Container build context, like for instnace a application source code - followed by a `Containerfile`. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by buildah. - - name: CONTAINERFILE_PATH - type: string - default: Containerfile - description: | - Path to the `Containerfile` (or `Dockerfile`) relative to the `source` workspace. - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_CONTAINERFILE_PATH - value: "$(params.CONTAINERFILE_PATH)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpI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keyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9yZXRlZCBvbiB0aGUgZW52aXJvbm1lbnQKZnVuY3Rpb24gZXhwb3J0ZWRfb3JfZmFpbCgpIHsKICAgIGRlY2xhcmUgLWEgX3JlcXVpcmVkX3ZhcnM9IiR7QH0iCgogICAgZm9yIHYgaW4gJHtfcmVxdWlyZWRfdmFyc1tAXX07IGRvCiAgICAgICAgW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh - chmod +x buildah-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /workspace/source - command: - - /scripts/buildah-bud.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - volumes: - - name: scripts-dir - emptyDir: {} diff --git a/experimental/tasks/task-buildah/v0.1.1/README.md b/experimental/tasks/task-buildah/v0.1.1/README.md deleted file mode 100644 index 8c0a41f0..00000000 --- a/experimental/tasks/task-buildah/v0.1.1/README.md +++ /dev/null @@ -1,76 +0,0 @@ -`Buildah` Tekton Task ------------------------ - -# Abstract - -The `buildah` Task is meant to build [OCI][OCI] container images without the requirement of container runtime daemon like Docker daemon using [Buildah][Buildah], the Task results contain the image name and the SHA256 image digest. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: PipelineRun -metadata: {} -spec: - pipelineRef: - name: task-buildah - params: - - name: IMAGE - value: your-image-name - - name: TLS_VERIFY - value: true - - name: VERBOSE - value: false - workspaces: - - name: source - persistentVolumeClaim: - claimName: your-pvc-name -``` -You'll need to replace `your-image-name` with the actual name of the image you want to build, and `your-pvc-name` with the name of the PersistentVolumeClaim where your source code is stored. -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspace - -| Name | Optional | Description | -| :------------ | :------------------------: | :--------------------------- | -| `source` | `false` | Container build context, like for instnace a application source code followed by a `Containerfile`. | - - -## Params - -| Param | Type | Default | Description | -| :------------ | :------------------------: | :--------------------------- | :------------------------- | -| `IMAGE` | `string` | (required) | Fully qualified source container image name, including tag, to be built by buildah. | -| `CONTAINERFILE_PATH` | `string` | `Containerfile` | Path to the `Containerfile` (or `Dockerfile`) relative to the `source` workspace. | -| `TLS_VERIFY` | `string` | `true` | Sets the TLS verification flags, `true` is recommended. | -| `VERBOSE` | `string` | `false` | Shows a more verbose (debug) output. | -| `SUBDIRECTORY` | `string` | `.` | Relative subdirectory to the `source` Workspace for the build-context. | -| `STORAGE_DRIVER` | `string` | `overlay` | Set buildah storage driver to reflect the currrent cluster node's settings. | -| `BUILD_EXTRA_ARGS` | `string` | `` | Extra parameters passed for the build command when building images. | -| `PUSH_EXTRA_ARGS` | `string` | `` | Extra parameters passed for the push command when pushing images. | -| `SKIP_PUSH` | `string` | `false` | Skip pushing the image to the container registry. | - - -## Results - -| Result | Description | -| :------------ | :------------------------- | -| `IMAGE_URL` | Fully qualified image name. | -| `IMAGE_DIGEST` | SHA256 digest of the image just built. | - -[tektonPipelineAuth]: https://tekton.dev/docs/pipelines/auth/#configuring-docker-authentication-for-docker -[Buildah]: https://github.com/containers/buildah -[OCI]: https://opencontainers.org/ - diff --git a/experimental/tasks/task-buildah/v0.1.1/task-buildah.yaml b/experimental/tasks/task-buildah/v0.1.1/task-buildah.yaml deleted file mode 100644 index f2b21801..00000000 --- a/experimental/tasks/task-buildah/v0.1.1/task-buildah.yaml +++ /dev/null @@ -1,136 +0,0 @@ ---- -# Source: task-containers/templates/task-buildah.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: buildah - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Buildah task builds source into a container image and - then pushes it to a container registry. - - workspaces: - - name: source - optional: false - description: | - Container build context, like for instnace a application source code - followed by a `Containerfile`. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by buildah. - - name: CONTAINERFILE_PATH - type: string - default: Containerfile - description: | - Path to the `Containerfile` (or `Dockerfile`) relative to the `source` workspace. - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_CONTAINERFILE_PATH - value: "$(params.CONTAINERFILE_PATH)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVSfSIgXAogICAgICAgIC0tdGxzLXZlcmlmeT0iJHtQQVJBTVNfVExTX1ZFUklGWX0iIFwKICAgICAgICAkeyp9Cn0KCiMKIyBQcmVwYXJlCiMKCiMgbWFraW5nIHN1cmUgdGhlIHJlcXVpcmVkIHdvcmtzcG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WEgX3JlcXVpcmVkX3ZhcnM9IiR7QH0iCgogICAgZm9yIHYgaW4gJHtfcmVxdWlyZWRfdmFyc1tAXX07IGRvCiAgICAgICAgW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh - chmod +x buildah-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /workspace/source - command: - - /scripts/buildah-bud.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - volumes: - - name: scripts-dir - emptyDir: {} diff --git a/experimental/tasks/task-git/0.1.0/README.md b/experimental/tasks/task-git/0.1.0/README.md deleted file mode 100644 index 60f0bdb6..00000000 --- a/experimental/tasks/task-git/0.1.0/README.md +++ /dev/null @@ -1,155 +0,0 @@ -

- - GitHub Test Workflow Status - - - GitHub release (latest by date) - -

- -`git` Tekton Task ------------------ - -The `git` Task will clone and prepare a Git repository on the `output` Workspace. By default the Git repository (`URL`) will be cloned on the root of the Workspace, but you can alter the clone location using the `SUBDIRECTORY` parameter, and [other settings](#parameters). - -A quick usage example is: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: git - params: - - name: URL - value: https://github.com/openshift-pipelines/task-git.git - workspaces: - - name: output - emptyDir: {} -``` - -Please consider the [Workspaces](#workspaces), [Parameters](#parameters) and [Results](#results) described below. - -# Workspaces - -A single Workspace is required for this Task, while the optional Workspaces will allow advanced Git configuration and authentication. - -## `output` - -The `output` is a required Workspace, represents the primary location where the Git repository data will be stored, and later on, this Workspace will be monted in subsequent Pipeline's Task. - -Knowing the Workspace data will be employed on other Tasks, the recommended approach is using a [persistent volume][tektonPVC], for instance a [`PersistentVolumeClaim` (PVC)][k8sPVC]. - -## Authentication Workspaces - -The recommended approach to authentication is using the [default mechanisms supported by Tekton Pipeline][tektonAuthentication], please consider it as your first option. - -More advanced use-cases may require different methods of interacting with private repositories, the following Workspaces are meant to support advanced Git configuration and authentication. - -### `basic-auth` (HTTP/SSH) - -The `basic-auth` is a optional Workspace to provide Git credentials and configuration. - -The following Workspace files (items) are shared with Git before cloning the repository, the Task copies the files to the Git user home directory, configured by the parameter `USER_HOME`. - -| Workspace File | Required | Description | -| :----------------- | :------: | :------------------------------------- | -| `.git-credentials` | `true` | [Git credentials file][gitCredentials] | -| `.gitconfig` | `true` | [Git configuration file][gitConfig] | - -Typically, this type of data is stored as a Kubernetes Secret. For example: - -```bash -kubectl create secret generic basic-auth-ex \ - --from-file=".git-credentials=${HOME}/.git-credentials" \ - --from-file=".gitconfig=${HOME}/.gitconfig" -``` - -Then, you can [reference the Secret][tektonWorkspaceSecret] as the `basic-auth` Workspace. - -### `ssh-directory` (SSH) - -The `ssh-directory` is a optional Workspace, meant to store the files commonly found on a [`~/.ssh` directory][dotSSHDirectory], when informed, the whole directory will be copied into the Git's home (configured by the parameter `USER_HOME`). - -During the `prepare` step you can see the details about what's being copied, please consider the output log snippet below. For more verbose logging set the peramater `VERBOSE` to `true`. - -``` ----> Phase: Copying '.ssh' from ssh-directory workspace ('/workspaces/ssh-directory')... -'/workspaces/ssh-directory' -> '/home/git/.ssh' -'/workspaces/ssh-directory/config' -> '/home/git/.ssh/config' -mode of '/home/git/.ssh' changed from 0755 (rwxr-xr-x) to 0700 (rwx------) -mode of '/home/git/.ssh/config' changed from 0644 (rw-r--r--) to 0400 (r--------) - -``` - -It's recommended storing this type of data as a Kubernetes Secret, like the following example: - -```bash -kubectl create secret generic ssh-directory-ex \ - --from-file="config=${HOME}/.ssh/config" \ - --from-file="authorized_keys=${HOME}/.ssh/authorized_keys" -``` - -Then, you can [reference the Secret][tektonWorkspaceSecret] as the `ssh-directory` Workspace. - -### `ssl-ca-directory` (mTLS) - -The `ssl-ca-directory` is a optional Workspace to store a additional [Certificate Authority (CA)][tlsCA] bundles, commonly `.pem` or `.crt` files. The exact bundle file name is defined by the parameter `CRT_FILENAME`. - -Before running the Git clone command, the [`GIT_SSL_CAINFO` environment variable][gitSSLCAInfo] is exported with the full path to the `CRT_FILENAME` in the `ssl-ca-directory` Workspace. - -You can observe the setting taking place on the beggining of the `git-clone` step: - -``` -phase 'Exporting custom CA certificate "GIT_SSL_CAINFO=/workspaces/ssl-ca-directory/ca-bundle.crt"' -``` - -This is a sensitive information and therefore it's recommended to store as a Kubernetes Secret, please consider the previous examples to create Secrets with the `--from-file` option. - -Finally, you can [reference the Secret][tektonWorkspaceSecret] as the `ssl-ca-directory` Workspace. - -# Parameters - -The following parameters are supported by this Task. - -| Parameter | Type | Default | Description | -| :-------- | :---: | :------ | :---------- | -| `URL` | `string` | (required) | Git repository URL| -| `REVISION` | `string` | `main` | Revision to checkout, an branch, tag, sha, ref, etc... | -| `SUBMODULES` | `string` | `true` | Initialize and fetch Git submodules | -| `DEPTH` | `string` | `1` | [Number of commits to fetch][gitCloneDepath], a "shallow clone" is a single commit | -| `SSL_VERIFY` | `string` | `true` | Sets the global [`http.sslVerify`][gitHTTPSSLVerify] value, `false` is not advised unless you trust the remote repository | -| `CRT_FILENAME` | `string` | `ca-bundle.crt` | Certificate Authority (CA) bundle filename on the `ssl-ca-directory` Workspace. | -| `SUBDIRECTORY` | `string` | "" (empty) | Relative path to the `output` Workspace where the repository will be cloned | -| `SPARSE_CHECKOUT_DIRECTORIES` | `string` | "" (empty) | List of directory patterns split by comma to perform ["sparse checkout"][gitSparseCheckout] | -| `DELETE_EXISTING` | `string` | `true` | Clean out the contents of the `output` Workspace before cloning the repository, if data exists. | -| `HTTP_PROXY` | `string` | "" (empty) | HTTP proxy server (non-TLS requests) | -| `HTTPS_PROXY` | `string` | "" (empty) | HTTPS proxy server (TLS requests) | -| `NO_PROXY` | `string` | "" (empty) | Opt out of proxying HTTP/HTTPS requests | -| `VERBOSE` | `string` | `false` | Log the commands executed | -| `USER_HOME` | `string` | `/home/git` | Absolute path to the Git user home directory | - -# Results - -The following results are produced by this Task. - -| Name | Description | -| :--- | :---------- | -| `COMMIT` | The precise commit SHA digest cloned | -| `URL` | The precise repository URL | -| `COMMITTER_DATE` | The epoch timestamp of the commit cloned | - -[dotSSHDirectory]: https://man.openbsd.org/sshd#FILES -[gitCloneDepath]: https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt -[gitConfig]: https://git-scm.com/docs/git-config#FILES -[gitCredentials]: https://git-scm.com/docs/git-credential-store#Documentation/git-credential-store.txt-git-credentials -[gitHTTPSSLVerify]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpsslVerify -[gitSparseCheckout]: https://git-scm.com/docs/git-sparse-checkout#_description -[gitSSLCAInfo]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpsslCAInfo -[k8sPVC]: https://kubernetes.io/docs/concepts/storage/persistent-volumes/ -[tektonAuthentication]: https://tekton.dev/docs/pipelines/auth/ -[tektonPVC]: https://tekton.dev/docs/pipelines/workspaces/#using-persistentvolumeclaims-as-volumesource -[tektonWorkspaceSecret]: https://tekton.dev/docs/pipelines/workspaces/#secret -[tlsCA]: https://en.wikipedia.org/wiki/Certificate_authority diff --git a/experimental/tasks/task-git/0.1.0/task-git.yaml b/experimental/tasks/task-git/0.1.0/task-git.yaml deleted file mode 100644 index acd9fd13..00000000 --- a/experimental/tasks/task-git/0.1.0/task-git.yaml +++ /dev/null @@ -1,250 +0,0 @@ ---- -# Source: task-git/templates/task.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: git - labels: - app.kubernetes.io/version: 0.1.0 - annotations: - tekton.dev/categories: Git - tekton.dev/displayName: git - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/platforms: linux/amd64,linux/s390x,linux/ppc64le,linux/arm64 - tekton.dev/tags: git -spec: - description: | - This Task represents Git and is able to initialize and clone a remote repository on the informed Workspace. It's likely to become the first `step` on a Pipeline. - - workspaces: - - name: output - description: | - The Git repository directory, data will be placed on the root of the - Workspace, or on the relative path defined by the SUBDIRECTORY - parameter. - - name: ssh-directory - optional: true - description: | - A `.ssh` directory with private key, `known_hosts`, `config`, etc. - Copied to the Git user's home before cloning the repository, in order to - server as authentication mechanismBinding a Secret to this Workspace is - strongly recommended over other volume types. - - name: basic-auth - optional: true - description: | - A Workspace containing a `.gitconfig` and `.git-credentials` files. - These will be copied to the user's home before Git commands run. All - other files in this Workspace are ignored. It is strongly recommended to - use `ssh-directory` over `basic-auth` whenever possible, and to bind a - Secret to this Workspace over other volume types. - - name: ssl-ca-directory - optional: true - description: | - A Workspace containing CA certificates, this will be used by Git to - verify the peer with when interacting with remote repositories using - HTTPS. - - params: - - name: URL - type: string - description: | - Git repository URL. - - name: REVISION - type: string - default: main - description: | - Revision to checkout, an branch, tag, sha, ref, etc... - - name: REFSPEC - default: "" - description: | - Repository `refspec` to fetch before checking out the revision. - - name: SUBMODULES - type: string - default: "true" - description: | - Initialize and fetch Git submodules. - - name: DEPTH - type: string - default: "1" - description: | - Number of commits to fetch, a "shallow clone" is a single commit. - - name: SSL_VERIFY - type: string - default: "true" - description: | - Sets the global `http.sslVerify` value, `false` is not advised unless - you trust the remote repository. - - name: CRT_FILENAME - type: string - default: ca-bundle.crt - description: | - Certificate Authority (CA) bundle filename on the `ssl-ca-directory` - Workspace. - - name: SUBDIRECTORY - type: string - default: "" - description: | - Relative path to the `output` Workspace where the repository will be - cloned. - - name: SPARSE_CHECKOUT_DIRECTORIES - type: string - default: "" - description: | - List of directory patterns split by comma to perform "sparse checkout". - - name: DELETE_EXISTING - type: string - default: "true" - description: | - Clean out the contents of the `output` Workspace before cloning the - repository, if data exists. - - name: HTTP_PROXY - type: string - default: "" - description: | - HTTP proxy server (non-TLS requests). - - name: HTTPS_PROXY - type: string - default: "" - description: | - HTTPS proxy server (TLS requests). - - name: NO_PROXY - type: string - default: "" - description: | - Opt out of proxying HTTP/HTTPS requests. - - name: VERBOSE - type: string - default: "false" - description: | - Log the commands executed. - - name: USER_HOME - type: string - default: "/home/git" - description: | - Absolute path to the Git user home directory. - - results: - - name: COMMIT - description: | - The precise commit SHA digest cloned. - - name: URL - description: | - The precise repository URL. - - name: COMMITTER_DATE - description: | - The epoch timestamp of the commit cloned. - - volumes: - - name: user-home - emptyDir: {} - - name: scripts-dir - emptyDir: {} - - stepTemplate: - env: - - - name: PARAMS_URL - value: "$(params.URL)" - - name: PARAMS_REVISION - value: "$(params.REVISION)" - - name: PARAMS_REFSPEC - value: "$(params.REFSPEC)" - - name: PARAMS_SUBMODULES - value: "$(params.SUBMODULES)" - - name: PARAMS_DEPTH - value: "$(params.DEPTH)" - - name: PARAMS_SSL_VERIFY - value: "$(params.SSL_VERIFY)" - - name: PARAMS_CRT_FILENAME - value: "$(params.CRT_FILENAME)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_SPARSE_CHECKOUT_DIRECTORIES - value: "$(params.SPARSE_CHECKOUT_DIRECTORIES)" - - name: PARAMS_DELETE_EXISTING - value: "$(params.DELETE_EXISTING)" - - name: PARAMS_HTTP_PROXY - value: "$(params.HTTP_PROXY)" - - name: PARAMS_HTTPS_PROXY - value: "$(params.HTTPS_PROXY)" - - name: PARAMS_NO_PROXY - value: "$(params.NO_PROXY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: PARAMS_USER_HOME - value: "$(params.USER_HOME)" - - name: WORKSPACES_OUTPUT_PATH - value: "$(workspaces.output.path)" - - name: WORKSPACES_SSH_DIRECTORY_BOUND - value: "$(workspaces.ssh-directory.bound)" - - name: WORKSPACES_SSH_DIRECTORY_PATH - value: "$(workspaces.ssh-directory.path)" - - name: WORKSPACES_BASIC_AUTH_BOUND - value: "$(workspaces.basic-auth.bound)" - - name: WORKSPACES_BASIC_AUTH_PATH - value: "$(workspaces.basic-auth.path)" - - name: WORKSPACES_SSL_CA_DIRECTORY_BOUND - value: "$(workspaces.ssl-ca-directory.bound)" - - name: WORKSPACES_SSL_CA_DIRECTORY_PATH - value: "$(workspaces.ssl-ca-directory.path)" - - name: RESULTS_COMMITTER_DATE_PATH - value: "$(results.COMMITTER_DATE.path)" - - name: RESULTS_COMMIT_PATH - value: "$(results.COMMIT.path)" - - name: RESULTS_URL_PATH - value: "$(results.URL.path)" - resources: - limits: - cpu: 100m - memory: 256Mi - requests: - cpu: 100m - memory: 256Mi - securityContext: - runAsNonRoot: true - runAsUser: 65532 - - steps: - - name: load-scripts - image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:latest - workingDir: /scripts - script: | - printf '%s' "IyEvdXNyL2Jpbi9lbnYgc2gKCmV4cG9ydCBQQVJBTVNfVVJMPSIke1BBUkFNU19VUkw6LX0iCmV4cG9ydCBQQVJBTVNfUkVWSVNJT049IiR7UEFSQU1TX1JFVklTSU9OOi19IgpleHBvcnQgUEFSQU1TX1JFRlNQRUM9IiR7UEFSQU1TX1JFRlNQRUM6LX0iCmV4cG9ydCBQQVJBTVNfU1VCTU9EVUxFUz0iJHtQQVJBTVNfU1VCTU9EVUxFUzotfSIKZXhwb3J0IFBBUkFNU19ERVBUSD0iJHtQQVJBTVNfREVQVEg6LX0iCmV4cG9ydCBQQVJBTVNfU1NMX1ZFUklGWT0iJHtQQVJBTVNfU1NMX1ZFUklGWTotfSIKZXhwb3J0IFBBUkFNU19DUlRfRklMRU5BTUU9IiR7UEFSQU1TX0NSVF9GSUxFTkFNRTotfSIKZXhwb3J0IFBBUkFNU19TVUJESVJFQ1RPUlk9IiR7UEFSQU1TX1NVQkRJUkVDVE9SWTotfSIKZXhwb3J0IFBBUkFNU19TUEFSU0VfQ0hFQ0tPVVRfRElSRUNUT1JJRVM9IiR7UEFSQU1TX1NQQVJTRV9DSEVDS09VVF9ESVJFQ1RPUklFUzotfSIKZXhwb3J0IFBBUkFNU19ERUxFVEVfRVhJU1RJTkc9IiR7UEFSQU1TX0RFTEVURV9FWElTVElORzotfSIKZ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NPTU1JVFRFUl9EQVRFX1BBVEh9CgpwaGFzZSAiUmVwb3J0aW5nIHBhcnNlZCByZXZpc2lvbiBTSEEgJyR7cmVzdWx0X3NoYX0nIgpwcmludGYgIiVzIiAiJHtyZXN1bHRfc2hhfSIgPiR7UkVTVUxUU19DT01NSVRfUEFUSH0KCnBoYXNlICJSZXBvcnRpbmcgcmVwb3NpdG9yeSBVUkwgJyR7UEFSQU1TX1VSTH0nIgpwcmludGYgIiVzIiAiJHtQQVJBTVNfVVJMfSIgPiR7UkVTVUxUU19VUkxfUEFUSH0KCmV4aXQgMA==" |base64 -d >report.sh - chmod +x "report.sh" - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: prepare - image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:latest - command: - - /scripts/prepare.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: user-home - mountPath: $(params.USER_HOME) - - - name: git-clone - image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:latest - command: - - /scripts/git-clone.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: user-home - mountPath: $(params.USER_HOME) - - - name: report - image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:latest - command: - - /scripts/report.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts diff --git a/experimental/tasks/task-git/0.2.0/README.md b/experimental/tasks/task-git/0.2.0/README.md deleted file mode 100644 index 60f0bdb6..00000000 --- a/experimental/tasks/task-git/0.2.0/README.md +++ /dev/null @@ -1,155 +0,0 @@ -

- - GitHub Test Workflow Status - - - GitHub release (latest by date) - -

- -`git` Tekton Task ------------------ - -The `git` Task will clone and prepare a Git repository on the `output` Workspace. By default the Git repository (`URL`) will be cloned on the root of the Workspace, but you can alter the clone location using the `SUBDIRECTORY` parameter, and [other settings](#parameters). - -A quick usage example is: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: git - params: - - name: URL - value: https://github.com/openshift-pipelines/task-git.git - workspaces: - - name: output - emptyDir: {} -``` - -Please consider the [Workspaces](#workspaces), [Parameters](#parameters) and [Results](#results) described below. - -# Workspaces - -A single Workspace is required for this Task, while the optional Workspaces will allow advanced Git configuration and authentication. - -## `output` - -The `output` is a required Workspace, represents the primary location where the Git repository data will be stored, and later on, this Workspace will be monted in subsequent Pipeline's Task. - -Knowing the Workspace data will be employed on other Tasks, the recommended approach is using a [persistent volume][tektonPVC], for instance a [`PersistentVolumeClaim` (PVC)][k8sPVC]. - -## Authentication Workspaces - -The recommended approach to authentication is using the [default mechanisms supported by Tekton Pipeline][tektonAuthentication], please consider it as your first option. - -More advanced use-cases may require different methods of interacting with private repositories, the following Workspaces are meant to support advanced Git configuration and authentication. - -### `basic-auth` (HTTP/SSH) - -The `basic-auth` is a optional Workspace to provide Git credentials and configuration. - -The following Workspace files (items) are shared with Git before cloning the repository, the Task copies the files to the Git user home directory, configured by the parameter `USER_HOME`. - -| Workspace File | Required | Description | -| :----------------- | :------: | :------------------------------------- | -| `.git-credentials` | `true` | [Git credentials file][gitCredentials] | -| `.gitconfig` | `true` | [Git configuration file][gitConfig] | - -Typically, this type of data is stored as a Kubernetes Secret. For example: - -```bash -kubectl create secret generic basic-auth-ex \ - --from-file=".git-credentials=${HOME}/.git-credentials" \ - --from-file=".gitconfig=${HOME}/.gitconfig" -``` - -Then, you can [reference the Secret][tektonWorkspaceSecret] as the `basic-auth` Workspace. - -### `ssh-directory` (SSH) - -The `ssh-directory` is a optional Workspace, meant to store the files commonly found on a [`~/.ssh` directory][dotSSHDirectory], when informed, the whole directory will be copied into the Git's home (configured by the parameter `USER_HOME`). - -During the `prepare` step you can see the details about what's being copied, please consider the output log snippet below. For more verbose logging set the peramater `VERBOSE` to `true`. - -``` ----> Phase: Copying '.ssh' from ssh-directory workspace ('/workspaces/ssh-directory')... -'/workspaces/ssh-directory' -> '/home/git/.ssh' -'/workspaces/ssh-directory/config' -> '/home/git/.ssh/config' -mode of '/home/git/.ssh' changed from 0755 (rwxr-xr-x) to 0700 (rwx------) -mode of '/home/git/.ssh/config' changed from 0644 (rw-r--r--) to 0400 (r--------) - -``` - -It's recommended storing this type of data as a Kubernetes Secret, like the following example: - -```bash -kubectl create secret generic ssh-directory-ex \ - --from-file="config=${HOME}/.ssh/config" \ - --from-file="authorized_keys=${HOME}/.ssh/authorized_keys" -``` - -Then, you can [reference the Secret][tektonWorkspaceSecret] as the `ssh-directory` Workspace. - -### `ssl-ca-directory` (mTLS) - -The `ssl-ca-directory` is a optional Workspace to store a additional [Certificate Authority (CA)][tlsCA] bundles, commonly `.pem` or `.crt` files. The exact bundle file name is defined by the parameter `CRT_FILENAME`. - -Before running the Git clone command, the [`GIT_SSL_CAINFO` environment variable][gitSSLCAInfo] is exported with the full path to the `CRT_FILENAME` in the `ssl-ca-directory` Workspace. - -You can observe the setting taking place on the beggining of the `git-clone` step: - -``` -phase 'Exporting custom CA certificate "GIT_SSL_CAINFO=/workspaces/ssl-ca-directory/ca-bundle.crt"' -``` - -This is a sensitive information and therefore it's recommended to store as a Kubernetes Secret, please consider the previous examples to create Secrets with the `--from-file` option. - -Finally, you can [reference the Secret][tektonWorkspaceSecret] as the `ssl-ca-directory` Workspace. - -# Parameters - -The following parameters are supported by this Task. - -| Parameter | Type | Default | Description | -| :-------- | :---: | :------ | :---------- | -| `URL` | `string` | (required) | Git repository URL| -| `REVISION` | `string` | `main` | Revision to checkout, an branch, tag, sha, ref, etc... | -| `SUBMODULES` | `string` | `true` | Initialize and fetch Git submodules | -| `DEPTH` | `string` | `1` | [Number of commits to fetch][gitCloneDepath], a "shallow clone" is a single commit | -| `SSL_VERIFY` | `string` | `true` | Sets the global [`http.sslVerify`][gitHTTPSSLVerify] value, `false` is not advised unless you trust the remote repository | -| `CRT_FILENAME` | `string` | `ca-bundle.crt` | Certificate Authority (CA) bundle filename on the `ssl-ca-directory` Workspace. | -| `SUBDIRECTORY` | `string` | "" (empty) | Relative path to the `output` Workspace where the repository will be cloned | -| `SPARSE_CHECKOUT_DIRECTORIES` | `string` | "" (empty) | List of directory patterns split by comma to perform ["sparse checkout"][gitSparseCheckout] | -| `DELETE_EXISTING` | `string` | `true` | Clean out the contents of the `output` Workspace before cloning the repository, if data exists. | -| `HTTP_PROXY` | `string` | "" (empty) | HTTP proxy server (non-TLS requests) | -| `HTTPS_PROXY` | `string` | "" (empty) | HTTPS proxy server (TLS requests) | -| `NO_PROXY` | `string` | "" (empty) | Opt out of proxying HTTP/HTTPS requests | -| `VERBOSE` | `string` | `false` | Log the commands executed | -| `USER_HOME` | `string` | `/home/git` | Absolute path to the Git user home directory | - -# Results - -The following results are produced by this Task. - -| Name | Description | -| :--- | :---------- | -| `COMMIT` | The precise commit SHA digest cloned | -| `URL` | The precise repository URL | -| `COMMITTER_DATE` | The epoch timestamp of the commit cloned | - -[dotSSHDirectory]: https://man.openbsd.org/sshd#FILES -[gitCloneDepath]: https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---depthltdepthgt -[gitConfig]: https://git-scm.com/docs/git-config#FILES -[gitCredentials]: https://git-scm.com/docs/git-credential-store#Documentation/git-credential-store.txt-git-credentials -[gitHTTPSSLVerify]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpsslVerify -[gitSparseCheckout]: https://git-scm.com/docs/git-sparse-checkout#_description -[gitSSLCAInfo]: https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpsslCAInfo -[k8sPVC]: https://kubernetes.io/docs/concepts/storage/persistent-volumes/ -[tektonAuthentication]: https://tekton.dev/docs/pipelines/auth/ -[tektonPVC]: https://tekton.dev/docs/pipelines/workspaces/#using-persistentvolumeclaims-as-volumesource -[tektonWorkspaceSecret]: https://tekton.dev/docs/pipelines/workspaces/#secret -[tlsCA]: https://en.wikipedia.org/wiki/Certificate_authority diff --git a/experimental/tasks/task-git/0.2.0/task-git.yaml b/experimental/tasks/task-git/0.2.0/task-git.yaml deleted file mode 100644 index b6db8430..00000000 --- a/experimental/tasks/task-git/0.2.0/task-git.yaml +++ /dev/null @@ -1,250 +0,0 @@ ---- -# Source: task-git/templates/task.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: git - labels: - app.kubernetes.io/version: 0.2.0 - annotations: - tekton.dev/categories: Git - tekton.dev/displayName: git - tekton.dev/pipelines.minVersion: 0.41.0 - tekton.dev/platforms: linux/amd64,linux/s390x,linux/ppc64le,linux/arm64 - tekton.dev/tags: git -spec: - description: | - This Task represents Git and is able to initialize and clone a remote repository on the informed Workspace. It's likely to become the first `step` on a Pipeline. - - workspaces: - - name: output - description: | - The Git repository directory, data will be placed on the root of the - Workspace, or on the relative path defined by the SUBDIRECTORY - parameter. - - name: ssh-directory - optional: true - description: | - A `.ssh` directory with private key, `known_hosts`, `config`, etc. - Copied to the Git user's home before cloning the repository, in order to - server as authentication mechanismBinding a Secret to this Workspace is - strongly recommended over other volume types. - - name: basic-auth - optional: true - description: | - A Workspace containing a `.gitconfig` and `.git-credentials` files. - These will be copied to the user's home before Git commands run. All - other files in this Workspace are ignored. It is strongly recommended to - use `ssh-directory` over `basic-auth` whenever possible, and to bind a - Secret to this Workspace over other volume types. - - name: ssl-ca-directory - optional: true - description: | - A Workspace containing CA certificates, this will be used by Git to - verify the peer with when interacting with remote repositories using - HTTPS. - - params: - - name: URL - type: string - description: | - Git repository URL. - - name: REVISION - type: string - default: main - description: | - Revision to checkout, an branch, tag, sha, ref, etc... - - name: REFSPEC - default: "" - description: | - Repository `refspec` to fetch before checking out the revision. - - name: SUBMODULES - type: string - default: "true" - description: | - Initialize and fetch Git submodules. - - name: DEPTH - type: string - default: "1" - description: | - Number of commits to fetch, a "shallow clone" is a single commit. - - name: SSL_VERIFY - type: string - default: "true" - description: | - Sets the global `http.sslVerify` value, `false` is not advised unless - you trust the remote repository. - - name: CRT_FILENAME - type: string - default: ca-bundle.crt - description: | - Certificate Authority (CA) bundle filename on the `ssl-ca-directory` - Workspace. - - name: SUBDIRECTORY - type: string - default: "" - description: | - Relative path to the `output` Workspace where the repository will be - cloned. - - name: SPARSE_CHECKOUT_DIRECTORIES - type: string - default: "" - description: | - List of directory patterns split by comma to perform "sparse checkout". - - name: DELETE_EXISTING - type: string - default: "true" - description: | - Clean out the contents of the `output` Workspace before cloning the - repository, if data exists. - - name: HTTP_PROXY - type: string - default: "" - description: | - HTTP proxy server (non-TLS requests). - - name: HTTPS_PROXY - type: string - default: "" - description: | - HTTPS proxy server (TLS requests). - - name: NO_PROXY - type: string - default: "" - description: | - Opt out of proxying HTTP/HTTPS requests. - - name: VERBOSE - type: string - default: "false" - description: | - Log the commands executed. - - name: USER_HOME - type: string - default: "/home/git" - description: | - Absolute path to the Git user home directory. - - results: - - name: COMMIT - description: | - The precise commit SHA digest cloned. - - name: URL - description: | - The precise repository URL. - - name: COMMITTER_DATE - description: | - The epoch timestamp of the commit cloned. - - volumes: - - name: user-home - emptyDir: {} - - name: scripts-dir - emptyDir: {} - - stepTemplate: - env: - - - name: PARAMS_URL - value: "$(params.URL)" - - name: PARAMS_REVISION - value: "$(params.REVISION)" - - name: PARAMS_REFSPEC - value: "$(params.REFSPEC)" - - name: PARAMS_SUBMODULES - value: "$(params.SUBMODULES)" - - name: PARAMS_DEPTH - value: "$(params.DEPTH)" - - name: PARAMS_SSL_VERIFY - value: "$(params.SSL_VERIFY)" - - name: PARAMS_CRT_FILENAME - value: "$(params.CRT_FILENAME)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_SPARSE_CHECKOUT_DIRECTORIES - value: "$(params.SPARSE_CHECKOUT_DIRECTORIES)" - - name: PARAMS_DELETE_EXISTING - value: "$(params.DELETE_EXISTING)" - - name: PARAMS_HTTP_PROXY - value: "$(params.HTTP_PROXY)" - - name: PARAMS_HTTPS_PROXY - value: "$(params.HTTPS_PROXY)" - - name: PARAMS_NO_PROXY - value: "$(params.NO_PROXY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: PARAMS_USER_HOME - value: "$(params.USER_HOME)" - - name: WORKSPACES_OUTPUT_PATH - value: "$(workspaces.output.path)" - - name: WORKSPACES_SSH_DIRECTORY_BOUND - value: "$(workspaces.ssh-directory.bound)" - - name: WORKSPACES_SSH_DIRECTORY_PATH - value: "$(workspaces.ssh-directory.path)" - - name: WORKSPACES_BASIC_AUTH_BOUND - value: "$(workspaces.basic-auth.bound)" - - name: WORKSPACES_BASIC_AUTH_PATH - value: "$(workspaces.basic-auth.path)" - - name: WORKSPACES_SSL_CA_DIRECTORY_BOUND - value: "$(workspaces.ssl-ca-directory.bound)" - - name: WORKSPACES_SSL_CA_DIRECTORY_PATH - value: "$(workspaces.ssl-ca-directory.path)" - - name: RESULTS_COMMITTER_DATE_PATH - value: "$(results.COMMITTER_DATE.path)" - - name: RESULTS_COMMIT_PATH - value: "$(results.COMMIT.path)" - - name: RESULTS_URL_PATH - value: "$(results.URL.path)" - resources: - limits: - cpu: 100m - memory: 256Mi - requests: - cpu: 100m - memory: 256Mi - securityContext: - runAsNonRoot: true - runAsUser: 65532 - - steps: - - name: load-scripts - image: registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:c4b2183f7c7997bd401d86b33eefb637b3ef2fa90618e875106292cd69a15c14 - workingDir: /scripts - script: | - printf '%s' "IyEvdXNyL2Jpbi9lbnYgc2gKCmV4cG9ydCBQQVJBTVNfVVJMPSIke1BBUkFNU19VUkw6LX0iCmV4cG9ydCBQQVJBTVNfUkVWSVNJT049IiR7UEFSQU1TX1JFVklTSU9OOi19IgpleHBvcnQgUEFSQU1TX1JFRlNQRUM9IiR7UEFSQU1TX1JFRlNQRUM6LX0iCmV4cG9ydCBQQVJBTVNfU1VCTU9EVUxFUz0iJHtQQVJBTVNfU1VCTU9EVUxFUzotfSIKZXhwb3J0IFBBUkFNU19ERVBUSD0iJHtQQVJBTVNfREVQVEg6LX0iCmV4cG9ydCBQQVJBTVNfU1NMX1ZFUklGWT0iJHtQQVJBTVNfU1NMX1ZFUklGWTotfSIK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C0tYWRkIHNhZmUuZGlyZWN0b3J5ICIke1dPUktTUEFDRVNfT1VUUFVUX1BBVEh9IgoKcmVzdWx0X3NoYT0iJChnaXQgcmV2LXBhcnNlIEhFQUQpIgpyZXN1bHRfY29tbWl0dGVyX2RhdGU9IiQoZ2l0IGxvZyAtMSAtLXByZXR0eT0lY3QpIgoKcGhhc2UgIlJlcG9ydGluZyBsYXN0IGNvbW1pdCBkYXRlICcke3Jlc3VsdF9jb21taXR0ZXJfZGF0ZX0nIgpwcmludGYgIiVzIiAiJHtyZXN1bHRfY29tbWl0dGVyX2RhdGV9IiA+JHtSRVNVTFRTX0NPTU1JVFRFUl9EQVRFX1BBVEh9CgpwaGFzZSAiUmVwb3J0aW5nIHBhcnNlZCByZXZpc2lvbiBTSEEgJyR7cmVzdWx0X3NoYX0nIgpwcmludGYgIiVzIiAiJHtyZXN1bHRfc2hhfSIgPiR7UkVTVUxUU19DT01NSVRfUEFUSH0KCnBoYXNlICJSZXBvcnRpbmcgcmVwb3NpdG9yeSBVUkwgJyR7UEFSQU1TX1VSTH0nIgpwcmludGYgIiVzIiAiJHtQQVJBTVNfVVJMfSIgPiR7UkVTVUxUU19VUkxfUEFUSH0KCmV4aXQgMA==" |base64 -d >report.sh - chmod +x "report.sh" - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: prepare - image: registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:c4b2183f7c7997bd401d86b33eefb637b3ef2fa90618e875106292cd69a15c14 - command: - - /scripts/prepare.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: user-home - mountPath: $(params.USER_HOME) - - - name: git-clone - image: registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:c4b2183f7c7997bd401d86b33eefb637b3ef2fa90618e875106292cd69a15c14 - command: - - /scripts/git-clone.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: user-home - mountPath: $(params.USER_HOME) - - - name: report - image: registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:c4b2183f7c7997bd401d86b33eefb637b3ef2fa90618e875106292cd69a15c14 - command: - - /scripts/report.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts diff --git a/experimental/tasks/task-s2i-dotnet/0.1.1/README.md b/experimental/tasks/task-s2i-dotnet/0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-dotnet/0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-dotnet/0.1.1/task-s2i-dotnet.yaml b/experimental/tasks/task-s2i-dotnet/0.1.1/task-s2i-dotnet.yaml deleted file mode 100644 index cdf1ea73..00000000 --- a/experimental/tasks/task-s2i-dotnet/0.1.1/task-s2i-dotnet.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-dotnet.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's dotnet builder-image - "registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVSfSIgXAogICAgICAgIC0tdGxzLXZlcmlmeT0iJHtQQVJBTVNfVExTX1ZFUklGWX0iIFwKICAgICAgICAkeyp9Cn0KCiMKIyBQcmVwYXJlCiMKCiMgbWFraW5nIHN1cmUgdGhlIHJlcXVpcmVkIHdvcmtzcGFjZSAic291cmNlIiBpcyBib3VuZGVkLCB3aGljaCBtZWFucyBpdHMgdm9sdW1lIGlzIGN1cnJlbnRseSBtb3VudGVkCiMgYW5kIHJlYWR5IHRvIHVzZQpwaGFzZSAiSW5zcGVjdGluZyBzb3VyY2Ugd29ya3NwYWNlICcke1d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T1JZfSIgIiR7UzJJX0JVSUxERVJfSU1BR0V9IiBcCiAgICAgICAgLS1pbWFnZS1zY3JpcHRzLXVybCAiJHtQQVJBTVNfSU1BR0VfU0NSSVBUU19VUkx9IiBcCiAgICAgICAgLS1hcy1kb2NrZXJmaWxlICIke1MySV9DT05UQUlORVJGSUxFX1BBVEh9IiBcCiAgICAgICAgLS1lbnZpcm9ubWVudC1maWxlICIke1MySV9FTlZJUk9OTUVOVF9GSUxFfSIKCnBoYXNlICJJbnNwZWN0aW5nIHRoZSBDb250YWluZXJmaWxlIGdlbmVyYXRlZCBhdCAnJHtTMklfQ09OVEFJTkVSRklMRV9QQVRIfSciCltbICEgLWYgIiR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-dotnet/v0.1.1/README.md b/experimental/tasks/task-s2i-dotnet/v0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-dotnet/v0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-dotnet/v0.1.1/task-s2i-dotnet.yaml b/experimental/tasks/task-s2i-dotnet/v0.1.1/task-s2i-dotnet.yaml deleted file mode 100644 index cdf1ea73..00000000 --- a/experimental/tasks/task-s2i-dotnet/v0.1.1/task-s2i-dotnet.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-dotnet.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-dotnet - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's dotnet builder-image - "registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVSfSIgXAogICAgICAgIC0tdGxzLXZlcmlmeT0iJHtQQVJBTVNfVExTX1ZFUklGWX0iIFwKICAgICAgICAkeyp9Cn0KCiMKIyBQcmVwYXJlCiMKCiMgbWFraW5nIHN1cmUgdGhlIHJlcXVpcmVkIHdvcmtzcGFjZSAic291cmNlIiBpcyBib3VuZGVkLCB3aGljaCBtZWFucyBpdHMgdm9sdW1lIGlzIGN1cnJlbnRseSBtb3VudGVkCiMgYW5kIHJlYWR5IHRvIHVzZQpwaGFzZSAiSW5zcGVjdGluZyBzb3VyY2Ugd29ya3NwYWNlICcke1dPUktTUEFDRVNfU09VUkNFX1BBV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VJfSU1BR0V9IiBcCiAgICAgICAgLS1pbWFnZS1zY3JpcHRzLXVybCAiJHtQQVJBTVNfSU1BR0VfU0NSSVBUU19VUkx9IiBcCiAgICAgICAgLS1hcy1kb2NrZXJmaWxlICIke1MySV9DT05UQUlORVJGSUxFX1BBVEh9IiBcCiAgICAgICAgLS1lbnZpcm9ubWVudC1maWxlICIke1MySV9FTlZJUk9OTUVOVF9GSUxFfSIKCnBoYXNlICJJbnNwZWN0aW5nIHRoZSBDb250YWluZXJmaWxlIGdlbmVyYXRlZCBhdCAnJHtTMklfQ09OVEFJTkVSRklMRV9QQVRIfSciCltbICEgLWYgIiR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-go/0.1.1/README.md b/experimental/tasks/task-s2i-go/0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-go/0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-go/0.1.1/task-s2i-go.yaml b/experimental/tasks/task-s2i-go/0.1.1/task-s2i-go.yaml deleted file mode 100644 index ed586563..00000000 --- a/experimental/tasks/task-s2i-go/0.1.1/task-s2i-go.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-go.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-go - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Golang builder-image - "registry.access.redhat.com/ubi8/go-toolset:1.19.10-3". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVSfSIgXAogICAgICAgIC0tdGxzLXZlcmlmeT0iJHtQQVJBTVNfVExTX1ZFUklGWX0iIFwKICAgICAgICAkeyp9Cn0KCiMKIyBQcmVwYXJlCiMKCiMgbWFraW5nIHN1cmUgdGhlIHJlcXVpcmVkIHdvcmtzcGFjZSAic291cmNlIiBpcyBib3VuZGVkLCB3aGljaCBtZWFucyBpdHMgdm9sdW1lIGlzIGN1cnJlbnRseSBtb3VudGVkCiMgYW5kIHJlYWR5IHRvIHVzZQpwaGFzZSAiSW5zcGVjdGluZyBzb3VyY2Ugd29ya3NwYWNlICcke1dPUktTUEFDRVNfU09VUkNFX1BBVEh9JyAoUFdEPScke1BXRH0nKSIKW1sgIiR7V09SS1NQQUNFU19TT1VSQ0VfQk9VTkR9IiAhPSAid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XSAmJgogICAgZmFpbCAidW5hYmxlIHRvIGZpbmQgdGhlIENvbnRhaW5lcmZpbGUsIENPTlRBSU5FUkZJTEVfUEFUSCBtYXkgaGF2ZSBhbiBpbmNvcnJlY3QgbG9jYXRpb24iCgpleHBvcnRlZF9vcl9mYWlsIFwKICAgIFdPUktTUEFDRVNfU09VUkNFX1BBVEggXAogICAgUEFSQU1TX0lNQUdFCgojCiMgVmVyYm9zZSBPdXRwdXQKIwoKaWYgW1sgIiR7UEFSQU1TX1ZFUkJPU0V9IiA9PSAidHJ1ZSIgXV07IHRoZW4KICAgIHNldCAteApmaQo=" |base64 -d >buildah-common.sh - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9yZXRlZCBvbiB0aGUgZW52aXJvbm1lbnQKZnVuY3Rpb24gZXhwb3J0ZWRfb3JfZmFpbCgpIHsKICAgIGRlY2xhcmUgLWEgX3JlcXVpcmVkX3ZhcnM9IiR7QH0iCgogICAgZm9yIHYgaW4gJHtfcmVxdWlyZWRfdmFyc1tAXX07IGRvCiAgICAgICAgW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh - chmod +x buildah-*.sh - printf '%s' "IyEvd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U0NSSVBUU19VUkx9IiBcCiAgICAgICAgLS1hcy1kb2NrZXJmaWxlICIke1MySV9DT05UQUlORVJGSUxFX1BBVEh9IiBcCiAgICAgICAgLS1lbnZpcm9ubWVudC1maWxlICIke1MySV9FTlZJUk9OTUVOVF9GSUxFfSIKCnBoYXNlICJJbnNwZWN0aW5nIHRoZSBDb250YWluZXJmaWxlIGdlbmVyYXRlZCBhdCAnJHtTMklfQ09OVEFJTkVSRklMRV9QQVRIfSciCltbICEgLWYgIiR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-go/v0.1.1/README.md b/experimental/tasks/task-s2i-go/v0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-go/v0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-go/v0.1.1/task-s2i-go.yaml b/experimental/tasks/task-s2i-go/v0.1.1/task-s2i-go.yaml deleted file mode 100644 index ed586563..00000000 --- a/experimental/tasks/task-s2i-go/v0.1.1/task-s2i-go.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-go.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-go - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Golang builder-image - "registry.access.redhat.com/ubi8/go-toolset:1.19.10-3". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVSfSIgXAogICAgICAgIC0tdGxzLXZlcmlmeT0iJHtQQVJBTVNfVExTX1ZFUklGWX0iIFwKICAgICAgICAkeyp9Cn0KCiMKIyBQcmVwYXJlCiMKCiMgbWFraW5nIHN1cmUgdGhlIHJlcXVpcmVkIHdvcmtzcGFjZSAic291cmNlIiBpcyBib3VuZGVkLCB3aGljaCBtZWFucyBpdHMgdm9sdW1lIGlzIGN1cnJlbnRseSBtb3VudGVkCiMgYW5kIHJlYWR5IHRvIHVzZQpwaGFzZSAiSW5zcGVjdGluZyBzb3VyY2Ugd29ya3NwYWNlICcke1dPUktTUEFDRVNfU09VUkNFX1BBVEh9JyAoUFdEPScke1BXRH0nKSIKW1sgIiR7V09SS1NQQUNFU19TT1VSQ0VfQk9VTkR9IiAhPSAidHJ1ZSIgXV0gJiYKICAgIGZhaWwgIldvcmtzcGFjZSAnc291cmNlJyBpcyBub3QgYm91bmRlZCIK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FX1BBVEh9IiBcCiAgICAgICAgLS1lbnZpcm9ubWVudC1maWxlICIke1MySV9FTlZJUk9OTUVOVF9GSUxFfSIKCnBoYXNlICJJbnNwZWN0aW5nIHRoZSBDb250YWluZXJmaWxlIGdlbmVyYXRlZCBhdCAnJHtTMklfQ09OVEFJTkVSRklMRV9QQVRIfSciCltbICEgLWYgIiR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-java/0.1.1/README.md b/experimental/tasks/task-s2i-java/0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-java/0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-java/0.1.1/task-s2i-java.yaml b/experimental/tasks/task-s2i-java/0.1.1/task-s2i-java.yaml deleted file mode 100644 index 90bc2aa1..00000000 --- a/experimental/tasks/task-s2i-java/0.1.1/task-s2i-java.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-java.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-java - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Java builder-image - "registry.access.redhat.com/ubi8/openjdk-11:latest". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest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sIFwKICAgIFdPUktTUEFDRVNfU09VUkNFX1BBVEggXAogICAgUEFSQU1TX0lNQUdFCgojCiMgVmVyYm9zZSBPdXRwdXQKIwoKaWYgW1sgIiR7UEFSQU1TX1ZFUkJPU0V9IiA9PSAidHJ1ZSIgXV07IHRoZW4KICAgIHNldCAteApmaQo=" |base64 -d >buildah-common.sh - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9yZXRlZCBvbiB0aGUgZW52aXJvbm1lbnQKZnVuY3Rpb24gZXhwb3J0ZWRfb3JfZmFpbCgpIHsKICAgIGRlY2xhcmUgLWEgX3JlcXVpcmVkX3ZhcnM9IiR7QH0iCgogICAgZm9yIHYgaW4gJHtfcmVxdWlyZWRfdmFyc1tAXX07IGRvCiAgICAgICAgW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh - chmod +x buildah-*.sh - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoK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CnBoYXNlICJJbnNwZWN0aW5nIHRoZSBDb250YWluZXJmaWxlIGdlbmVyYXRlZCBhdCAnJHtTMklfQ09OVEFJTkVSRklMRV9QQVRIfSciCltbICEgLWYgIiR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi8/openjdk-11:latest - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-java/v0.1.1/README.md b/experimental/tasks/task-s2i-java/v0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-java/v0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-java/v0.1.1/task-s2i-java.yaml b/experimental/tasks/task-s2i-java/v0.1.1/task-s2i-java.yaml deleted file mode 100644 index 90bc2aa1..00000000 --- a/experimental/tasks/task-s2i-java/v0.1.1/task-s2i-java.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-java.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-java - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Java builder-image - "registry.access.redhat.com/ubi8/openjdk-11:latest". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgIm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FJTkVSRklMRV9QQVRIfSciCltbICEgLWYgIiR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi8/openjdk-11:latest - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-nodejs/0.1.1/README.md b/experimental/tasks/task-s2i-nodejs/0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-nodejs/0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-nodejs/0.1.1/task-s2i-nodejs.yaml b/experimental/tasks/task-s2i-nodejs/0.1.1/task-s2i-nodejs.yaml deleted file mode 100644 index 47a7c371..00000000 --- a/experimental/tasks/task-s2i-nodejs/0.1.1/task-s2i-nodejs.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-nodejs.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-nodejs - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Nodejs builder-image - "registry.access.redhat.com/ubi8/nodejs-18:latest". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRha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9PSAidHJ1ZSIgXV07IHRoZW4KICAgIHNldCAteApmaQo=" |base64 -d >buildah-common.sh - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9yZXRlZCBvbiB0aGUgZW52aXJvbm1lbnQKZnVuY3Rpb24gZXhwb3J0ZWRfb3JfZmFpbCgpIHsKICAgIGRlY2xhcmUgLWEgX3JlcXVpcmVkX3ZhcnM9IiR7QH0iCgogICAgZm9yIHYgaW4gJHtfcmVxdWlyZWRfdmFyc1tAXX07IGRvCiAgICAgICAgW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh - chmod +x buildah-*.sh - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNl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FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi8/nodejs-18:latest - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-nodejs/v0.1.1/README.md b/experimental/tasks/task-s2i-nodejs/v0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-nodejs/v0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-nodejs/v0.1.1/task-s2i-nodejs.yaml b/experimental/tasks/task-s2i-nodejs/v0.1.1/task-s2i-nodejs.yaml deleted file mode 100644 index 47a7c371..00000000 --- a/experimental/tasks/task-s2i-nodejs/v0.1.1/task-s2i-nodejs.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-nodejs.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-nodejs - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Nodejs builder-image - "registry.access.redhat.com/ubi8/nodejs-18:latest". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbG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mF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi8/nodejs-18:latest - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-perl/0.1.1/README.md b/experimental/tasks/task-s2i-perl/0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-perl/0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-perl/0.1.1/task-s2i-perl.yaml b/experimental/tasks/task-s2i-perl/0.1.1/task-s2i-perl.yaml deleted file mode 100644 index c3a3a2ea..00000000 --- a/experimental/tasks/task-s2i-perl/0.1.1/task-s2i-perl.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-perl.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-perl - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Perl builder-image - "registry.access.redhat.com/ubi9/perl-532:1-91". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY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ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi9/perl-532:1-91 - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-perl/v0.1.1/README.md b/experimental/tasks/task-s2i-perl/v0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-perl/v0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-perl/v0.1.1/task-s2i-perl.yaml b/experimental/tasks/task-s2i-perl/v0.1.1/task-s2i-perl.yaml deleted file mode 100644 index c3a3a2ea..00000000 --- a/experimental/tasks/task-s2i-perl/v0.1.1/task-s2i-perl.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-perl.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-perl - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Perl builder-image - "registry.access.redhat.com/ubi9/perl-532:1-91". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQ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BSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi9/perl-532:1-91 - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-php/0.1.1/README.md b/experimental/tasks/task-s2i-php/0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-php/0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-php/0.1.1/task-s2i-php.yaml b/experimental/tasks/task-s2i-php/0.1.1/task-s2i-php.yaml deleted file mode 100644 index 7d7c63e6..00000000 --- a/experimental/tasks/task-s2i-php/0.1.1/task-s2i-php.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-php.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-php - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's php builder-image - "registry.access.redhat.com/ubi9/php-81:1-29". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHs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64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi9/php-81:1-29 - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-php/v0.1.1/README.md b/experimental/tasks/task-s2i-php/v0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-php/v0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-php/v0.1.1/task-s2i-php.yaml b/experimental/tasks/task-s2i-php/v0.1.1/task-s2i-php.yaml deleted file mode 100644 index 7d7c63e6..00000000 --- a/experimental/tasks/task-s2i-php/v0.1.1/task-s2i-php.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-php.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-php - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's php builder-image - "registry.access.redhat.com/ubi9/php-81:1-29". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVS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UlNbQF19IjsgZG8KICAgICAgICBlY2hvICIke2Vudl92YXJ9IiA+PiAiJHtTMklfRU5WSVJPTk1FTlRfRklMRX0iCiAgICBkb25lCmZpCgojCiMgUzJJIEdlbmVyYXRlCiMKCnBoYXNlICJHZW5lcmF0aW5nIHRoZSBDb250YWluZXJmaWxlIGZvciBTMkkgYnVpbGRlciBpbWFnZSAnJHtTMklfQlVJTERFUl9JTUFHRX0nIgpzMmkgLS1sb2dsZXZlbCAiJHtTMklfTE9HTEVWRUx9IiBcCiAgICBidWlsZCAiJHtQQVJBTVNfU1VCRElSRUNUT1JZfSIgIiR7UzJJX0JVSUxERVJfSU1BR0V9IiBcCiAgICAgICAgLS1pbWFnZS1zY3JpcHRzLXVybCAiJHtQQVJBTVNfSU1BR0VfU0NSSVBUU19VUkx9IiBcCiAgICAgICAgLS1hcy1kb2NrZXJmaWxlICIke1MySV9DT05UQUlORVJGSUxFX1BBVEh9IiBcCiAgICAgICAgLS1lbnZpcm9ubWVudC1maWxlICIke1MySV9FTlZJUk9OTUVOVF9GSUxFfSIKCnBoYXNlICJJbnNwZWN0aW5nIHRoZSBDb250YWluZXJmaWxlIGdlbmVyYXRlZCBhdCAnJHtTMklfQ09OVEFJTkVSRklMRV9QQVRIfSciCltbICEgLWYgIiR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi9/php-81:1-29 - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-python/0.1.1/README.md b/experimental/tasks/task-s2i-python/0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-python/0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-python/0.1.1/task-s2i-python.yaml b/experimental/tasks/task-s2i-python/0.1.1/task-s2i-python.yaml deleted file mode 100644 index 2b1584e1..00000000 --- a/experimental/tasks/task-s2i-python/0.1.1/task-s2i-python.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-python.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-python - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Python builder-image - "registry.access.redhat.com/ubi8/python-39:latest". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVSfSIgXAogICAgICAgIC0tdGxzLXZlcmlmeT0iJHtQQVJBTVNfVExTX1ZFUklGWX0iIFwKICAgICAgICAkeyp9Cn0KCiMKIy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QKZnVuY3Rpb24gZXhwb3J0ZWRfb3JfZmFpbCgpIHsKICAgIGRlY2xhcmUgLWEgX3JlcXVpcmVkX3ZhcnM9IiR7QH0iCgogICAgZm9yIHYgaW4gJHtfcmVxdWlyZWRfdmFyc1tAXX07IGRvCiAgICAgICAgW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh - chmod +x buildah-*.sh - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9yZXRlZCBvbiB0aGUgZW52aXJvbm1lbnQKZnVuY3Rpb24gZXhwb3J0ZWRfb3JfZmFpbCgpIHsKICAgIGRlY2xhcmUgLWEgX3JlcXVpcmVkX3ZhcnM9IiR7QH0iCgogICAgZm9yIHYgaW4gJHtfcmVxdWlyZWRfdmFyc1tAXX07IGRvCiAgICAgICAgW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgVXNlcyB0aGUgQ29udGlh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25lCmZpCgojCiMgUzJJIEdlbmVyYXRlCiMKCnBoYXNlICJHZW5lcmF0aW5nIHRoZSBDb250YWluZXJmaWxlIGZvciBTMkkgYnVpbGRlciBpbWFnZSAnJHtTMklfQlVJTERFUl9JTUFHRX0nIgpzMmkgLS1sb2dsZXZlbCAiJHtTMklfTE9HTEVWRUx9IiBcCiAgICBidWlsZCAiJHtQQVJBTVNfU1VCRElSRUNUT1JZfSIgIiR7UzJJX0JVSUxERVJfSU1BR0V9IiBcCiAgICAgICAgLS1pbWFnZS1zY3JpcHRzLXVybCAiJHtQQVJBTVNfSU1BR0VfU0NSSVBUU19VUkx9IiBcCiAgICAgICAgLS1hcy1kb2NrZXJmaWxlICIke1MySV9DT05UQUlORVJGSUxFX1BBVEh9IiBcCiAgICAgICAgLS1lbnZpcm9ubWVudC1maWxlICIke1MySV9FTlZJUk9OTUVOVF9GSUxFfSIKCnBoYXNlICJJbnNwZWN0aW5nIHRoZSBDb250YWluZXJmaWxlIGdlbmVyYXRlZCBhdCAnJHtTMklfQ09OVEFJTkVSRklMRV9QQVRIfSciCltbICEgLWYgIiR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi8/python-39:latest - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-python/v0.1.1/README.md b/experimental/tasks/task-s2i-python/v0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-python/v0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-python/v0.1.1/task-s2i-python.yaml b/experimental/tasks/task-s2i-python/v0.1.1/task-s2i-python.yaml deleted file mode 100644 index 2b1584e1..00000000 --- a/experimental/tasks/task-s2i-python/v0.1.1/task-s2i-python.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-python.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-python - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Python builder-image - "registry.access.redhat.com/ubi8/python-39:latest". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVSfSIgXAogICAgICAgIC0tdGxzLXZlcmlmeT0iJHtQQVJBTVNfVExTX1ZFUklGWX0iIFwKICAgICAgICAkeyp9Cn0KCiMKIyBQcmVwYXJlCiMKCiMgbWFraW5nIHN1cmUgdGhlIHJlcXVpcmVkIHdvcmtzcGFjZSAic291cmNlIiBpcyBib3VuZGV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iR7QH0iCgogICAgZm9yIHYgaW4gJHtfcmVxdWlyZWRfdmFyc1tAXX07IGRvCiAgICAgICAgW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh - chmod +x buildah-*.sh - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9yZXRlZCBvbiB0aGUgZW52aXJvbm1lbnQKZnVuY3Rpb24gZXhwb3J0ZWRfb3JfZmFpbCgpIHsKICAgIGRlY2xhcmUgLWEgX3JlcXVpcmVkX3ZhcnM9IiR7QH0iCgogICAgZm9yIHYgaW4gJHtfcmVxdWlyZWRfdmFyc1tAXX07IGRvCiAgICAgICAgW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgVXNlcyB0aGUgQ29udGlhbmVyZmlsZSBnZW5lcmF0ZWQgYnkgczJpIHRvIGFzc2VtYmxlIGEgbmV3IGNvbnRhaW5lciBpbWFnZSB1c2luZy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MkkgYnVpbGRlciBpbWFnZSAnJHtTMklfQlVJTERFUl9JTUFHRX0nIgpzMmkgLS1sb2dsZXZlbCAiJHtTMklfTE9HTEVWRUx9IiBcCiAgICBidWlsZCAiJHtQQVJBTVNfU1VCRElSRUNUT1JZfSIgIiR7UzJJX0JVSUxERVJfSU1BR0V9IiBcCiAgICAgICAgLS1pbWFnZS1zY3JpcHRzLXVybCAiJHtQQVJBTVNfSU1BR0VfU0NSSVBUU19VUkx9IiBcCiAgICAgICAgLS1hcy1kb2NrZXJmaWxlICIke1MySV9DT05UQUlORVJGSUxFX1BBVEh9IiBcCiAgICAgICAgLS1lbnZpcm9ubWVudC1maWxlICIke1MySV9FTlZJUk9OTUVOVF9GSUxFfSIKCnBoYXNlICJJbnNwZWN0aW5nIHRoZSBDb250YWluZXJmaWxlIGdlbmVyYXRlZCBhdCAnJHtTMklfQ09OVEFJTkVSRklMRV9QQVRIfSciCltbICEgLWYgIiR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi8/python-39:latest - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-ruby/0.1.1/README.md b/experimental/tasks/task-s2i-ruby/0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-ruby/0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-ruby/0.1.1/task-s2i-ruby.yaml b/experimental/tasks/task-s2i-ruby/0.1.1/task-s2i-ruby.yaml deleted file mode 100644 index 3951213b..00000000 --- a/experimental/tasks/task-s2i-ruby/0.1.1/task-s2i-ruby.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-ruby.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-ruby - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Ruby builder-image - "registry.access.redhat.com/ubi9/ruby-31:1-50". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVSfSIgXAogICAgICAgIC0tdGxzLXZlcmlmeT0iJHtQQVJBTVNfVExTX1ZFUklGWX0iIFwKICAgICAgICAkeyp9Cn0KCiMKIyBQcmVwYXJlCiMKCiMgbWFraW5nIHN1cmUgdGhlIHJlcXVpcmVkIHdvcmtzcGFjZSAic291cmNlIiBpcyBib3VuZGVkLCB3aGljaCBtZWFucyBpdHMgdm9sdW1lIGlzIGN1cnJlbnRseSBtb3VudGVkCiMgYW5k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gW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh - chmod +x buildah-*.sh - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9yZXRlZCBvbiB0aGUgZW52aXJvbm1lbnQKZnVuY3Rpb24gZXhwb3J0ZWRfb3JfZmFpbCgpIHsKICAgIGRlY2xhcmUgLWEgX3JlcXVpcmVkX3ZhcnM9IiR7QH0iCgogICAgZm9yIHYgaW4gJHtfcmVxdWlyZWRfdmFyc1tAXX07IGRvCiAgICAgICAgW1sgLXogIiR7IXZ9IiBdXSAmJgogICAgICAgICAgICBmYWlsICInJHt2fScgZW52aXJvbm1lbnQgdmFyaWFibGUgaXMgbm90IHNldCEiCiAgICBkb25lCgogICAgcmV0dXJuIDAKfQo=" |base64 -d >common.sh - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgVXNlcyB0aGUgQ29udGlhbmVyZmlsZSBnZW5lcmF0ZWQgYnkgczJpIHRvIGFzc2VtYmxlIGEgbmV3IGNvbnRhaW5lciBpbWFnZSB1c2luZyBidWlsZGFoLgojCgpzaG9wdCAtcyBpbmhlcml0X2VycmV4aXQKc2V0IC1ldSAtbyBwaXB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ZXZlbCAiJHtTMklfTE9HTEVWRUx9IiBcCiAgICBidWlsZCAiJHtQQVJBTVNfU1VCRElSRUNUT1JZfSIgIiR7UzJJX0JVSUxERVJfSU1BR0V9IiBcCiAgICAgICAgLS1pbWFnZS1zY3JpcHRzLXVybCAiJHtQQVJBTVNfSU1BR0VfU0NSSVBUU19VUkx9IiBcCiAgICAgICAgLS1hcy1kb2NrZXJmaWxlICIke1MySV9DT05UQUlORVJGSUxFX1BBVEh9IiBcCiAgICAgICAgLS1lbnZpcm9ubWVudC1maWxlICIke1MySV9FTlZJUk9OTUVOVF9GSUxFfSIKCnBoYXNlICJJbnNwZWN0aW5nIHRoZSBDb250YWluZXJmaWxlIGdlbmVyYXRlZCBhdCAnJHtTMklfQ09OVEFJTkVSRklMRV9QQVRIfSciCltbICEgLWYgIiR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi9/ruby-31:1-50 - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-s2i-ruby/v0.1.1/README.md b/experimental/tasks/task-s2i-ruby/v0.1.1/README.md deleted file mode 100644 index b86765b3..00000000 --- a/experimental/tasks/task-s2i-ruby/v0.1.1/README.md +++ /dev/null @@ -1,83 +0,0 @@ -Source-to-Image Tekton Tasks (`s2i`) ------------------------------------- - -# Abstract - -Describes the Tekton Tasks supporting Source-to-Image for various ecosystems. - -# `s2i` Builder Images - -This section we explain each language ecosystem comes with a predefined set of builder images, supported by Red Hat. - -The `s2i` Task helps in building reproducible container images from source code i.e. task for supporting s2i functionality. - -The s2i Task has been customized with builder images specific to various languages and have been named appropriately as follows: - -| Task Name | Builder Image Used | -| ---------- | ---------------------------------------------------------------------- | -| s2i-python | http://registry.access.redhat.com/ubi8/python-39:latest | -| s2i-go | http://registry.access.redhat.com/ubi8/go-toolset:1.19.10-3 | -| s2i-java | http://registry.access.redhat.com/ubi8/openjdk-11:latest | -| s2i-dotnet | http://registry.access.redhat.com/ubi8/dotnet-60:6.0-37.20230802191230 | -| s2i-php | http://registry.access.redhat.com/ubi9/php-81:1-29 | -| s2i-nodejs | http://registry.access.redhat.com/ubi8/nodejs-18:latest | -| s2i-perl | http://registry.access.redhat.com/ubi9/perl-532:1-91 | -| s2i-ruby | http://registry.access.redhat.com/ubi9/ruby-31:1-50 | - -In case, the above builder images associated with the languages aren’t satisfactory for your source code, you can change it using appropriate parameter. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: s2i-python - params: - - name: IMAGE - value: registry.registry.svc.cluster.local:32222/task-containers/task-s2i-python:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Workspaces - -All of the s2i tasks use the `source` workspace which is meant to contain the Application source code, which acts as the build context for S2I workflow. - - -## Params - -| Param | Type | Default | Description | -| ----------------- | ------ | ------------------------ | ------------------------------------------------------------------------- | -| IMAGE | string | (required) | Fully qualified container image name to be built by s2i | -| IMAGE_SCRIPTS_URL | string | image:///usr/libexec/s2i | URL containing the default assemble and run scripts for the builder image | -| ENV_VARS | array | [] | Array containing string of Environment Variables as "KEY=VALUE” | -| SUBDIRECTORY | string | . | Relative subdirectory to the source Workspace for the build-context. | -| STORAGE_DRIVER | string | overlay | Set buildah storage driver to reflect the currrent cluster node's | -| settings. | -| BUILD_EXTRA_ARGS | string | | Extra parameters passed for the build command when building images. | -| PUSH_EXTRA_ARGS | string | | Extra parameters passed for the push command when pushing images. | -| SKIP_PUSH | string | false | Skip pushing the image to the container registry. | -| TLS_VERIFY | string | true | Sets the TLS verification flag, true is recommended. | -| VERBOSE | string | false | Turns on verbose logging, all commands executed will be printed out. | - -## Results - -| Result | Description | -| ------------ | ------------------------------- | -| IMAGE_URL | Fully qualified image name. | -| IMAGE_DIGEST | Digest of the image just built. | diff --git a/experimental/tasks/task-s2i-ruby/v0.1.1/task-s2i-ruby.yaml b/experimental/tasks/task-s2i-ruby/v0.1.1/task-s2i-ruby.yaml deleted file mode 100644 index 3951213b..00000000 --- a/experimental/tasks/task-s2i-ruby/v0.1.1/task-s2i-ruby.yaml +++ /dev/null @@ -1,168 +0,0 @@ ---- -# Source: task-containers/templates/task-s2i-ruby.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: s2i-ruby - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Builds the source code using the s2i's Ruby builder-image - "registry.access.redhat.com/ubi9/ruby-31:1-50". - - - workspaces: - - name: source - optional: false - description: | - Application source code, the build context for S2I workflow. - - params: - - name: IMAGE - type: string - description: | - Fully qualified container image name to be built by s2i. - - name: IMAGE_SCRIPTS_URL - type: string - default: image:///usr/libexec/s2i - description: | - Specify a URL containing the default assemble and run scripts for the builder image - - name: ENV_VARS - type: array - default: [] - description: | - Array containing string of Environment Variables as "KEY=VALUE" - - name: SUBDIRECTORY - type: string - default: "." - description: | - Relative subdirectory to the `source` Workspace for the build-context. - - name: STORAGE_DRIVER - type: string - default: overlay - description: | - Set buildah storage driver to reflect the currrent cluster node's - settings. - - name: BUILD_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the build command when building images. - - name: PUSH_EXTRA_ARGS - type: string - default: "" - description: | - Extra parameters passed for the push command when pushing images. - - name: SKIP_PUSH - default: "false" - description: | - Skip pushing the image to the container registry. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flag, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Turns on verbose logging, all commands executed will be printed out. - - results: - - name: IMAGE_URL - description: | - Fully qualified image name. - - name: IMAGE_DIGEST - description: | - Digest of the image just built. - - stepTemplate: - env: - - - name: PARAMS_IMAGE - value: "$(params.IMAGE)" - - name: PARAMS_IMAGE_SCRIPTS_URL - value: "$(params.IMAGE_SCRIPTS_URL)" - - name: PARAMS_SUBDIRECTORY - value: "$(params.SUBDIRECTORY)" - - name: PARAMS_STORAGE_DRIVER - value: "$(params.STORAGE_DRIVER)" - - name: PARAMS_BUILD_EXTRA_ARGS - value: "$(params.BUILD_EXTRA_ARGS)" - - name: PARAMS_PUSH_EXTRA_ARGS - value: "$(params.PUSH_EXTRA_ARGS)" - - name: PARAMS_SKIP_PUSH - value: "$(params.SKIP_PUSH)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: WORKSPACES_SOURCE_BOUND - value: "$(workspaces.source.bound)" - - name: WORKSPACES_SOURCE_PATH - value: "$(workspaces.source.path)" - - name: RESULTS_IMAGE_URL_PATH - value: "$(results.IMAGE_URL.path)" - - name: RESULTS_IMAGE_DIGEST_PATH - value: "$(results.IMAGE_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAojCiMgV3JhcHBlciBhcm91bmQgImJ1aWxkYWggYnVkIiB0byBidWlsZCBhbmQgcHVzaCBhIGNvbnRhaW5lciBpbWFnZSBiYXNlZCBvbiBhIENvbnRhaW5lcmZpbGUuCiMKCnNob3B0IC1zIGluaGVyaXRfZXJyZXhpdApzZXQgLWV1IC1vIHBpcGVmYWlsCgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvY29tbW9uLnNoIgpzb3VyY2UgIiQoZGlybmFtZSAke0JBU0hfU09VUkNFWzBdfSkvYnVpbGRhaC1jb21tb24uc2giCgpmdW5jdGlvbiBfYnVpbGRhaCgpIHsKICAgIGJ1aWxkYWggXAogICAgICAgIC0tc3RvcmFnZS1kcml2ZXI9IiR7UEFSQU1TX1NUT1JBR0VfRFJJVkVSfSIgXAogICAgICAgIC0tdGxzLXZlcmlmeT0iJHtQQVJBTVNfVExTX1ZFUklGWX0iIFwKICAgICAgICAkeyp9Cn0KCiMKIyBQcmVwYXJlCiMKCiMgbWFraW5nIHN1cmUgdGhlIHJlcXVpcmVkIHdvcmtzcGFjZSAic291cmNlIiBpcyBib3VuZGVkLCB3aGljaCBtZWFucyBpdHMgdm9sdW1lIGlzIGN1cnJlbnRseSBtb3VudGVkCiMgYW5kIHJlYWR5IHRvIHVzZQpwaGFzZSAiSW5zcGVjdGluZyBzb3VyY2Ugd29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NfU1VCRElSRUNUT1JZfSIgIiR7UzJJX0JVSUxERVJfSU1BR0V9IiBcCiAgICAgICAgLS1pbWFnZS1zY3JpcHRzLXVybCAiJHtQQVJBTVNfSU1BR0VfU0NSSVBUU19VUkx9IiBcCiAgICAgICAgLS1hcy1kb2NrZXJmaWxlICIke1MySV9DT05UQUlORVJGSUxFX1BBVEh9IiBcCiAgICAgICAgLS1lbnZpcm9ubWVudC1maWxlICIke1MySV9FTlZJUk9OTUVOVF9GSUxFfSIKCnBoYXNlICJJbnNwZWN0aW5nIHRoZSBDb250YWluZXJmaWxlIGdlbmVyYXRlZCBhdCAnJHtTMklfQ09OVEFJTkVSRklMRV9QQVRIfSciCltbICEgLWYgIiR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0iIF1dICYmCiAgICBmYWlsICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBpcyBub3QgZm91bmQhIgoKc2V0ICt4CnBoYXNlICJHZW5lcmF0ZWQgQ29udGFpbmVyZmlsZSBwYXlsb2FkIgplY2hvIC1lbiAiPj4+ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH1cbiQoY2F0ICR7UzJJX0NPTlRBSU5FUkZJTEVfUEFUSH0pXG48PDwgRU9GXG4iCg==" |base64 -d >s2i-generate.sh - chmod +x s2i-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: s2i-generate - image: quay.io/openshift-pipeline/s2i:nightly - workingDir: $(workspaces.source.path) - env: - - name: S2I_BUILDER_IMAGE - value: registry.access.redhat.com/ubi9/ruby-31:1-50 - command: - - /scripts/s2i-generate.sh - args: - - "$(params.ENV_VARS[*])" - securityContext: - runAsUser: 0 - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - - name: s2i-build - image: registry.access.redhat.com/ubi8/buildah:latest - workingDir: /s2i-generate - command: - - /scripts/s2i-build.sh - securityContext: - privileged: true - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - name: s2i-generate-dir - mountPath: /s2i-generate - - volumes: - - name: scripts-dir - emptyDir: {} - - name: s2i-generate-dir - emptyDir: {} diff --git a/experimental/tasks/task-skopeo-copy/0.1.1/README.md b/experimental/tasks/task-skopeo-copy/0.1.1/README.md deleted file mode 100644 index ee6fa59d..00000000 --- a/experimental/tasks/task-skopeo-copy/0.1.1/README.md +++ /dev/null @@ -1,59 +0,0 @@ -Containers Tekton Tasks ------------------------ - -# Abstract - -Describes the Tekton Tasks supporting Skopeo-Copy - -# `skopeo-copy` Tekton Task - -The `skopeo-copy` Task is meant to replicate a container image from the `SOURCE` registry to the `DESTINATION` using [Skopeo][containersSkopeo], the Task results contain the SHA256 digests. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: skopeo-copy - params: - - name: SOURCE - value: docker://docker.io/busybox:latest - - name: DESTINATION - value: docker://image-registry.openshift-image-registry.svc:5000/task-containers/busybox:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Params - -| Param | Type | Default | Description | -| :------------ | :------------------------: | :--------------------------- | :------------------------- | -| `SOURCE` | `string` | (required) | Fully qualified source container image name, including tag, to be copied into `DESTINATION` param. | -| `DESTINATION` | `string` | (required) | Fully qualified destination container image name, including tag. | -| `TLS_VERIFY` | `string` | `true` | Sets the TLS verification flags, `true` is recommended. | -| `VERBOSE` | `string` | `false` | Shows a more verbose (debug) output. | - -## Results - -| Result | Description | -| :------------ | :------------------------- | -| `SOURCE_DIGEST` | Source image SHA256 digest. | -| `DESTINATION_DIGEST` | Destination image SHA256 digest. | - -[tektonPipelineAuth]: https://tekton.dev/docs/pipelines/auth/#configuring-docker-authentication-for-docker -[containersSkopeo]: https://github.com/containers/skopeo diff --git a/experimental/tasks/task-skopeo-copy/0.1.1/task-skopeo-copy.yaml b/experimental/tasks/task-skopeo-copy/0.1.1/task-skopeo-copy.yaml deleted file mode 100644 index 811da413..00000000 --- a/experimental/tasks/task-skopeo-copy/0.1.1/task-skopeo-copy.yaml +++ /dev/null @@ -1,99 +0,0 @@ ---- -# Source: task-containers/templates/task-skopeo-copy.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: skopeo-copy - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Uses `skopeo copy` to replicate the `SOURCE` (param) container image into - `DESTINATION`. After copying the source and destination images SHA256 digest - is stored as results. - - params: - - name: SOURCE - type: string - description: | - Fully qualified source container image name, including tag, to be copied - into `DESTINATION` param. - - name: DESTINATION - type: string - description: | - Fully qualified destination container image name, including tag. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flags, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Shows a more verbose (debug) output. - - results: - - name: SOURCE_DIGEST - type: string - description: | - Source image SHA256 digest. - - name: DESTINATION_DIGEST - type: string - description: | - Destination image SHA256 digest. - - volumes: - - name: scripts-dir - emptyDir: {} - - stepTemplate: - env: - - - name: PARAMS_SOURCE - value: "$(params.SOURCE)" - - name: PARAMS_DESTINATION - value: "$(params.DESTINATION)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: RESULTS_SOURCE_DIGEST_PATH - value: "$(results.SOURCE_DIGEST.path)" - - name: RESULTS_DESTINATION_DIGEST_PATH - value: "$(results.DESTINATION_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:lat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lnZXN0ICcke3NvdXJjZV9kaWdlc3R9JyIKCnBoYXNlICJFeHRyYWN0aW5nICcke1BBUkFNU19ERVNUSU5BVElPTn0nIGRlc3RpbmF0aW9uIGltYWdlIGRpZ2VzdCIKZGVzdGluYXRpb25fZGlnZXN0PSIkKHNrb3Blb19pbnNwZWN0ICR7UEFSQU1TX0RFU1RJTkFUSU9OfSkiCnBoYXNlICJEZXN0aW5hdGlvbiBpbWFnZSBkaWdlc3QgJyR7ZGVzdGluYXRpb25fZGlnZXN0fSciCgpwcmludGYgIiVzIiAke3NvdXJjZV9kaWdlc3R9ID4ke1JFU1VMVFNfU09VUkNFX0RJR0VTVF9QQVRIfQpwcmludGYgIiVzIiAke2Rlc3RpbmF0aW9uX2RpZ2VzdH0gPiR7UkVTVUxUU19ERVNUSU5BVElPTl9ESUdFU1RfUEFUSH0K" |base64 -d >skopeo-results.sh - chmod +x skopeo-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: skopeo-copy - image: quay.io/skopeo/stable:latest - command: - - /scripts/skopeo-copy.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: skopeo-results - image: quay.io/skopeo/stable:latest - command: - - /scripts/skopeo-results.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts diff --git a/experimental/tasks/task-skopeo-copy/v0.1.1/README.md b/experimental/tasks/task-skopeo-copy/v0.1.1/README.md deleted file mode 100644 index ee6fa59d..00000000 --- a/experimental/tasks/task-skopeo-copy/v0.1.1/README.md +++ /dev/null @@ -1,59 +0,0 @@ -Containers Tekton Tasks ------------------------ - -# Abstract - -Describes the Tekton Tasks supporting Skopeo-Copy - -# `skopeo-copy` Tekton Task - -The `skopeo-copy` Task is meant to replicate a container image from the `SOURCE` registry to the `DESTINATION` using [Skopeo][containersSkopeo], the Task results contain the SHA256 digests. - -# Usage - -Please, consider the usage example below: - -```yaml ---- -apiVersion: tekton.dev/v1beta1 -kind: TaskRun -metadata: {} -spec: - taskRef: - name: skopeo-copy - params: - - name: SOURCE - value: docker://docker.io/busybox:latest - - name: DESTINATION - value: docker://image-registry.openshift-image-registry.svc:5000/task-containers/busybox:latest -``` - -In case the Container Registry requires authentication, please consider the [Tekton Pipelines documentation][tektonPipelineAuth]. In a nutshell, you need to create a Kubernetes Secret describing the following attributes: - -```bash -kubectl create secret docker-registry imagestreams \ - --docker-server="image-registry.openshift-image-registry.svc:5000" \ - --docker-username="${REGISTRY_USERNAME}" \ - --docker-password="${REGISTRY_TOKEN}" -``` - -Then make sure the Secret is linked with the Service-Account running the `TaskRun`/`PipelineRun`. - -## Params - -| Param | Type | Default | Description | -| :------------ | :------------------------: | :--------------------------- | :------------------------- | -| `SOURCE` | `string` | (required) | Fully qualified source container image name, including tag, to be copied into `DESTINATION` param. | -| `DESTINATION` | `string` | (required) | Fully qualified destination container image name, including tag. | -| `TLS_VERIFY` | `string` | `true` | Sets the TLS verification flags, `true` is recommended. | -| `VERBOSE` | `string` | `false` | Shows a more verbose (debug) output. | - -## Results - -| Result | Description | -| :------------ | :------------------------- | -| `SOURCE_DIGEST` | Source image SHA256 digest. | -| `DESTINATION_DIGEST` | Destination image SHA256 digest. | - -[tektonPipelineAuth]: https://tekton.dev/docs/pipelines/auth/#configuring-docker-authentication-for-docker -[containersSkopeo]: https://github.com/containers/skopeo diff --git a/experimental/tasks/task-skopeo-copy/v0.1.1/task-skopeo-copy.yaml b/experimental/tasks/task-skopeo-copy/v0.1.1/task-skopeo-copy.yaml deleted file mode 100644 index 811da413..00000000 --- a/experimental/tasks/task-skopeo-copy/v0.1.1/task-skopeo-copy.yaml +++ /dev/null @@ -1,99 +0,0 @@ ---- -# Source: task-containers/templates/task-skopeo-copy.yaml -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: skopeo-copy - labels: - app.kubernetes.io/version: 0.1.1 - annotations: - tekton.dev/categories: containers - tekton.dev/pipelines.minVersion: 0.38.0 - tekton.dev/tags: containers -spec: - description: | - Uses `skopeo copy` to replicate the `SOURCE` (param) container image into - `DESTINATION`. After copying the source and destination images SHA256 digest - is stored as results. - - params: - - name: SOURCE - type: string - description: | - Fully qualified source container image name, including tag, to be copied - into `DESTINATION` param. - - name: DESTINATION - type: string - description: | - Fully qualified destination container image name, including tag. - - name: TLS_VERIFY - type: string - default: "true" - description: | - Sets the TLS verification flags, `true` is recommended. - - name: VERBOSE - type: string - default: "false" - description: | - Shows a more verbose (debug) output. - - results: - - name: SOURCE_DIGEST - type: string - description: | - Source image SHA256 digest. - - name: DESTINATION_DIGEST - type: string - description: | - Destination image SHA256 digest. - - volumes: - - name: scripts-dir - emptyDir: {} - - stepTemplate: - env: - - - name: PARAMS_SOURCE - value: "$(params.SOURCE)" - - name: PARAMS_DESTINATION - value: "$(params.DESTINATION)" - - name: PARAMS_TLS_VERIFY - value: "$(params.TLS_VERIFY)" - - name: PARAMS_VERBOSE - value: "$(params.VERBOSE)" - - name: RESULTS_SOURCE_DIGEST_PATH - value: "$(results.SOURCE_DIGEST.path)" - - name: RESULTS_DESTINATION_DIGEST_PATH - value: "$(results.DESTINATION_DIGEST.path)" - - steps: - - name: load-scripts - image: docker.io/library/bash:latest - workingDir: /scripts - script: | - set -e - printf '%s' "IyEvdXNyL2Jpbi9lbnYgYmFzaAoKIyB0ZWt0b24ncyBob21lIGRpcmVjdG9yeQpkZWNsYXJlIC1yeCBURUtUT05fSE9NRT0iJHtURUtUT05fSE9NRTotL3Rla3Rvbi9ob21lfSIKCiMKIyBGdW5jdGlvbnMKIwoKZnVuY3Rpb24gZmFpbCgpIHsKICAgIGVjaG8gIkVSUk9SOiAkeyp9IiAyPiYxCiAgICBleGl0IDEKfQoKZnVuY3Rpb24gcGhhc2UoKSB7CiAgICBlY2hvICItLS0+IFBoYXNlOiAkeyp9Li4uIgp9CgojIGFzc2VydCBsb2NhbCB2YXJpYWJsZXMgYXJlIGV4cG9yZXRlZCBvbiB0aGUgZW52aXJvbm1lbnQKZnVuY3Rpb24gZXhwb3J0ZWRfb3JfZmFpbCgpIHs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|base64 -d >skopeo-results.sh - chmod +x skopeo-*.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: skopeo-copy - image: quay.io/skopeo/stable:latest - command: - - /scripts/skopeo-copy.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts - - - name: skopeo-results - image: quay.io/skopeo/stable:latest - command: - - /scripts/skopeo-results.sh - volumeMounts: - - name: scripts-dir - mountPath: /scripts