diff --git a/.tekton/fms-hf-tuning-pull-request.yaml b/.tekton/fms-hf-tuning-pull-request.yaml index 4ba64d9be..da2e6560d 100644 --- a/.tekton/fms-hf-tuning-pull-request.yaml +++ b/.tekton/fms-hf-tuning-pull-request.yaml @@ -7,10 +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" - && ( !".tekton/**".pathChanged() || ".tekton/fms-hf-tuning-pull-request.yaml".pathChanged() ) + pipelinesascode.tekton.dev/on-cel-expression: "event == \"pull_request\" \n&& target_branch == \"main\"\n&& ( !\".tekton/**\".pathChanged() || \".tekton/fms-hf-tuning-pull-request.yaml\".pathChanged() )\n" creationTimestamp: null labels: appstudio.openshift.io/application: fms-hf-tuning @@ -81,13 +78,11 @@ spec: name: output-image type: string - default: . - description: Path to the source code of an application's component from where - to build image. + description: Path to the source code of an application's component from where to build image. name: path-context type: string - default: Dockerfile - description: Path to the Dockerfile inside the context specified by parameter - path-context + description: Path to the Dockerfile inside the context specified by parameter path-context name: dockerfile type: string - default: "false" @@ -111,16 +106,14 @@ spec: name: java type: string - default: "" - description: Image tag expiration time, time values could be something like - 1h, 2d, 3w for hours, days, and weeks, respectively. + description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively. name: image-expires-after - default: "false" description: Build a source image. name: build-source-image type: string - default: "" - description: Path to a file with build arguments which will be passed to podman - during build + description: Path to a file with build arguments which will be passed to podman during build name: build-args-file type: string results: @@ -343,7 +336,7 @@ spec: - "false" - name: sast-snyk-check runAfter: - - clone-repository + - build-container taskRef: params: - name: name @@ -361,6 +354,11 @@ spec: workspaces: - name: workspace workspace: workspace + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) - name: clamav-scan params: - name: image-digest diff --git a/.tekton/fms-hf-tuning-push.yaml b/.tekton/fms-hf-tuning-push.yaml index 89564b71e..c76cb1377 100644 --- a/.tekton/fms-hf-tuning-push.yaml +++ b/.tekton/fms-hf-tuning-push.yaml @@ -6,10 +6,7 @@ metadata: 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-cel-expression: | - event == "push" - && target_branch == "main" - && (!".tekton/**".pathChanged() || ".tekton/fms-hf-tuning-push.yaml".pathChanged()) + pipelinesascode.tekton.dev/on-cel-expression: "event == \"push\" \n&& target_branch == \"main\"\n&& (!\".tekton/**\".pathChanged() || \".tekton/fms-hf-tuning-push.yaml\".pathChanged())\n" creationTimestamp: null labels: appstudio.openshift.io/application: fms-hf-tuning @@ -78,13 +75,11 @@ spec: name: output-image type: string - default: . - description: Path to the source code of an application's component from where - to build image. + description: Path to the source code of an application's component from where to build image. name: path-context type: string - default: Dockerfile - description: Path to the Dockerfile inside the context specified by parameter - path-context + description: Path to the Dockerfile inside the context specified by parameter path-context name: dockerfile type: string - default: "false" @@ -108,16 +103,14 @@ spec: name: java type: string - default: "" - description: Image tag expiration time, time values could be something like - 1h, 2d, 3w for hours, days, and weeks, respectively. + description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively. name: image-expires-after - default: "false" description: Build a source image. name: build-source-image type: string - default: "" - description: Path to a file with build arguments which will be passed to podman - during build + description: Path to a file with build arguments which will be passed to podman during build name: build-args-file type: string results: @@ -340,7 +333,7 @@ spec: - "false" - name: sast-snyk-check runAfter: - - clone-repository + - build-container taskRef: params: - name: name @@ -358,6 +351,11 @@ spec: workspaces: - name: workspace workspace: workspace + params: + - name: image-digest + value: $(tasks.build-container.results.IMAGE_DIGEST) + - name: image-url + value: $(tasks.build-container.results.IMAGE_URL) - name: clamav-scan params: - name: image-digest @@ -407,8 +405,8 @@ spec: - name: IMAGE value: $(tasks.build-container.results.IMAGE_URL) - name: ADDITIONAL_TAGS - value: - - '{{target_branch}}-{{revision}}' + value: + - '{{target_branch}}-{{revision}}' runAfter: - build-container taskRef: