Skip to content

Commit

Permalink
Red Hat Trusted App Pipeline update image-controller (#75)
Browse files Browse the repository at this point in the history
Red Hat Trusted App Pipeline update image-controller

---------

Co-authored-by: red-hat-trusted-app-pipeline <[email protected]>
Co-authored-by: Mykola Morhun <[email protected]>
  • Loading branch information
3 people authored Oct 30, 2023
1 parent 76665ac commit d8e8446
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 34 deletions.
60 changes: 43 additions & 17 deletions .tekton/image-controller-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
pipelinesascode.tekton.dev/on-target-branch: '[main]'
creationTimestamp: null
labels:
appstudio.openshift.io/application: build
appstudio.openshift.io/application: image-controller
appstudio.openshift.io/component: image-controller
pipelines.appstudio.openshift.io/type: build
name: image-controller-on-pull-request
Expand All @@ -25,7 +25,7 @@ spec:
- name: image-expires-after
value: 5d
- name: output-image
value: quay.io/redhat-user-workloads/rhtap-build-tenant/build/image-controller:on-pr-{{revision}}
value: quay.io/redhat-user-workloads/rhtap-build-tenant/image-controller/image-controller:on-pr-{{revision}}
- name: path-context
value: .
- name: revision
Expand Down Expand Up @@ -80,11 +80,13 @@ spec:
name: output-image
type: string
- default: .
description: The path to your source code
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
description: Path to the Dockerfile inside the context specified by parameter
path-context
name: dockerfile
type: string
- default: "false"
Expand All @@ -111,14 +113,14 @@ spec:
description: Java build
name: java
type: string
- default: ""
description: Snyk Token Secret Name
name: snyk-secret
type: string
- default: ""
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
results:
- description: ""
name: IMAGE_URL
Expand Down Expand Up @@ -232,7 +234,7 @@ spec:
- name: name
value: buildah
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-buildah:0.1@sha256:93c318074716173ac4f77ec873fc2ab58fc102c8c49d525e7f7d6a12c13338c1
value: quay.io/redhat-appstudio-tekton-catalog/task-buildah:0.1@sha256:f41166f57c7bf33f598d6c7436af8890c4d483419f4346e67037c7a5f850c367
- name: kind
value: task
resolver: bundles
Expand All @@ -244,6 +246,35 @@ spec:
workspaces:
- name: source
workspace: workspace
- name: build-source-image
params:
- name: BINARY_IMAGE
value: $(params.output-image)
- name: BASE_IMAGES
value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS)
runAfter:
- build-container
taskRef:
params:
- name: name
value: source-build
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-source-build:0.1@sha256:e751a76622743cf51b35ba230768be9886535b7cf51491c2b8513979e7a577d8
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- input: $(params.build-source-image)
operator: in
values:
- "true"
workspaces:
- name: workspace
workspace: workspace
- name: inspect-image
params:
- name: IMAGE_URL
Expand Down Expand Up @@ -316,12 +347,14 @@ spec:
params:
- name: BASE_IMAGES_DIGESTS
value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS)
runAfter:
- build-container
taskRef:
params:
- name: name
value: deprecated-image-check
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-deprecated-image-check:0.3@sha256:d507b3441d6c039691aa75c18d30f5191febcdca8f7f57f6122d75bb2f6f585d
value: quay.io/redhat-appstudio-tekton-catalog/task-deprecated-image-check:0.3@sha256:35e2708505614397ede771474a2e2d6f04e911efc46afae47ca4a63e2f6fc9a0
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -353,9 +386,6 @@ spec:
values:
- "false"
- name: sast-snyk-check
params:
- name: SNYK_SECRET
value: $(params.snyk-secret)
runAfter:
- clone-repository
taskRef:
Expand All @@ -372,10 +402,6 @@ spec:
operator: in
values:
- "false"
- input: $(params.snyk-secret)
operator: notin
values:
- ""
workspaces:
- name: workspace
workspace: workspace
Expand Down
60 changes: 43 additions & 17 deletions .tekton/image-controller-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
pipelinesascode.tekton.dev/on-target-branch: '[main]'
creationTimestamp: null
labels:
appstudio.openshift.io/application: build
appstudio.openshift.io/application: image-controller
appstudio.openshift.io/component: image-controller
pipelines.appstudio.openshift.io/type: build
name: image-controller-on-push
Expand All @@ -22,7 +22,7 @@ spec:
- name: git-url
value: '{{repo_url}}'
- name: output-image
value: quay.io/redhat-user-workloads/rhtap-build-tenant/build/image-controller:{{revision}}
value: quay.io/redhat-user-workloads/rhtap-build-tenant/image-controller/image-controller:{{revision}}
- name: path-context
value: .
- name: revision
Expand Down Expand Up @@ -77,11 +77,13 @@ spec:
name: output-image
type: string
- default: .
description: The path to your source code
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
description: Path to the Dockerfile inside the context specified by parameter
path-context
name: dockerfile
type: string
- default: "false"
Expand All @@ -108,14 +110,14 @@ spec:
description: Java build
name: java
type: string
- default: ""
description: Snyk Token Secret Name
name: snyk-secret
type: string
- default: ""
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
results:
- description: ""
name: IMAGE_URL
Expand Down Expand Up @@ -229,7 +231,7 @@ spec:
- name: name
value: buildah
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-buildah:0.1@sha256:93c318074716173ac4f77ec873fc2ab58fc102c8c49d525e7f7d6a12c13338c1
value: quay.io/redhat-appstudio-tekton-catalog/task-buildah:0.1@sha256:f41166f57c7bf33f598d6c7436af8890c4d483419f4346e67037c7a5f850c367
- name: kind
value: task
resolver: bundles
Expand All @@ -241,6 +243,35 @@ spec:
workspaces:
- name: source
workspace: workspace
- name: build-source-image
params:
- name: BINARY_IMAGE
value: $(params.output-image)
- name: BASE_IMAGES
value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS)
runAfter:
- build-container
taskRef:
params:
- name: name
value: source-build
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-source-build:0.1@sha256:e751a76622743cf51b35ba230768be9886535b7cf51491c2b8513979e7a577d8
- name: kind
value: task
resolver: bundles
when:
- input: $(tasks.init.results.build)
operator: in
values:
- "true"
- input: $(params.build-source-image)
operator: in
values:
- "true"
workspaces:
- name: workspace
workspace: workspace
- name: inspect-image
params:
- name: IMAGE_URL
Expand Down Expand Up @@ -313,12 +344,14 @@ spec:
params:
- name: BASE_IMAGES_DIGESTS
value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS)
runAfter:
- build-container
taskRef:
params:
- name: name
value: deprecated-image-check
- name: bundle
value: quay.io/redhat-appstudio-tekton-catalog/task-deprecated-image-check:0.3@sha256:d507b3441d6c039691aa75c18d30f5191febcdca8f7f57f6122d75bb2f6f585d
value: quay.io/redhat-appstudio-tekton-catalog/task-deprecated-image-check:0.3@sha256:35e2708505614397ede771474a2e2d6f04e911efc46afae47ca4a63e2f6fc9a0
- name: kind
value: task
resolver: bundles
Expand Down Expand Up @@ -350,9 +383,6 @@ spec:
values:
- "false"
- name: sast-snyk-check
params:
- name: SNYK_SECRET
value: $(params.snyk-secret)
runAfter:
- clone-repository
taskRef:
Expand All @@ -369,10 +399,6 @@ spec:
operator: in
values:
- "false"
- input: $(params.snyk-secret)
operator: notin
values:
- ""
workspaces:
- name: workspace
workspace: workspace
Expand Down

0 comments on commit d8e8446

Please sign in to comment.