diff --git a/README.md b/README.md index 6d8efd2..e5dd5e4 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ First create secrets manually for your private registries (pull and push images) and for the Tekton Trigger webhook. ## Private Registry Secret + For example, for your private registries. In this case we am pushing to `quay.io` and also pulling from `registry.redhat.io`. ```yaml apiVersion: v1 @@ -22,7 +23,16 @@ Then you need to link the secret `pull-and-push` to the `pipeline` SA so it can oc secret link pipeline pull-and-push --for=pull,mount ``` +## Install Tekton Hub ansible-builder task + +Go to [Tekton Hub](https://hub.tekton.dev/tekton/task/ansible-builder) and install the `ansible-builder` task. + +```bash +kubectl -n apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/ansible-builder/0.1/ansible-builder.yaml +``` + ## Webhook Secret Token + And for the webhook secret token: ```yaml apiVersion: v1 diff --git a/listener/3-pipeline-ansible-builder.yaml b/listener/2-pipeline-ansible-builder.yaml similarity index 100% rename from listener/3-pipeline-ansible-builder.yaml rename to listener/2-pipeline-ansible-builder.yaml diff --git a/listener/2-task-ansible-builder-create.yaml b/listener/2-task-ansible-builder-create.yaml deleted file mode 100644 index faa3a1a..0000000 --- a/listener/2-task-ansible-builder-create.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: ansible-builder - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.12.0" - tekton.dev/displayName: ansible-builder - tekton.dev/categories: Build Tools - tekton.dev/tags: ansible, ansible-builder, build-tool, automation - tekton.dev/platforms: "linux/amd64" -spec: - description: >- - Creates a build context (including a Containerfile) from an execution environment spec. - This build context is populated with dependencies including requirements files. - workspaces: - - name: source - description: The source workspace where the execution environment code is cloned. - params: - - description: Execution environment file definition. - name: FILENAME - type: string - default: execution-environment.yml - - description: Execution environment build context. - name: BUILD_CONTEXT - type: string - default: context - - name: OUTPUT_FILENAME - description: Name of file to write image definition to. Either Dockerfile or Containerfile. - type: string - default: Containerfile - - description: ansible-builder output verbosity. - name: VERBOSITY - type: string - default: "2" - - name: BUILDER_IMAGE - description: The location of the ansible-builder image. - type: string - default: quay.io/ansible/ansible-builder:latest - steps: - - - name: ansible-builder-create - workingDir: $(workspaces.source.path) - image: $(params.BUILDER_IMAGE) - script: | - #!/bin/sh - set -eux -o - - ansible-builder create -f "$(params.FILENAME)" -c "$(params.BUILD_CONTEXT)" --output-filename "$(params.OUTPUT_FILENAME)" -v "$(params.VERBOSITY)" \ No newline at end of file diff --git a/listener/4-trigger-binding.yaml b/listener/3-trigger-binding.yaml similarity index 100% rename from listener/4-trigger-binding.yaml rename to listener/3-trigger-binding.yaml diff --git a/listener/5-trigger-template.yaml b/listener/4-trigger-template.yaml similarity index 100% rename from listener/5-trigger-template.yaml rename to listener/4-trigger-template.yaml diff --git a/listener/6-trigger.yaml b/listener/5-trigger.yaml similarity index 100% rename from listener/6-trigger.yaml rename to listener/5-trigger.yaml diff --git a/listener/7-event-listener.yaml b/listener/6-event-listener.yaml similarity index 100% rename from listener/7-event-listener.yaml rename to listener/6-event-listener.yaml diff --git a/listener/8-el-route.yaml b/listener/7-el-route.yaml similarity index 100% rename from listener/8-el-route.yaml rename to listener/7-el-route.yaml diff --git a/pipeline/2-pipeline-ansible-builder.yaml b/pipeline/1-pipeline-ansible-builder.yaml similarity index 100% rename from pipeline/2-pipeline-ansible-builder.yaml rename to pipeline/1-pipeline-ansible-builder.yaml diff --git a/pipeline/1-task-ansible-builder-create.yaml b/pipeline/1-task-ansible-builder-create.yaml deleted file mode 100644 index faa3a1a..0000000 --- a/pipeline/1-task-ansible-builder-create.yaml +++ /dev/null @@ -1,50 +0,0 @@ -apiVersion: tekton.dev/v1beta1 -kind: Task -metadata: - name: ansible-builder - labels: - app.kubernetes.io/version: "0.1" - annotations: - tekton.dev/pipelines.minVersion: "0.12.0" - tekton.dev/displayName: ansible-builder - tekton.dev/categories: Build Tools - tekton.dev/tags: ansible, ansible-builder, build-tool, automation - tekton.dev/platforms: "linux/amd64" -spec: - description: >- - Creates a build context (including a Containerfile) from an execution environment spec. - This build context is populated with dependencies including requirements files. - workspaces: - - name: source - description: The source workspace where the execution environment code is cloned. - params: - - description: Execution environment file definition. - name: FILENAME - type: string - default: execution-environment.yml - - description: Execution environment build context. - name: BUILD_CONTEXT - type: string - default: context - - name: OUTPUT_FILENAME - description: Name of file to write image definition to. Either Dockerfile or Containerfile. - type: string - default: Containerfile - - description: ansible-builder output verbosity. - name: VERBOSITY - type: string - default: "2" - - name: BUILDER_IMAGE - description: The location of the ansible-builder image. - type: string - default: quay.io/ansible/ansible-builder:latest - steps: - - - name: ansible-builder-create - workingDir: $(workspaces.source.path) - image: $(params.BUILDER_IMAGE) - script: | - #!/bin/sh - set -eux -o - - ansible-builder create -f "$(params.FILENAME)" -c "$(params.BUILD_CONTEXT)" --output-filename "$(params.OUTPUT_FILENAME)" -v "$(params.VERBOSITY)" \ No newline at end of file diff --git a/pipeline/3-pipelinerun.yaml b/pipeline/2-pipelinerun.yaml similarity index 100% rename from pipeline/3-pipelinerun.yaml rename to pipeline/2-pipelinerun.yaml