Skip to content

Commit

Permalink
Add buildah-*gb 0.2
Browse files Browse the repository at this point in the history
Steps:

    for task in task/buildah-*gb; do
        cp -r $task/0.1/. $task/0.2
        sed -i 's;buildah/0.1;buildah/0.2;' $task/0.2/kustomization.yaml
        cp task/buildah/0.2/MIGRATION.md $task/0.2
    done

Signed-off-by: Adam Cmiel <[email protected]>
  • Loading branch information
chmeliik committed Jul 17, 2024
1 parent 13d2111 commit c7dff6c
Show file tree
Hide file tree
Showing 15 changed files with 331 additions and 0 deletions.
46 changes: 46 additions & 0 deletions task/buildah-10gb/0.2/MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Migration from 0.1 to 0.2

Version 0.2:

* Removes the `BASE_IMAGES_DIGESTS` result. Please remove all the references to this
result from your pipeline.
* Base images and their digests can be found in the SBOM for the output image.
* No longer writes the `base_images_from_dockerfile` file into the `source` workspace.

## Konflux-specific

In a typical Konflux pipeline, the two tasks that used to depend on the `BASE_IMAGES_DIGESTS`
result are `build-source-image` and `deprecated-base-image-check`.

1. Make sure your version of `deprecated-base-image-check` is at least `0.4`.
2. Make sure your version of `build-source-image` supports reading base images from
the SBOM. Version `0.1` supports it since 2024-07-15. In the logs of your build
pipeline, you should see that the build-source-image task now has a GET-BASE-IMAGES
step. Once you stop passing the `BASE_IMAGES_DIGESTS` param, this step will emit
logs about handling the SBOM.
3. Remove the parameters that reference the `BASE_IMAGES_DIGESTS` result:

```diff
@@ -255,10 +255,8 @@ spec:
- 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:
@@ -282,10 +280,8 @@ spec:
- name: workspace
workspace: workspace
- name: deprecated-base-image-check
params:
- - name: BASE_IMAGES_DIGESTS
- value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS)
- name: IMAGE_URL
value: $(tasks.build-container.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-container.results.IMAGE_DIGEST)
```
10 changes: 10 additions & 0 deletions task/buildah-10gb/0.2/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../buildah/0.2

patches:
- path: patch.yaml
target:
kind: Task
9 changes: 9 additions & 0 deletions task/buildah-10gb/0.2/patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- op: replace
path: /metadata/name
value: buildah-10gb
- op: replace
path: /spec/steps/0/computeResources/limits/memory
value: 10Gi
- op: replace
path: /spec/steps/0/computeResources/requests/memory
value: 8Gi
46 changes: 46 additions & 0 deletions task/buildah-20gb/0.2/MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Migration from 0.1 to 0.2

Version 0.2:

* Removes the `BASE_IMAGES_DIGESTS` result. Please remove all the references to this
result from your pipeline.
* Base images and their digests can be found in the SBOM for the output image.
* No longer writes the `base_images_from_dockerfile` file into the `source` workspace.

## Konflux-specific

In a typical Konflux pipeline, the two tasks that used to depend on the `BASE_IMAGES_DIGESTS`
result are `build-source-image` and `deprecated-base-image-check`.

1. Make sure your version of `deprecated-base-image-check` is at least `0.4`.
2. Make sure your version of `build-source-image` supports reading base images from
the SBOM. Version `0.1` supports it since 2024-07-15. In the logs of your build
pipeline, you should see that the build-source-image task now has a GET-BASE-IMAGES
step. Once you stop passing the `BASE_IMAGES_DIGESTS` param, this step will emit
logs about handling the SBOM.
3. Remove the parameters that reference the `BASE_IMAGES_DIGESTS` result:

```diff
@@ -255,10 +255,8 @@ spec:
- 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:
@@ -282,10 +280,8 @@ spec:
- name: workspace
workspace: workspace
- name: deprecated-base-image-check
params:
- - name: BASE_IMAGES_DIGESTS
- value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS)
- name: IMAGE_URL
value: $(tasks.build-container.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-container.results.IMAGE_DIGEST)
```
10 changes: 10 additions & 0 deletions task/buildah-20gb/0.2/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../buildah/0.2

patches:
- path: patch.yaml
target:
kind: Task
9 changes: 9 additions & 0 deletions task/buildah-20gb/0.2/patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- op: replace
path: /metadata/name
value: buildah-20gb
- op: replace
path: /spec/steps/0/computeResources/limits/memory
value: 20Gi
- op: replace
path: /spec/steps/0/computeResources/requests/memory
value: 16Gi
46 changes: 46 additions & 0 deletions task/buildah-24gb/0.2/MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Migration from 0.1 to 0.2

Version 0.2:

* Removes the `BASE_IMAGES_DIGESTS` result. Please remove all the references to this
result from your pipeline.
* Base images and their digests can be found in the SBOM for the output image.
* No longer writes the `base_images_from_dockerfile` file into the `source` workspace.

## Konflux-specific

In a typical Konflux pipeline, the two tasks that used to depend on the `BASE_IMAGES_DIGESTS`
result are `build-source-image` and `deprecated-base-image-check`.

1. Make sure your version of `deprecated-base-image-check` is at least `0.4`.
2. Make sure your version of `build-source-image` supports reading base images from
the SBOM. Version `0.1` supports it since 2024-07-15. In the logs of your build
pipeline, you should see that the build-source-image task now has a GET-BASE-IMAGES
step. Once you stop passing the `BASE_IMAGES_DIGESTS` param, this step will emit
logs about handling the SBOM.
3. Remove the parameters that reference the `BASE_IMAGES_DIGESTS` result:

```diff
@@ -255,10 +255,8 @@ spec:
- 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:
@@ -282,10 +280,8 @@ spec:
- name: workspace
workspace: workspace
- name: deprecated-base-image-check
params:
- - name: BASE_IMAGES_DIGESTS
- value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS)
- name: IMAGE_URL
value: $(tasks.build-container.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-container.results.IMAGE_DIGEST)
```
10 changes: 10 additions & 0 deletions task/buildah-24gb/0.2/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../buildah/0.2

patches:
- path: patch.yaml
target:
kind: Task
15 changes: 15 additions & 0 deletions task/buildah-24gb/0.2/patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- op: replace
path: /metadata/name
value: buildah-24gb
- op: replace
path: /spec/steps/0/computeResources/limits/memory
value: 24Gi
- op: replace
path: /spec/steps/0/computeResources/requests/memory
value: 20Gi
- op: replace
path: /spec/steps/0/computeResources/limits/cpu
value: "20"
- op: replace
path: /spec/steps/0/computeResources/requests/cpu
value: "10"
46 changes: 46 additions & 0 deletions task/buildah-6gb/0.2/MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Migration from 0.1 to 0.2

Version 0.2:

* Removes the `BASE_IMAGES_DIGESTS` result. Please remove all the references to this
result from your pipeline.
* Base images and their digests can be found in the SBOM for the output image.
* No longer writes the `base_images_from_dockerfile` file into the `source` workspace.

## Konflux-specific

In a typical Konflux pipeline, the two tasks that used to depend on the `BASE_IMAGES_DIGESTS`
result are `build-source-image` and `deprecated-base-image-check`.

1. Make sure your version of `deprecated-base-image-check` is at least `0.4`.
2. Make sure your version of `build-source-image` supports reading base images from
the SBOM. Version `0.1` supports it since 2024-07-15. In the logs of your build
pipeline, you should see that the build-source-image task now has a GET-BASE-IMAGES
step. Once you stop passing the `BASE_IMAGES_DIGESTS` param, this step will emit
logs about handling the SBOM.
3. Remove the parameters that reference the `BASE_IMAGES_DIGESTS` result:

```diff
@@ -255,10 +255,8 @@ spec:
- 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:
@@ -282,10 +280,8 @@ spec:
- name: workspace
workspace: workspace
- name: deprecated-base-image-check
params:
- - name: BASE_IMAGES_DIGESTS
- value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS)
- name: IMAGE_URL
value: $(tasks.build-container.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-container.results.IMAGE_DIGEST)
```
10 changes: 10 additions & 0 deletions task/buildah-6gb/0.2/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../buildah/0.2

patches:
- path: patch.yaml
target:
kind: Task
9 changes: 9 additions & 0 deletions task/buildah-6gb/0.2/patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- op: replace
path: /metadata/name
value: buildah-6gb
- op: replace
path: /spec/steps/0/computeResources/limits/memory
value: 6Gi
- op: replace
path: /spec/steps/0/computeResources/requests/memory
value: 4Gi
46 changes: 46 additions & 0 deletions task/buildah-8gb/0.2/MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Migration from 0.1 to 0.2

Version 0.2:

* Removes the `BASE_IMAGES_DIGESTS` result. Please remove all the references to this
result from your pipeline.
* Base images and their digests can be found in the SBOM for the output image.
* No longer writes the `base_images_from_dockerfile` file into the `source` workspace.

## Konflux-specific

In a typical Konflux pipeline, the two tasks that used to depend on the `BASE_IMAGES_DIGESTS`
result are `build-source-image` and `deprecated-base-image-check`.

1. Make sure your version of `deprecated-base-image-check` is at least `0.4`.
2. Make sure your version of `build-source-image` supports reading base images from
the SBOM. Version `0.1` supports it since 2024-07-15. In the logs of your build
pipeline, you should see that the build-source-image task now has a GET-BASE-IMAGES
step. Once you stop passing the `BASE_IMAGES_DIGESTS` param, this step will emit
logs about handling the SBOM.
3. Remove the parameters that reference the `BASE_IMAGES_DIGESTS` result:

```diff
@@ -255,10 +255,8 @@ spec:
- 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:
@@ -282,10 +280,8 @@ spec:
- name: workspace
workspace: workspace
- name: deprecated-base-image-check
params:
- - name: BASE_IMAGES_DIGESTS
- value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS)
- name: IMAGE_URL
value: $(tasks.build-container.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-container.results.IMAGE_DIGEST)
```
10 changes: 10 additions & 0 deletions task/buildah-8gb/0.2/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../buildah/0.2

patches:
- path: patch.yaml
target:
kind: Task
9 changes: 9 additions & 0 deletions task/buildah-8gb/0.2/patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- op: replace
path: /metadata/name
value: buildah-8gb
- op: replace
path: /spec/steps/0/computeResources/limits/memory
value: 8Gi
- op: replace
path: /spec/steps/0/computeResources/requests/memory
value: 6Gi

0 comments on commit c7dff6c

Please sign in to comment.