From ea369baa99639d49658bfc82196078b7bd814dbe Mon Sep 17 00:00:00 2001 From: ryemorris Date: Thu, 20 Nov 2025 13:46:49 -0500 Subject: [PATCH] Merge pull request #197 from RedHatInsights/konflux-learning-resources-sc Red Hat Konflux update learning-resources-sc --- .../learning-resources-sc-pull-request.yaml | 62 +++++++++++++++++++ .tekton/learning-resources-sc-push.yaml | 60 ++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 .tekton/learning-resources-sc-pull-request.yaml create mode 100644 .tekton/learning-resources-sc-push.yaml diff --git a/.tekton/learning-resources-sc-pull-request.yaml b/.tekton/learning-resources-sc-pull-request.yaml new file mode 100644 index 00000000..649e12c1 --- /dev/null +++ b/.tekton/learning-resources-sc-pull-request.yaml @@ -0,0 +1,62 @@ +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.openshift.io/repo: https://github.com/RedHatInsights/learning-resources?rev={{revision}} + 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/cancel-in-progress: "true" + pipelinesascode.tekton.dev/max-keep-runs: "3" + pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch + == "security-compliance" + pipelinesascode.tekton.dev/pipeline: https://github.com/RedHatInsights/konflux-pipelines/raw/main/pipelines/platform-ui/docker-build-run-unit-tests.yaml + creationTimestamp: null + labels: + appstudio.openshift.io/application: learning-resources-sc + appstudio.openshift.io/component: learning-resources-sc + pipelines.appstudio.openshift.io/type: build + name: learning-resources-sc-on-pull-request + namespace: hcc-platex-services-tenant +spec: + params: + - name: git-url + value: '{{source_url}}' + - name: revision + value: '{{revision}}' + - name: output-image + value: quay.io/redhat-user-workloads/hcc-platex-services-tenant/learning-resources-sc/learning-resources-sc:on-pr-{{revision}} + - name: image-expires-after + value: 5d + - name: dockerfile + value: build-tools/Dockerfile + - name: path-context + value: . + - name: unit-tests-script + value: | + #!/bin/bash + set -ex + + npm install + npm run lint + npm test -- --runInBand --no-cache + pipelineRef: + name: docker-build + taskRunTemplate: + serviceAccountName: build-pipeline-learning-resources-sc + workspaces: + - name: workspace + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + status: {} + - name: git-auth + secret: + secretName: '{{ git_auth_secret }}' +status: {} \ No newline at end of file diff --git a/.tekton/learning-resources-sc-push.yaml b/.tekton/learning-resources-sc-push.yaml new file mode 100644 index 00000000..20bb14fb --- /dev/null +++ b/.tekton/learning-resources-sc-push.yaml @@ -0,0 +1,60 @@ +apiVersion: tekton.dev/v1 +kind: PipelineRun +metadata: + annotations: + build.appstudio.openshift.io/repo: https://github.com/RedHatInsights/learning-resources?rev={{revision}} + build.appstudio.redhat.com/commit_sha: '{{revision}}' + build.appstudio.redhat.com/target_branch: '{{target_branch}}' + pipelinesascode.tekton.dev/cancel-in-progress: "false" + pipelinesascode.tekton.dev/max-keep-runs: "3" + pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch + == "security-compliance" + pipelinesascode.tekton.dev/pipeline: https://github.com/RedHatInsights/konflux-pipelines/raw/main/pipelines/platform-ui/docker-build-run-unit-tests.yaml + creationTimestamp: null + labels: + appstudio.openshift.io/application: learning-resources-sc + appstudio.openshift.io/component: learning-resources-sc + pipelines.appstudio.openshift.io/type: build + name: learning-resources-sc-on-push + namespace: hcc-platex-services-tenant +spec: + params: + - name: git-url + value: '{{source_url}}' + - name: revision + value: '{{revision}}' + - name: output-image + value: quay.io/redhat-user-workloads/hcc-platex-services-tenant/learning-resources-sc/learning-resources-sc:{{revision}} + - name: dockerfile + value: build-tools/Dockerfile + - name: path-context + value: . + - name: unit-tests-script + value: | + #!/bin/bash + set -ex + + npm install + npm run lint + npm test -- --runInBand --no-cache + pipelineRef: + name: docker-build + taskRunTemplate: + serviceAccountName: build-pipeline-learning-resources-sc + workspaces: + - name: workspace + volumeClaimTemplate: + metadata: + creationTimestamp: null + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + status: {} + - name: git-auth + secret: + secretName: '{{ git_auth_secret }}' +status: {} + \ No newline at end of file