Skip to content

Commit

Permalink
add tekton and hermetic build changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MohammadiIram committed Oct 18, 2024
1 parent 03f4635 commit 8f10173
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .tekton/odh-dashboard-v2-16-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ spec:
value: Dockerfile.konflux
- name: path-context
value: .
- name: prefetch-input
value: [{"type": "npm", "path": "."}, {"type": "npm", "path": "frontend"}, {"type": "npm", "path": "backend"}]
pipelineSpec:
description: |
This pipeline is ideal for building container images from a Containerfile while reducing network traffic.
Expand Down Expand Up @@ -101,7 +103,7 @@ spec:
description: Skip checks against built image
name: skip-checks
type: string
- default: "false"
- default: "true"
description: Execute the build with network isolation
name: hermetic
type: string
Expand Down
23 changes: 19 additions & 4 deletions .tekton/odh-dashboard-v2-16-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ 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
== "rhoai-2.16"
build.appstudio.openshift.io/build-nudge-files: "build/operator-nudging.yaml"
pipelinesascode.tekton.dev/on-cel-expression: |
event == "push"
&& target_branch == "rhoai-2.16"
&& ( !".tekton/**".pathChanged() || ".tekton/odh-dashboard-v2-16-push.yaml".pathChanged() )
creationTimestamp: null
labels:
appstudio.openshift.io/application: rhoai-v2-16
Expand All @@ -22,11 +25,13 @@ spec:
- name: revision
value: '{{revision}}'
- name: output-image
value: quay.io/redhat-user-workloads/rhoai-tenant/odh-dashboard-v2-16:{{revision}}
value: quay.io/rhoai/odh-dashboard-rhel8:{{target_branch}}
- name: dockerfile
value: Dockerfile.konflux
- name: path-context
value: .
- name: prefetch-input
value: [{"type": "npm", "path": "."}, {"type": "npm", "path": "frontend"}, {"type": "npm", "path": "backend"}]
pipelineSpec:
description: |
This pipeline is ideal for building container images from a Containerfile while reducing network traffic.
Expand Down Expand Up @@ -98,7 +103,7 @@ spec:
description: Skip checks against built image
name: skip-checks
type: string
- default: "false"
- default: "true"
description: Execute the build with network isolation
name: hermetic
type: string
Expand Down Expand Up @@ -232,6 +237,13 @@ spec:
- $(params.build-args[*])
- name: BUILD_ARGS_FILE
value: $(params.build-args-file)
- name: LABELS
value:
- version=v2.16.0
- url=$(params.git-url)
- release='$(tasks.clone-repository.results.commit-timestamp)'
- git.url=$(params.git-url)
- git.commit=$(params.revision)
runAfter:
- prefetch-dependencies
taskRef:
Expand Down Expand Up @@ -422,6 +434,9 @@ spec:
params:
- name: IMAGE
value: $(tasks.build-image-index.results.IMAGE_URL)
- name: ADDITIONAL_TAGS
value:
- '{{target_branch}}-{{revision}}'
runAfter:
- build-image-index
taskRef:
Expand Down

0 comments on commit 8f10173

Please sign in to comment.