From 04492c4ee5caacca42f93f6b35a0d2b5d102dd58 Mon Sep 17 00:00:00 2001 From: redhat-appstudio Date: Thu, 19 Jan 2023 08:52:51 +0000 Subject: [PATCH] Appstudio update node-express-hello-skeg --- .../node-express-hello-skeg-pull-request.yaml | 330 ++++++++++++++++++ .tekton/node-express-hello-skeg-push.yaml | 329 +++++++++++++++++ 2 files changed, 659 insertions(+) create mode 100644 .tekton/node-express-hello-skeg-pull-request.yaml create mode 100644 .tekton/node-express-hello-skeg-push.yaml diff --git a/.tekton/node-express-hello-skeg-pull-request.yaml b/.tekton/node-express-hello-skeg-pull-request.yaml new file mode 100644 index 0000000..8a078ee --- /dev/null +++ b/.tekton/node-express-hello-skeg-pull-request.yaml @@ -0,0 +1,330 @@ +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.redhat.com/commit_sha: '{{revision}}' + build.appstudio.redhat.com/pull_request_number: '{{pull_request_number}}' + build.appstudio.redhat.com/target_branch: '{{target_branch}}' + pipelinesascode.tekton.dev/max-keep-runs: "3" + pipelinesascode.tekton.dev/on-event: '[pull_request]' + pipelinesascode.tekton.dev/on-target-branch: '[main,master]' + creationTimestamp: null + labels: + appstudio.openshift.io/application: test + appstudio.openshift.io/component: node-express-hello-skeg + pipelines.appstudio.openshift.io/type: build + name: node-express-hello-skeg-on-pull-request + namespace: mkovarik +spec: + params: + - name: git-url + value: '{{repo_url}}' + - name: output-image + value: quay.io/redhat-appstudio/user-workload:on-pr-{{revision}} + - name: revision + value: '{{revision}}' + pipelineSpec: + finally: + - name: show-summary + params: + - name: pipeline-run-name + value: $(context.pipelineRun.name) + - name: git-url + value: $(tasks.clone-repository.results.url)?rev=$(tasks.clone-repository.results.commit) + - name: image-url + value: $(params.output-image) + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-summary:0.1@sha256:245f5017f0a58840212cfd2de0a50844f78b2b2c74976289f34b238bdaa700e5 + name: summary + params: + - description: Source Repository URL + name: git-url + type: string + - default: "" + description: Revision of the Source Repository + name: revision + type: string + - description: Fully Qualified Output Image + name: output-image + type: string + - default: . + description: The path to your source code + name: path-context + type: string + - default: Dockerfile + description: Path to the Dockerfile + name: dockerfile + type: string + - default: "false" + description: Force rebuild image + name: rebuild + type: string + - default: "false" + description: Skip checks against built image + name: skip-checks + type: string + - default: "false" + description: Java build + name: java + type: string + results: + - description: "" + name: IMAGE_URL + value: $(tasks.build-container.results.IMAGE_URL) + - description: "" + name: IMAGE_DIGEST + value: $(tasks.build-container.results.IMAGE_DIGEST) + - description: "" + name: CHAINS-GIT_URL + value: $(tasks.clone-repository.results.url) + - description: "" + name: CHAINS-GIT_COMMIT + value: $(tasks.clone-repository.results.commit) + tasks: + - name: appstudio-init + params: + - name: image-url + value: $(params.output-image) + - name: rebuild + value: $(params.rebuild) + - name: skip-checks + value: $(params.skip-checks) + - name: pipeline-run-name + value: $(context.pipelineRun.name) + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-init:0.1@sha256:06ff3d62dbeafe3611d0328d245798531a1bb747409ac6c2ea83a2aaa0d0ccb9 + name: init + - name: clone-repository + params: + - name: url + value: $(params.git-url) + - name: revision + value: $(params.revision) + runAfter: + - appstudio-init + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:bc80240b360909d98f65e792f8be646de90664766a1f5674735f3ebdd8a3d8bf + name: git-clone + when: + - input: $(tasks.appstudio-init.results.build) + operator: in + values: + - "true" + workspaces: + - name: output + workspace: workspace + - name: basic-auth + workspace: git-auth + - name: appstudio-configure-build + runAfter: + - clone-repository + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-configure-build:0.1@sha256:003eb89ebe3e51d88b93baaabd8ab66eaf479aad00ad71a9571b12f7b428adc9 + name: configure-build + when: + - input: $(tasks.appstudio-init.results.build) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace + - name: registry-auth + workspace: registry-auth + - name: prefetch-dependencies + params: + - name: package-type + value: gomod + - name: package-path + value: $(params.path-context) + runAfter: + - appstudio-configure-build + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-prefetch-dependencies:0.1@sha256:10d7ac70a9950b655328c4b57c42290afea115e2a0f0d5e0b399f62d2325a22c + name: prefetch-dependencies + when: + - input: $(tasks.clone-repository.results.hermetic-build) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace + - name: build-container + params: + - name: PATH_CONTEXT + value: $(params.path-context) + - name: IMAGE + value: $(params.output-image) + - name: PUSH_EXTRA_ARGS + value: $(tasks.appstudio-configure-build.results.buildah-auth-param) + runAfter: + - prefetch-dependencies + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-s2i-nodejs:0.1@sha256:497dcfef7e30f4db634051c9ba0c181db672445f46051414fc0d52df42193d21 + name: s2i-nodejs + when: + - input: $(tasks.appstudio-init.results.build) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace + - name: sanity-inspect-image + params: + - name: IMAGE_URL + value: $(tasks.build-container.results.IMAGE_URL)@$(tasks.build-container.results.IMAGE_DIGEST) + runAfter: + - build-container + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sanity-inspect-image:0.1@sha256:1ff8cea8259a415a7ca6de7d47ade692813721653f89166f549e732cecaf2dcf + name: sanity-inspect-image + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: workspace + workspace: workspace + - name: sanity-label-check + runAfter: + - sanity-inspect-image + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sanity-label-check:0.1@sha256:1f0fe138843308648f11132749e6ec08a3ffdf1d60bee63c7df53bf5927bff0e + name: sanity-label-check + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: workspace + workspace: workspace + - name: sanity-optional-label-check + params: + - name: POLICY_NAMESPACE + value: optional_checks + runAfter: + - sanity-inspect-image + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sanity-label-check:0.1@sha256:1f0fe138843308648f11132749e6ec08a3ffdf1d60bee63c7df53bf5927bff0e + name: sanity-label-check + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: workspace + workspace: workspace + - name: deprecated-base-image-check + params: + - name: BASE_IMAGES_DIGESTS + value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS) + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-deprecated-image-check:0.1@sha256:f95f72700fe06ea9a285687827199944b1d4a44b83757beb4073569c5beaf3cf + name: deprecated-image-check + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: sanity-ws + workspace: workspace + - name: clair-scan + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) + runAfter: + - build-container + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-clair-scan:0.1@sha256:4f65b7f26953460d26370d66538c0cdc4b978f35093dc3b38af8b496b563a944 + name: clair-scan + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: registry-auth + workspace: registry-auth + - name: sast-snyk-check + runAfter: + - clone-repository + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sast-snyk-check:0.1@sha256:6686a9f8c89c2be134871cccece868c62bc1187a9d906f063f4c79a8865c98d1 + name: sast-snyk-check + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: workspace + workspace: workspace + - name: clamav-scan + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) + runAfter: + - build-container + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-clamav-scan:0.1@sha256:64b52d3e33cdb539f1d3759f432782eaed5c812bea04296f509cfa2d81247c8d + name: clamav-scan + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: registry-auth + workspace: registry-auth + - name: sbom-json-check + params: + - name: IMAGE_URL + value: $(tasks.build-container.results.IMAGE_URL) + runAfter: + - build-container + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sbom-json-check:0.1@sha256:9d228fedb0429e4ae6f383e9355615823e0684a36ab3c2453a3f3cd56f518944 + name: sbom-json-check + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: workspace + workspace: workspace + workspaces: + - name: workspace + - name: registry-auth + optional: true + - name: git-auth + optional: true + workspaces: + - name: workspace + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + status: {} + - name: registry-auth + secret: + secretName: redhat-appstudio-registry-pull-secret + - name: git-auth + secret: + secretName: '{{ git_auth_secret }}' +status: {} diff --git a/.tekton/node-express-hello-skeg-push.yaml b/.tekton/node-express-hello-skeg-push.yaml new file mode 100644 index 0000000..374eac9 --- /dev/null +++ b/.tekton/node-express-hello-skeg-push.yaml @@ -0,0 +1,329 @@ +apiVersion: tekton.dev/v1beta1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.redhat.com/commit_sha: '{{revision}}' + build.appstudio.redhat.com/target_branch: '{{target_branch}}' + pipelinesascode.tekton.dev/max-keep-runs: "3" + pipelinesascode.tekton.dev/on-event: '[push]' + pipelinesascode.tekton.dev/on-target-branch: '[main,master]' + creationTimestamp: null + labels: + appstudio.openshift.io/application: test + appstudio.openshift.io/component: node-express-hello-skeg + pipelines.appstudio.openshift.io/type: build + name: node-express-hello-skeg-on-push + namespace: mkovarik +spec: + params: + - name: git-url + value: '{{repo_url}}' + - name: output-image + value: quay.io/redhat-appstudio/user-workload:{{revision}} + - name: revision + value: '{{revision}}' + pipelineSpec: + finally: + - name: show-summary + params: + - name: pipeline-run-name + value: $(context.pipelineRun.name) + - name: git-url + value: $(tasks.clone-repository.results.url)?rev=$(tasks.clone-repository.results.commit) + - name: image-url + value: $(params.output-image) + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-summary:0.1@sha256:245f5017f0a58840212cfd2de0a50844f78b2b2c74976289f34b238bdaa700e5 + name: summary + params: + - description: Source Repository URL + name: git-url + type: string + - default: "" + description: Revision of the Source Repository + name: revision + type: string + - description: Fully Qualified Output Image + name: output-image + type: string + - default: . + description: The path to your source code + name: path-context + type: string + - default: Dockerfile + description: Path to the Dockerfile + name: dockerfile + type: string + - default: "false" + description: Force rebuild image + name: rebuild + type: string + - default: "false" + description: Skip checks against built image + name: skip-checks + type: string + - default: "false" + description: Java build + name: java + type: string + results: + - description: "" + name: IMAGE_URL + value: $(tasks.build-container.results.IMAGE_URL) + - description: "" + name: IMAGE_DIGEST + value: $(tasks.build-container.results.IMAGE_DIGEST) + - description: "" + name: CHAINS-GIT_URL + value: $(tasks.clone-repository.results.url) + - description: "" + name: CHAINS-GIT_COMMIT + value: $(tasks.clone-repository.results.commit) + tasks: + - name: appstudio-init + params: + - name: image-url + value: $(params.output-image) + - name: rebuild + value: $(params.rebuild) + - name: skip-checks + value: $(params.skip-checks) + - name: pipeline-run-name + value: $(context.pipelineRun.name) + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-init:0.1@sha256:06ff3d62dbeafe3611d0328d245798531a1bb747409ac6c2ea83a2aaa0d0ccb9 + name: init + - name: clone-repository + params: + - name: url + value: $(params.git-url) + - name: revision + value: $(params.revision) + runAfter: + - appstudio-init + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-git-clone:0.1@sha256:bc80240b360909d98f65e792f8be646de90664766a1f5674735f3ebdd8a3d8bf + name: git-clone + when: + - input: $(tasks.appstudio-init.results.build) + operator: in + values: + - "true" + workspaces: + - name: output + workspace: workspace + - name: basic-auth + workspace: git-auth + - name: appstudio-configure-build + runAfter: + - clone-repository + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-configure-build:0.1@sha256:003eb89ebe3e51d88b93baaabd8ab66eaf479aad00ad71a9571b12f7b428adc9 + name: configure-build + when: + - input: $(tasks.appstudio-init.results.build) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace + - name: registry-auth + workspace: registry-auth + - name: prefetch-dependencies + params: + - name: package-type + value: gomod + - name: package-path + value: $(params.path-context) + runAfter: + - appstudio-configure-build + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-prefetch-dependencies:0.1@sha256:10d7ac70a9950b655328c4b57c42290afea115e2a0f0d5e0b399f62d2325a22c + name: prefetch-dependencies + when: + - input: $(tasks.clone-repository.results.hermetic-build) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace + - name: build-container + params: + - name: PATH_CONTEXT + value: $(params.path-context) + - name: IMAGE + value: $(params.output-image) + - name: PUSH_EXTRA_ARGS + value: $(tasks.appstudio-configure-build.results.buildah-auth-param) + runAfter: + - prefetch-dependencies + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-s2i-nodejs:0.1@sha256:497dcfef7e30f4db634051c9ba0c181db672445f46051414fc0d52df42193d21 + name: s2i-nodejs + when: + - input: $(tasks.appstudio-init.results.build) + operator: in + values: + - "true" + workspaces: + - name: source + workspace: workspace + - name: sanity-inspect-image + params: + - name: IMAGE_URL + value: $(tasks.build-container.results.IMAGE_URL)@$(tasks.build-container.results.IMAGE_DIGEST) + runAfter: + - build-container + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sanity-inspect-image:0.1@sha256:1ff8cea8259a415a7ca6de7d47ade692813721653f89166f549e732cecaf2dcf + name: sanity-inspect-image + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: workspace + workspace: workspace + - name: sanity-label-check + runAfter: + - sanity-inspect-image + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sanity-label-check:0.1@sha256:1f0fe138843308648f11132749e6ec08a3ffdf1d60bee63c7df53bf5927bff0e + name: sanity-label-check + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: workspace + workspace: workspace + - name: sanity-optional-label-check + params: + - name: POLICY_NAMESPACE + value: optional_checks + runAfter: + - sanity-inspect-image + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sanity-label-check:0.1@sha256:1f0fe138843308648f11132749e6ec08a3ffdf1d60bee63c7df53bf5927bff0e + name: sanity-label-check + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: workspace + workspace: workspace + - name: deprecated-base-image-check + params: + - name: BASE_IMAGES_DIGESTS + value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS) + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-deprecated-image-check:0.1@sha256:f95f72700fe06ea9a285687827199944b1d4a44b83757beb4073569c5beaf3cf + name: deprecated-image-check + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: sanity-ws + workspace: workspace + - name: clair-scan + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) + runAfter: + - build-container + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-clair-scan:0.1@sha256:4f65b7f26953460d26370d66538c0cdc4b978f35093dc3b38af8b496b563a944 + name: clair-scan + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: registry-auth + workspace: registry-auth + - name: sast-snyk-check + runAfter: + - clone-repository + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sast-snyk-check:0.1@sha256:6686a9f8c89c2be134871cccece868c62bc1187a9d906f063f4c79a8865c98d1 + name: sast-snyk-check + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: workspace + workspace: workspace + - name: clamav-scan + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) + runAfter: + - build-container + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-clamav-scan:0.1@sha256:64b52d3e33cdb539f1d3759f432782eaed5c812bea04296f509cfa2d81247c8d + name: clamav-scan + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: registry-auth + workspace: registry-auth + - name: sbom-json-check + params: + - name: IMAGE_URL + value: $(tasks.build-container.results.IMAGE_URL) + runAfter: + - build-container + taskRef: + bundle: quay.io/redhat-appstudio-tekton-catalog/task-sbom-json-check:0.1@sha256:9d228fedb0429e4ae6f383e9355615823e0684a36ab3c2453a3f3cd56f518944 + name: sbom-json-check + when: + - input: $(params.skip-checks) + operator: in + values: + - "false" + workspaces: + - name: workspace + workspace: workspace + workspaces: + - name: workspace + - name: registry-auth + optional: true + - name: git-auth + optional: true + workspaces: + - name: workspace + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + status: {} + - name: registry-auth + secret: + secretName: redhat-appstudio-registry-pull-secret + - name: git-auth + secret: + secretName: '{{ git_auth_secret }}' +status: {}