Skip to content

Commit

Permalink
Add copy task for LICENSE and shared folder to fix konflux
Browse files Browse the repository at this point in the history
Signed-off-by: gabriel-farache <[email protected]>
  • Loading branch information
gabriel-farache committed Oct 22, 2024
1 parent 216c1eb commit 76ef6b4
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 53 deletions.
23 changes: 23 additions & 0 deletions .tekton/copy-task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: copy
namespace: orchestrator-releng-tenant
spec:
workspaces:
- name: workspace
params:
- name: workflowId
description: The workflow ID from the repository
type: string
steps:
- name: copy
image: registry.access.redhat.com/ubi9-minimal
workingDir: $(workspaces.workspace.path)
script: |
cp -R source/shared source/$(params.workflowId)/shared
cp source/LICENSE source/$(params.workflowId)/LICENSE
ls -al source/$(params.workflowId)
---
14 changes: 13 additions & 1 deletion .tekton/move2kube-serverless-workflow-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
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-cel-expression: event == "pull_request" && target_branch == "main" && ( "move2kube/***".pathChanged() || ".tekton/move2kube-serverless-workflow-pull-request.yaml".pathChanged() || "pipeline/workflow-builder.Dockerfile".pathChanged() )
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main" && ( "move2kube/***".pathChanged() || ".tekton/move2kube-serverless-workflow-pull-request.yaml".pathChanged() || ".tekton/copy-task.yaml".pathChanged() || "pipeline/workflow-builder.Dockerfile".pathChanged() )
creationTimestamp: null
labels:
appstudio.openshift.io/application: serverless-workflows
Expand Down Expand Up @@ -206,6 +206,17 @@ spec:
workspace: workspace
- name: git-basic-auth
workspace: git-auth
- name: copy-shared-files-and-folders
runAfter:
- clone-repository
taskRef:
name: copy
params:
- name: workflowId
value: $(params.path-context)
workspaces:
- name: source
workspace: workspace
- name: build-container
params:
- name: IMAGE
Expand All @@ -226,6 +237,7 @@ spec:
value: $(params.build-args-file)
runAfter:
- prefetch-dependencies
- copy-shared-files-and-folders
taskRef:
params:
- name: name
Expand Down
12 changes: 12 additions & 0 deletions .tekton/move2kube-serverless-workflow-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,17 @@ spec:
workspace: workspace
- name: git-basic-auth
workspace: git-auth
- name: copy-shared-files-and-folders
runAfter:
- clone-repository
taskRef:
name: copy
params:
- name: workflowId
value: $(params.path-context)
workspaces:
- name: source
workspace: workspace
- name: build-container
params:
- name: IMAGE
Expand All @@ -223,6 +234,7 @@ spec:
value: $(params.build-args-file)
runAfter:
- prefetch-dependencies
- copy-shared-files-and-folders
taskRef:
params:
- name: name
Expand Down
14 changes: 13 additions & 1 deletion .tekton/mta-serverless-workflow-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
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-cel-expression: event == "pull_request" && target_branch == "main" && ( "mta-v7.x/***".pathChanged() || ".tekton/mta-serverless-workflow-pull-request.yaml".pathChanged() || "pipeline/workflow-builder.Dockerfile".pathChanged() )
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main" && ( "mta-v7.x/***".pathChanged() || ".tekton/mta-serverless-workflow-pull-request.yaml".pathChanged() || ".tekton/copy-task.yaml".pathChanged() || "pipeline/workflow-builder.Dockerfile".pathChanged() )
creationTimestamp: null
labels:
appstudio.openshift.io/application: serverless-workflows
Expand Down Expand Up @@ -206,6 +206,17 @@ spec:
workspace: workspace
- name: git-basic-auth
workspace: git-auth
- name: copy-shared-files-and-folders
runAfter:
- clone-repository
taskRef:
name: copy
params:
- name: workflowId
value: $(params.path-context)
workspaces:
- name: source
workspace: workspace
- name: build-container
params:
- name: IMAGE
Expand All @@ -226,6 +237,7 @@ spec:
value: $(params.build-args-file)
runAfter:
- prefetch-dependencies
- copy-shared-files-and-folders
taskRef:
params:
- name: name
Expand Down
12 changes: 12 additions & 0 deletions .tekton/mta-serverless-workflow-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,17 @@ spec:
workspace: workspace
- name: git-basic-auth
workspace: git-auth
- name: copy-shared-files-and-folders
runAfter:
- clone-repository
taskRef:
name: copy
params:
- name: workflowId
value: $(params.path-context)
workspaces:
- name: source
workspace: workspace
- name: build-container
params:
- name: IMAGE
Expand All @@ -223,6 +234,7 @@ spec:
value: $(params.build-args-file)
runAfter:
- prefetch-dependencies
- copy-shared-files-and-folders
taskRef:
params:
- name: name
Expand Down
51 changes: 0 additions & 51 deletions e2e/mta.sh

This file was deleted.

0 comments on commit 76ef6b4

Please sign in to comment.