Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check-buildah-remote.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Validate PR - buildah-remote
on:
'on':
pull_request:
branches: [main]
jobs:
Expand Down
10 changes: 8 additions & 2 deletions .tekton/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ spec:
taskRef:
name: git-clone
workspaces:
- name: output
- name: source
workspace: workspace
- name: artifacts
workspace: workspace
params:
- name: url
Expand Down Expand Up @@ -58,7 +60,9 @@ spec:
taskRef:
name: sast-snyk-check
workspaces:
- name: workspace
- name: source
workspace: workspace
- name: artifacts
workspace: workspace
- name: build-container
runAfter:
Expand All @@ -73,6 +77,8 @@ spec:
workspaces:
- name: source
workspace: workspace
- name: artifacts
workspace: workspace
- name: check-partner-tasks
runAfter:
- build-container
Expand Down
6 changes: 5 additions & 1 deletion .tekton/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ spec:
taskRef:
name: git-clone
workspaces:
- name: output
- name: source
workspace: workspace
- name: artifacts
workspace: workspace
- name: build-container
params:
Expand All @@ -48,6 +50,8 @@ spec:
name: buildah
workspaces:
- name: source
emptyDir: {}
- name: artifacts
workspace: workspace
- name: build-bundles
params:
Expand Down
2 changes: 1 addition & 1 deletion pipelines/docker-build-dance/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
taskRef:
name: acs-image-check
workspaces:
- name: workspace
- name: source
workspace: workspace
- op: add
path: /spec/tasks/-
Expand Down
4 changes: 4 additions & 0 deletions pipelines/docker-build/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
value: "$(params.image-expires-after)"
- name: COMMIT_SHA
value: "$(tasks.clone-repository.results.commit)"
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- op: add
path: /spec/results/-
value:
Expand Down
8 changes: 6 additions & 2 deletions pipelines/fbc-builder/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
value: "$(params.image-expires-after)"
- name: COMMIT_SHA
value: "$(tasks.clone-repository.results.commit)"
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- op: add
path: /spec/tasks/-
value:
Expand Down Expand Up @@ -70,7 +74,7 @@
- name: BASE_IMAGE
value: $(tasks.inspect-image.results.BASE_IMAGE)
workspaces:
- name: workspace
- name: source
workspace: workspace
- op: add
path: /spec/tasks/-
Expand All @@ -86,7 +90,7 @@
name: fbc-related-image-check
version: "0.1"
workspaces:
- name: workspace
- name: source
workspace: workspace
# - op: remove
# # build-source-image as source images are not needed for FBC components
Expand Down
4 changes: 4 additions & 0 deletions pipelines/java-builder/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
value: "$(params.image-expires-after)"
- name: COMMIT_SHA
value: "$(tasks.clone-repository.results.commit)"
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
- op: add
path: /spec/results/-
value:
Expand Down
4 changes: 4 additions & 0 deletions pipelines/nodejs-builder/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@
value: "$(params.image-expires-after)"
- name: COMMIT_SHA
value: "$(tasks.clone-repository.results.commit)"
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
2 changes: 1 addition & 1 deletion pipelines/prototypes/prototype-build-compliance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
taskRef:
name: git-clone
workspaces:
- name: output
- name: source
workspace: workspace
- name: basic-auth
workspace: git-auth
Expand Down
4 changes: 4 additions & 0 deletions pipelines/tekton-bundle-builder/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ patches:
value: $(params.output-image)
- name: CONTEXT
value: $(params.path-context)
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
# Remove tasks that assume a binary image
- op: remove
path: /spec/tasks/9 # sbom-json-check
Expand Down
36 changes: 27 additions & 9 deletions pipelines/template-build/template-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,18 @@ spec:
name: git-clone
version: "0.1"
workspaces:
- name: output
- name: source
workspace: workspace
- name: basic-auth
workspace: git-auth
- name: prefetch-dependencies
when:
- input: $(params.hermetic)
operator: in
values: ["true"]
params:
- name: input
value: $(params.prefetch-input)
- name: hermetic
value: $(params.hermetic)
- name: SOURCE_ARTIFACT
value: $(tasks.clone-repository.results.SOURCE_ARTIFACT)
runAfter:
- clone-repository
taskRef:
Expand All @@ -106,12 +106,17 @@ spec:
- input: $(tasks.init.results.build)
operator: in
values: ["true"]
runAfter:
- prefetch-dependencies
params:
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
taskRef:
name: $REPLACE_ME
workspaces:
- name: source
emptyDir: {}
- name: artifacts
workspace: workspace
- name: build-source-image
when:
Expand All @@ -131,8 +136,14 @@ spec:
value: "$(params.output-image)"
- name: BASE_IMAGES
value: "$(tasks.build-container.results.BASE_IMAGES_DIGESTS)"
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
workspaces:
- name: workspace
- name: source
emptyDir: {}
- name: artifacts
workspace: workspace
- name: deprecated-base-image-check
when:
Expand Down Expand Up @@ -167,13 +178,20 @@ spec:
- input: $(params.skip-checks)
operator: in
values: ["false"]
params:
- name: SOURCE_ARTIFACT
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
- name: CACHI2_ARTIFACT
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
runAfter:
- clone-repository
taskRef:
name: sast-snyk-check
version: "0.1"
workspaces:
- name: workspace
- name: source
emptyDir: {}
- name: artifacts
workspace: workspace
- name: clamav-scan
when:
Expand Down
4 changes: 2 additions & 2 deletions task/buildah-10gb/0.1/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
path: /metadata/name
value: buildah-10gb
- op: replace
path: /spec/steps/0/computeResources/limits/memory
path: /spec/steps/1/computeResources/limits/memory
value: 10Gi
- op: replace
path: /spec/steps/0/computeResources/requests/memory
path: /spec/steps/1/computeResources/requests/memory
value: 8Gi
4 changes: 2 additions & 2 deletions task/buildah-6gb/0.1/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
path: /metadata/name
value: buildah-6gb
- op: replace
path: /spec/steps/0/computeResources/limits/memory
path: /spec/steps/1/computeResources/limits/memory
value: 6Gi
- op: replace
path: /spec/steps/0/computeResources/requests/memory
path: /spec/steps/1/computeResources/requests/memory
value: 4Gi
4 changes: 2 additions & 2 deletions task/buildah-8gb/0.1/patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
path: /metadata/name
value: buildah-8gb
- op: replace
path: /spec/steps/0/computeResources/limits/memory
path: /spec/steps/1/computeResources/limits/memory
value: 8Gi
- op: replace
path: /spec/steps/0/computeResources/requests/memory
path: /spec/steps/1/computeResources/requests/memory
value: 6Gi
22 changes: 22 additions & 0 deletions task/buildah-remote/0.1/buildah-remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ spec:
description: Target path on the container in which yum repository files should
be made available
name: YUM_REPOS_D_TARGET
- default: ""
description: The source trusted artifact URI
name: SOURCE_ARTIFACT
type: string
- default: ""
description: The prefetched dependencies trusted artifact URI
name: CACHI2_ARTIFACT
type: string
- description: The platform to build on
name: PLATFORM
type: string
Expand Down Expand Up @@ -115,6 +123,15 @@ spec:
- name: BUILDER_IMAGE
value: $(params.BUILDER_IMAGE)
steps:
- args:
- use
- --store
- $(workspaces.artifacts.path)
- $(params.SOURCE_ARTIFACT)=$(workspaces.source.path)/source
- $(params.CACHI2_ARTIFACT)=$(workspaces.source.path)/cachi2
computeResources: {}
image: quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:dbcf0102d0e9f21c2bcb06dcaa9af680cb9151f1984f5cec1fb397e1356ae771
name: use-trusted-artifact
- computeResources:
limits:
memory: 4Gi
Expand Down Expand Up @@ -155,6 +172,7 @@ spec:
fi

rsync -ra $(workspaces.source.path)/ "$SSH_HOST:$BUILD_DIR/workspaces/source/"
rsync -ra $(workspaces.artifacts.path)/ "$SSH_HOST:$BUILD_DIR/workspaces/artifacts/"
rsync -ra "$HOME/.docker/" "$SSH_HOST:$BUILD_DIR/.docker/"
rsync -ra "/tekton/results/" "$SSH_HOST:$BUILD_DIR/tekton-results/"
cat >scripts/script-build.sh <<'REMOTESSHEOF'
Expand Down Expand Up @@ -276,11 +294,13 @@ spec:
-e YUM_REPOS_D_TARGET="$YUM_REPOS_D_TARGET" \
-e COMMIT_SHA="$COMMIT_SHA" \
-v "$BUILD_DIR/workspaces/source:$(workspaces.source.path):Z" \
-v "$BUILD_DIR/workspaces/artifacts:$(workspaces.artifacts.path):Z" \
-v "$BUILD_DIR/.docker/:/root/.docker:Z" \
-v "$BUILD_DIR/tekton-results/:/tekton/results:Z" \
-v $BUILD_DIR/scripts:/script:Z \
--user=0 --rm "$BUILDER_IMAGE" /script/script-build.sh
rsync -ra "$SSH_HOST:$BUILD_DIR/workspaces/source/" "$(workspaces.source.path)/"
rsync -ra "$SSH_HOST:$BUILD_DIR/workspaces/artifacts/" "$(workspaces.artifacts.path)/"
rsync -ra "$SSH_HOST:$BUILD_DIR/tekton-results/" "/tekton/results/"
buildah pull oci:rhtap-final-image
buildah images
Expand Down Expand Up @@ -452,3 +472,5 @@ spec:
workspaces:
- description: Workspace containing the source code to build.
name: source
- description: The trusted artifact store
name: artifacts
18 changes: 18 additions & 0 deletions task/buildah-rhtap/0.1/buildah-rhtap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ spec:
description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry)
name: TLSVERIFY
type: string
- name: SOURCE_ARTIFACT
type: string
description: The source trusted artifact URI
default: ""
- name: CACHI2_ARTIFACT
type: string
description: The prefetched dependencies trusted artifact URI
default: ""
results:
- description: Digest of the image just built
name: IMAGE_DIGEST
Expand All @@ -48,6 +56,14 @@ spec:
- name: TLSVERIFY
value: $(params.TLSVERIFY)
steps:
- name: use-trusted-artifact
image: quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:dbcf0102d0e9f21c2bcb06dcaa9af680cb9151f1984f5cec1fb397e1356ae771
args:
- use
- --store
- $(workspaces.artifacts.path)
- $(params.SOURCE_ARTIFACT)=$(workspaces.source.path)/source
- $(params.CACHI2_ARTIFACT)=$(workspaces.source.path)/cachi2
- name: build
image: registry.access.redhat.com/ubi9/buildah@sha256:04fde77ea72c25b56efb3f71db809c5d7b09938130df2da9175a3c888b94043d
script: |
Expand Down Expand Up @@ -172,3 +188,5 @@ spec:
workspaces:
- name: source
description: Workspace containing the source code to build.
- name: artifacts
description: The trusted artifact store
18 changes: 18 additions & 0 deletions task/buildah/0.1/buildah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ spec:
- name: YUM_REPOS_D_TARGET
description: Target path on the container in which yum repository files should be made available
default: /etc/yum.repos.d
- name: SOURCE_ARTIFACT
type: string
description: The source trusted artifact URI
default: ""
- name: CACHI2_ARTIFACT
type: string
description: The prefetched dependencies trusted artifact URI
default: ""
results:
- description: Digest of the image just built
name: IMAGE_DIGEST
Expand Down Expand Up @@ -105,6 +113,14 @@ spec:
- name: YUM_REPOS_D_TARGET
value: $(params.YUM_REPOS_D_TARGET)
steps:
- name: use-trusted-artifact
image: quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:dbcf0102d0e9f21c2bcb06dcaa9af680cb9151f1984f5cec1fb397e1356ae771
args:
- use
- --store
- $(workspaces.artifacts.path)
- $(params.SOURCE_ARTIFACT)=$(workspaces.source.path)/source
- $(params.CACHI2_ARTIFACT)=$(workspaces.source.path)/cachi2
- image: $(params.BUILDER_IMAGE)
# per https://kubernetes.io/docs/concepts/containers/images/#imagepullpolicy-defaulting
# the cluster will set imagePullPolicy to IfNotPresent; our default param above specifies a digest
Expand Down Expand Up @@ -392,3 +408,5 @@ spec:
workspaces:
- name: source
description: Workspace containing the source code to build.
- name: artifacts
description: The trusted artifact store
Loading