|
| 1 | +apiVersion: tekton.dev/v1 |
| 2 | +kind: Pipeline |
| 3 | +metadata: |
| 4 | + name: mw-pipeline |
| 5 | +spec: |
| 6 | + params: |
| 7 | + - name: URL |
| 8 | + description: Repository URL to clone from |
| 9 | + type: string |
| 10 | + - name: REVISION |
| 11 | + description: 'Revision to checkout. (branch, tag, sha, ref, etc...)' |
| 12 | + type: string |
| 13 | + default: main |
| 14 | + - name: BUILD_SCRIPT |
| 15 | + description: 'The build script to embed with the Containerfile' |
| 16 | + type: string |
| 17 | + default: | |
| 18 | + date |
| 19 | + - name: BUILD_TOOL |
| 20 | + type: string |
| 21 | + - name: BUILD_TOOL_VERSION |
| 22 | + type: string |
| 23 | + - name: JAVA_VERSION |
| 24 | + type: string |
| 25 | + - name: MVN_REPO_DEPLOY_URL |
| 26 | + description: Maven repository to deploy to |
| 27 | + type: string |
| 28 | + default: http://indyhost/ #TODO remove default |
| 29 | + - name: MVN_REPO_DEPENDENCIES_URL |
| 30 | + description: Maven repository to get dependencies from |
| 31 | + type: string |
| 32 | + - name: ACCESS_TOKEN |
| 33 | + type: string |
| 34 | + - name: BUILD_ID |
| 35 | + type: string |
| 36 | + - name: caTrustConfigMapName |
| 37 | + type: string |
| 38 | + - name: ENABLE_INDY_PROXY |
| 39 | + type: string |
| 40 | + workspaces: |
| 41 | + - name: source |
| 42 | + description: Workspace containing the source code |
| 43 | + # - name: ssh-directory |
| 44 | + # configMap: |
| 45 | + # name: ssh-directory |
| 46 | + tasks: |
| 47 | + - name: git-clone |
| 48 | + params: |
| 49 | + - name: url |
| 50 | + value: $(params.URL) |
| 51 | + - name: revision |
| 52 | + value: $(params.REVISION) |
| 53 | + - name: verbose |
| 54 | + value: 'true' |
| 55 | + - name: subdirectory |
| 56 | + value: '' |
| 57 | + taskRef: |
| 58 | + resolver: bundles |
| 59 | + params: |
| 60 | + - name: name |
| 61 | + value: git-clone |
| 62 | + - name: bundle |
| 63 | + value: quay.io/konflux-ci/tekton-catalog/task-git-clone:0.1 |
| 64 | + - name: kind |
| 65 | + value: task |
| 66 | + workspaces: |
| 67 | + - name: output |
| 68 | + workspace: source |
| 69 | + # - name: ssh-directory |
| 70 | + # workspace: ssh-directory |
| 71 | + - name: pre-build |
| 72 | + runAfter: |
| 73 | + - git-clone |
| 74 | + params: |
| 75 | + - name: IMAGE_URL |
| 76 | + # value: 'quay.io/redhat-user-workloads-stage/pnc-devel-tenant/pnc-konflux-trusted-source:{{revision}}' |
| 77 | + value: 'quay.io/redhat-user-workloads-stage/pnc-devel-tenant/pnc:trusted-source-$(context.pipelineRun.name)' |
| 78 | + - name: NAME |
| 79 | + value: $(context.pipelineRun.name) |
| 80 | + - name: RECIPE_IMAGE |
| 81 | + value: "quay.io/redhat-user-workloads/konflux-jbs-pnc-tenant/jvm-build-service-builder-images/ubi8:latest" |
| 82 | + - name: BUILD_TOOL |
| 83 | + value: $(params.BUILD_TOOL) |
| 84 | + - name: BUILD_TOOL_VERSION |
| 85 | + value: $(params.BUILD_TOOL_VERSION) |
| 86 | + - name: JAVA_VERSION |
| 87 | + value: $(params.JAVA_VERSION) |
| 88 | + - name: BUILD_SCRIPT |
| 89 | + value: $(params.BUILD_SCRIPT) |
| 90 | + # TODO: Below is needed for deploy-pre-build-source step and could be skipped if its removed. |
| 91 | + - name: SCM_URL |
| 92 | + value: $(params.URL) |
| 93 | + - name: SCM_HASH |
| 94 | + value: $(params.REVISION) |
| 95 | + taskRef: |
| 96 | + resolver: http |
| 97 | + params: |
| 98 | + - name: url |
| 99 | + value: https://raw.githubusercontent.com/rnc/jvm-build-service/refs/heads/NCL8774/deploy/tasks/pre-build.yaml |
| 100 | + workspaces: |
| 101 | + - name: source |
| 102 | + workspace: source |
| 103 | + |
| 104 | + - name: buildah-oci-ta |
| 105 | + runAfter: |
| 106 | + - pre-build |
| 107 | + params: |
| 108 | + - name: SOURCE_ARTIFACT |
| 109 | + value: $(tasks.pre-build.results.PRE_BUILD_IMAGE_DIGEST) |
| 110 | + - name: HERMETIC |
| 111 | + value: "false" |
| 112 | + - name: IMAGE # output image |
| 113 | + value: quay.io/redhat-user-workloads-stage/pnc-devel-tenant/pnc:build-$(context.pipelineRun.name) |
| 114 | + - name: DOCKERFILE # local path to the containerfile |
| 115 | + value: .jbs/Containerfile |
| 116 | + - name: caTrustConfigMapName |
| 117 | + value: $(params.caTrustConfigMapName) |
| 118 | + - name: ENABLE_INDY_PROXY |
| 119 | + value: $(params.ENABLE_INDY_PROXY) |
| 120 | + - name: BUILD_ARGS #TODO this should be baked in the OCI source image only a ACCESS_TOKEN should be passed |
| 121 | + value: |
| 122 | + - PROXY_URL=$(params.MVN_REPO_DEPENDENCIES_URL) |
| 123 | + - BUILD_ID=$(params.BUILD_ID) |
| 124 | + - ACCESS_TOKEN=$(params.ACCESS_TOKEN) |
| 125 | + taskRef: |
| 126 | + #resolver: bundles |
| 127 | + #params: |
| 128 | + # - name: name |
| 129 | + # value: buildah-oci-ta |
| 130 | + # - name: bundle |
| 131 | + # value: quay.io/konflux-ci/tekton-catalog/task-buildah-oci-ta:0.2 |
| 132 | + # - name: kind |
| 133 | + # value: task |
| 134 | + |
| 135 | + resolver: http |
| 136 | + params: |
| 137 | + - name: url |
| 138 | + value: https://raw.githubusercontent.com/rnc/jvm-build-service/refs/heads/NCL8774/deploy/tasks/buildah-oci-ta.yaml |
| 139 | + |
| 140 | + - name: maven-deployment |
| 141 | + runAfter: |
| 142 | + - buildah-oci-ta |
| 143 | + params: |
| 144 | + - name: IMAGE_URL |
| 145 | + value: $(tasks.buildah-oci-ta.results.IMAGE_URL) |
| 146 | + - name: IMAGE_DIGEST |
| 147 | + value: $(tasks.buildah-oci-ta.results.IMAGE_DIGEST) |
| 148 | + - name: MVN_REPO |
| 149 | + value: $(params.MVN_REPO_DEPLOY_URL) |
| 150 | + - name: ACCESS_TOKEN |
| 151 | + value: $(params.ACCESS_TOKEN) |
| 152 | + taskRef: |
| 153 | + resolver: http |
| 154 | + params: |
| 155 | + - name: url |
| 156 | + value: https://raw.githubusercontent.com/rnc/jvm-build-service/refs/heads/NCL8774/deploy/tasks/maven-deployment.yaml |
0 commit comments