|
| 1 | +apiVersion: tekton.dev/v1beta1 |
| 2 | +kind: PipelineRun |
| 3 | +metadata: |
| 4 | + annotations: |
| 5 | + build.appstudio.redhat.com/commit_sha: '{{revision}}' |
| 6 | + build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}' |
| 7 | + build.appstudio.redhat.com/target_branch: '{{target_branch}}' |
| 8 | + pipelinesascode.tekton.dev/max-keep-runs: "3" |
| 9 | + pipelinesascode.tekton.dev/on-event: '[pull_request]' |
| 10 | + pipelinesascode.tekton.dev/on-target-branch: '[main]' |
| 11 | + creationTimestamp: null |
| 12 | + labels: |
| 13 | + appstudio.openshift.io/application: devfile-sample-java-springboot-basic |
| 14 | + appstudio.openshift.io/component: devfile-sample-java-springboot-basic-rleq |
| 15 | + pipelines.appstudio.openshift.io/type: build |
| 16 | + name: devfile-sample-java-springboot-basic-rleq-on-pull-request |
| 17 | + namespace: rh-ee-asoro-tenant |
| 18 | +spec: |
| 19 | + params: |
| 20 | + - name: dockerfile |
| 21 | + value: docker/Dockerfile |
| 22 | + - name: git-url |
| 23 | + value: '{{repo_url}}' |
| 24 | + - name: output-image |
| 25 | + value: quay.io/redhat-appstudio/user-workload:on-pr-{{revision}} |
| 26 | + - name: path-context |
| 27 | + value: . |
| 28 | + - name: revision |
| 29 | + value: '{{revision}}' |
| 30 | + pipelineSpec: |
| 31 | + finally: |
| 32 | + - name: show-summary |
| 33 | + params: |
| 34 | + - name: pipelinerun-name |
| 35 | + value: $(context.pipelineRun.name) |
| 36 | + - name: git-url |
| 37 | + value: $(tasks.clone-repository.results.url)?rev=$(tasks.clone-repository.results.commit) |
| 38 | + - name: image-url |
| 39 | + value: $(params.output-image) |
| 40 | + taskRef: |
| 41 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-summary:0.1@sha256:03361504506b038934d2a2ed397970f183f9a23506b810bccc964f4c486bfe79 |
| 42 | + name: summary |
| 43 | + params: |
| 44 | + - description: Source Repository URL |
| 45 | + name: git-url |
| 46 | + type: string |
| 47 | + - default: "" |
| 48 | + description: Revision of the Source Repository |
| 49 | + name: revision |
| 50 | + type: string |
| 51 | + - description: Fully Qualified Output Image |
| 52 | + name: output-image |
| 53 | + type: string |
| 54 | + - default: . |
| 55 | + description: The path to your source code |
| 56 | + name: path-context |
| 57 | + type: string |
| 58 | + - default: Dockerfile |
| 59 | + description: Path to the Dockerfile |
| 60 | + name: dockerfile |
| 61 | + type: string |
| 62 | + - default: "false" |
| 63 | + description: Force rebuild image |
| 64 | + name: rebuild |
| 65 | + type: string |
| 66 | + - default: "false" |
| 67 | + description: Skip checks against built image |
| 68 | + name: skip-checks |
| 69 | + type: string |
| 70 | + - default: "false" |
| 71 | + description: Execute the build with network isolation |
| 72 | + name: hermetic |
| 73 | + type: string |
| 74 | + - default: "" |
| 75 | + description: Build dependencies to be prefetched by Cachi2 |
| 76 | + name: prefetch-input |
| 77 | + type: string |
| 78 | + - default: "false" |
| 79 | + description: Java build |
| 80 | + name: java |
| 81 | + type: string |
| 82 | + - default: "" |
| 83 | + description: Snyk Token Secret Name |
| 84 | + name: snyk-secret |
| 85 | + type: string |
| 86 | + results: |
| 87 | + - description: "" |
| 88 | + name: IMAGE_URL |
| 89 | + value: $(tasks.build-container.results.IMAGE_URL) |
| 90 | + - description: "" |
| 91 | + name: IMAGE_DIGEST |
| 92 | + value: $(tasks.build-container.results.IMAGE_DIGEST) |
| 93 | + - description: "" |
| 94 | + name: CHAINS-GIT_URL |
| 95 | + value: $(tasks.clone-repository.results.url) |
| 96 | + - description: "" |
| 97 | + name: CHAINS-GIT_COMMIT |
| 98 | + value: $(tasks.clone-repository.results.commit) |
| 99 | + - description: "" |
| 100 | + name: JAVA_COMMUNITY_DEPENDENCIES |
| 101 | + value: $(tasks.build-container.results.JAVA_COMMUNITY_DEPENDENCIES) |
| 102 | + tasks: |
| 103 | + - name: init |
| 104 | + params: |
| 105 | + - name: image-url |
| 106 | + value: $(params.output-image) |
| 107 | + - name: rebuild |
| 108 | + value: $(params.rebuild) |
| 109 | + - name: skip-checks |
| 110 | + value: $(params.skip-checks) |
| 111 | + - name: pipelinerun-name |
| 112 | + value: $(context.pipelineRun.name) |
| 113 | + - name: pipelinerun-uid |
| 114 | + value: $(context.pipelineRun.uid) |
| 115 | + taskRef: |
| 116 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-init:0.1@sha256:5ce77110e2a49407a69a7922042dc0859f7e8f5f75dc0cd0bcc2d17860469bdb |
| 117 | + name: init |
| 118 | + - name: clone-repository |
| 119 | + params: |
| 120 | + - name: url |
| 121 | + value: $(params.git-url) |
| 122 | + - name: revision |
| 123 | + value: $(params.revision) |
| 124 | + runAfter: |
| 125 | + - init |
| 126 | + taskRef: |
| 127 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:f4e37778cba00296606ddfbc1c58181330899cafcaa1ee41c75a7cf8bed312f0 |
| 128 | + name: git-clone |
| 129 | + when: |
| 130 | + - input: $(tasks.init.results.build) |
| 131 | + operator: in |
| 132 | + values: |
| 133 | + - "true" |
| 134 | + workspaces: |
| 135 | + - name: output |
| 136 | + workspace: workspace |
| 137 | + - name: basic-auth |
| 138 | + workspace: git-auth |
| 139 | + - name: prefetch-dependencies |
| 140 | + params: |
| 141 | + - name: input |
| 142 | + value: $(params.prefetch-input) |
| 143 | + runAfter: |
| 144 | + - clone-repository |
| 145 | + taskRef: |
| 146 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-prefetch-dependencies:0.1@sha256:bebbf6521a5a203410d6b0da5da366a5aa9bdd63522d7bf3f641e81b8cc2ba2d |
| 147 | + name: prefetch-dependencies |
| 148 | + when: |
| 149 | + - input: $(params.hermetic) |
| 150 | + operator: in |
| 151 | + values: |
| 152 | + - "true" |
| 153 | + workspaces: |
| 154 | + - name: source |
| 155 | + workspace: workspace |
| 156 | + - name: build-container |
| 157 | + params: |
| 158 | + - name: IMAGE |
| 159 | + value: $(params.output-image) |
| 160 | + - name: DOCKERFILE |
| 161 | + value: $(params.dockerfile) |
| 162 | + - name: CONTEXT |
| 163 | + value: $(params.path-context) |
| 164 | + - name: DOCKER_AUTH |
| 165 | + value: $(tasks.init.results.container-registry-secret) |
| 166 | + - name: HERMETIC |
| 167 | + value: $(params.hermetic) |
| 168 | + - name: PREFETCH_INPUT |
| 169 | + value: $(params.prefetch-input) |
| 170 | + runAfter: |
| 171 | + - prefetch-dependencies |
| 172 | + taskRef: |
| 173 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-buildah:0.1@sha256:c3712257615d206ef40013bf1c5c681670fc8f7fd6aac9fa4c86f7afeff627ef |
| 174 | + name: buildah |
| 175 | + when: |
| 176 | + - input: $(tasks.init.results.build) |
| 177 | + operator: in |
| 178 | + values: |
| 179 | + - "true" |
| 180 | + workspaces: |
| 181 | + - name: source |
| 182 | + workspace: workspace |
| 183 | + - name: sanity-inspect-image |
| 184 | + params: |
| 185 | + - name: IMAGE_URL |
| 186 | + value: $(tasks.build-container.results.IMAGE_URL) |
| 187 | + - name: IMAGE_DIGEST |
| 188 | + value: $(tasks.build-container.results.IMAGE_DIGEST) |
| 189 | + - name: DOCKER_AUTH |
| 190 | + value: $(tasks.init.results.container-registry-secret) |
| 191 | + runAfter: |
| 192 | + - build-container |
| 193 | + taskRef: |
| 194 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sanity-inspect-image:0.1@sha256:fd4efd9d12eea3a8d47532c4226e685618845d0ba95abb98e008020243d96301 |
| 195 | + name: sanity-inspect-image |
| 196 | + when: |
| 197 | + - input: $(params.skip-checks) |
| 198 | + operator: in |
| 199 | + values: |
| 200 | + - "false" |
| 201 | + workspaces: |
| 202 | + - name: source |
| 203 | + workspace: workspace |
| 204 | + - name: sanity-label-check |
| 205 | + runAfter: |
| 206 | + - sanity-inspect-image |
| 207 | + taskRef: |
| 208 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sanity-label-check:0.1@sha256:534770bf7a7c10277ab5f9c1e7b766abbffb343cc864dd9545aecc5278257dc3 |
| 209 | + name: sanity-label-check |
| 210 | + when: |
| 211 | + - input: $(params.skip-checks) |
| 212 | + operator: in |
| 213 | + values: |
| 214 | + - "false" |
| 215 | + workspaces: |
| 216 | + - name: workspace |
| 217 | + workspace: workspace |
| 218 | + - name: sanity-optional-label-check |
| 219 | + params: |
| 220 | + - name: POLICY_NAMESPACE |
| 221 | + value: optional_checks |
| 222 | + runAfter: |
| 223 | + - sanity-inspect-image |
| 224 | + taskRef: |
| 225 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sanity-label-check:0.1@sha256:534770bf7a7c10277ab5f9c1e7b766abbffb343cc864dd9545aecc5278257dc3 |
| 226 | + name: sanity-label-check |
| 227 | + when: |
| 228 | + - input: $(params.skip-checks) |
| 229 | + operator: in |
| 230 | + values: |
| 231 | + - "false" |
| 232 | + workspaces: |
| 233 | + - name: workspace |
| 234 | + workspace: workspace |
| 235 | + - name: deprecated-base-image-check |
| 236 | + params: |
| 237 | + - name: BASE_IMAGES_DIGESTS |
| 238 | + value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS) |
| 239 | + taskRef: |
| 240 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-deprecated-image-check:0.1@sha256:28d724dd6f6c365b2a839d9e52baac91559fd78c160774769c1ec724301f78d4 |
| 241 | + name: deprecated-image-check |
| 242 | + when: |
| 243 | + - input: $(params.skip-checks) |
| 244 | + operator: in |
| 245 | + values: |
| 246 | + - "false" |
| 247 | + workspaces: |
| 248 | + - name: sanity-ws |
| 249 | + workspace: workspace |
| 250 | + - name: clair-scan |
| 251 | + params: |
| 252 | + - name: image-digest |
| 253 | + value: $(tasks.build-container.results.IMAGE_DIGEST) |
| 254 | + - name: image-url |
| 255 | + value: $(tasks.build-container.results.IMAGE_URL) |
| 256 | + - name: docker-auth |
| 257 | + value: $(tasks.init.results.container-registry-secret) |
| 258 | + runAfter: |
| 259 | + - build-container |
| 260 | + taskRef: |
| 261 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-clair-scan:0.1@sha256:fba8170329ab00b864ee7d16e0358df4c4386880e10894fd7bbbb1457112477b |
| 262 | + name: clair-scan |
| 263 | + when: |
| 264 | + - input: $(params.skip-checks) |
| 265 | + operator: in |
| 266 | + values: |
| 267 | + - "false" |
| 268 | + - name: sast-snyk-check |
| 269 | + params: |
| 270 | + - name: SNYK_SECRET |
| 271 | + value: $(params.snyk-secret) |
| 272 | + runAfter: |
| 273 | + - clone-repository |
| 274 | + taskRef: |
| 275 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sast-snyk-check:0.1@sha256:566ce8367b92261d637ecac245a66e3d7177d8d375948ba0fc74dbc7a55d674d |
| 276 | + name: sast-snyk-check |
| 277 | + when: |
| 278 | + - input: $(params.skip-checks) |
| 279 | + operator: in |
| 280 | + values: |
| 281 | + - "false" |
| 282 | + - input: $(params.snyk-secret) |
| 283 | + operator: notin |
| 284 | + values: |
| 285 | + - "" |
| 286 | + workspaces: |
| 287 | + - name: workspace |
| 288 | + workspace: workspace |
| 289 | + - name: clamav-scan |
| 290 | + params: |
| 291 | + - name: image-digest |
| 292 | + value: $(tasks.build-container.results.IMAGE_DIGEST) |
| 293 | + - name: image-url |
| 294 | + value: $(tasks.build-container.results.IMAGE_URL) |
| 295 | + - name: docker-auth |
| 296 | + value: $(tasks.init.results.container-registry-secret) |
| 297 | + runAfter: |
| 298 | + - build-container |
| 299 | + taskRef: |
| 300 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-clamav-scan:0.1@sha256:28b425322aa84f988c6c4f8d503787b3fb301668b2ad6728846b8f8c45ba012b |
| 301 | + name: clamav-scan |
| 302 | + when: |
| 303 | + - input: $(params.skip-checks) |
| 304 | + operator: in |
| 305 | + values: |
| 306 | + - "false" |
| 307 | + - name: sbom-json-check |
| 308 | + params: |
| 309 | + - name: IMAGE_URL |
| 310 | + value: $(tasks.build-container.results.IMAGE_URL) |
| 311 | + - name: IMAGE_DIGEST |
| 312 | + value: $(tasks.build-container.results.IMAGE_DIGEST) |
| 313 | + runAfter: |
| 314 | + - build-container |
| 315 | + taskRef: |
| 316 | + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sbom-json-check:0.1@sha256:ce6a0932da9b41080108284d1366fc2de8374fca5137500138e16ad9e04610c6 |
| 317 | + name: sbom-json-check |
| 318 | + when: |
| 319 | + - input: $(params.skip-checks) |
| 320 | + operator: in |
| 321 | + values: |
| 322 | + - "false" |
| 323 | + workspaces: |
| 324 | + - name: workspace |
| 325 | + - name: git-auth |
| 326 | + optional: true |
| 327 | + workspaces: |
| 328 | + - name: workspace |
| 329 | + volumeClaimTemplate: |
| 330 | + metadata: |
| 331 | + creationTimestamp: null |
| 332 | + spec: |
| 333 | + accessModes: |
| 334 | + - ReadWriteOnce |
| 335 | + resources: |
| 336 | + requests: |
| 337 | + storage: 1Gi |
| 338 | + status: {} |
| 339 | + - name: git-auth |
| 340 | + secret: |
| 341 | + secretName: '{{ git_auth_secret }}' |
| 342 | +status: {} |
0 commit comments