Skip to content

Commit

Permalink
Test computeResources at the task level
Browse files Browse the repository at this point in the history
Signed-off-by: Hugo Arès <[email protected]>
  • Loading branch information
hugares committed Aug 9, 2024
1 parent 2680275 commit 8badbad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
22 changes: 7 additions & 15 deletions task/buildah-remote/0.2/buildah-remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ metadata:
build.appstudio.redhat.com/build_type: docker
name: buildah-remote
spec:
computeResources:
limits:
memory: 4Gi
cpu: 4
requests:
memory: 2Gi
cpu: 1
description: |-
Buildah task builds source code into a container image and pushes the image into container registry using buildah tool.
In addition it generates a SBOM file, injects the SBOM file into final container image and pushes the SBOM file as separate image using cosign tool.
Expand Down Expand Up @@ -136,7 +143,6 @@ spec:
central.
name: JAVA_COMMUNITY_DEPENDENCIES
stepTemplate:
computeResources: {}
env:
- name: BUILDAH_FORMAT
value: oci
Expand Down Expand Up @@ -184,12 +190,6 @@ spec:
steps:
- args:
- $(params.BUILD_ARGS[*])
computeResources:
limits:
memory: 4Gi
requests:
cpu: 250m
memory: 512Mi
env:
- name: COMMIT_SHA
value: $(params.COMMIT_SHA)
Expand Down Expand Up @@ -476,7 +476,6 @@ spec:
name: ssh
readOnly: true
workingDir: $(workspaces.source.path)
- computeResources: {}
image: quay.io/redhat-appstudio/syft:v0.105.1@sha256:1910b829997650c696881e5fc2fc654ddf3184c27edb1b2024e9cb2ba51ac431
name: sbom-syft-generate
script: |
Expand All @@ -491,7 +490,6 @@ spec:
- mountPath: /shared
name: shared
workingDir: $(workspaces.source.path)/source
- computeResources: {}
image: quay.io/redhat-appstudio/hacbs-jvm-build-request-processor:127ee0c223a2b56a9bd20a6f2eaeed3bd6015f77
name: analyse-dependencies-java-sbom
script: |
Expand All @@ -508,7 +506,6 @@ spec:
name: varlibcontainers
- mountPath: /shared
name: shared
- computeResources: {}
image: registry.access.redhat.com/ubi9/python-39:1-192.1722518946@sha256:0176b477075984d5a502253f951d2502f0763c551275f9585ac515b9f241d73d
name: merge-syft-sboms
script: |
Expand Down Expand Up @@ -543,7 +540,6 @@ spec:
securityContext:
runAsUser: 0
workingDir: $(workspaces.source.path)
- computeResources: {}
image: quay.io/redhat-appstudio/cachi2:0.9.1@sha256:df67f9e063b544a8c49a271359377fed560562615e0278f6d0b9a3485f3f8fad
name: merge-cachi2-sbom
script: |
Expand All @@ -557,7 +553,6 @@ spec:
securityContext:
runAsUser: 0
workingDir: $(workspaces.source.path)
- computeResources: {}
image: registry.access.redhat.com/ubi9/python-39:1-192.1722518946@sha256:0176b477075984d5a502253f951d2502f0763c551275f9585ac515b9f241d73d
name: create-purl-sbom
script: |
Expand All @@ -575,7 +570,6 @@ spec:
securityContext:
runAsUser: 0
workingDir: $(workspaces.source.path)
- computeResources: {}
image: quay.io/redhat-appstudio/base-images-sbom-script@sha256:667669e3def018f9dbb8eaf8868887a40bc07842221e9a98f6787edcff021840
name: create-base-images-sbom
script: |
Expand All @@ -586,7 +580,6 @@ spec:
securityContext:
runAsUser: 0
workingDir: $(workspaces.source.path)
- computeResources: {}
image: quay.io/konflux-ci/buildah:latest@sha256:7cb5a35b7fe44e397fbf3b834f3bd8dcd9403a7c0a0b51469e6ec75b107d0846
name: inject-sbom-and-push
script: |
Expand Down Expand Up @@ -662,7 +655,6 @@ spec:
- --type
- cyclonedx
- $(params.IMAGE)
computeResources: {}
image: quay.io/redhat-appstudio/cosign:v2.1.1@sha256:c883d6f8d39148f2cea71bff4622d196d89df3e510f36c140c097b932f0dd5d5
name: upload-sbom
volumeMounts:
Expand Down
14 changes: 7 additions & 7 deletions task/buildah/0.2/buildah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ metadata:
tekton.dev/tags: "image-build, konflux"
name: buildah
spec:
computeResources:
limits:
memory: 4Gi
cpu: 4
requests:
memory: 2Gi
cpu: 1
description: |-
Buildah task builds source code into a container image and pushes the image into container registry using buildah tool.
In addition it generates a SBOM file, injects the SBOM file into final container image and pushes the SBOM file as separate image using cosign tool.
Expand Down Expand Up @@ -166,12 +173,6 @@ spec:
steps:
- image: quay.io/konflux-ci/buildah:latest@sha256:7cb5a35b7fe44e397fbf3b834f3bd8dcd9403a7c0a0b51469e6ec75b107d0846
name: build
computeResources:
limits:
memory: 4Gi
requests:
memory: 512Mi
cpu: 250m
env:
- name: COMMIT_SHA
value: $(params.COMMIT_SHA)
Expand Down Expand Up @@ -484,7 +485,6 @@ spec:

- name: inject-sbom-and-push
image: quay.io/konflux-ci/buildah:latest@sha256:7cb5a35b7fe44e397fbf3b834f3bd8dcd9403a7c0a0b51469e6ec75b107d0846
computeResources: {}
script: |
#!/bin/bash
set -e
Expand Down

0 comments on commit 8badbad

Please sign in to comment.