-
Notifications
You must be signed in to change notification settings - Fork 32
docs: add Auditable release #2912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| ## Context | ||
|
|
||
| In the context of the SAP BTP, Kyma runtime product, ensuring a reliable and auditable release process is crucial for maintaining software quality and compliance. An automated release pipeline not only streamlines the deployment process but also provides a clear audit trail of changes, approvals, and deployments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shorter and more direct:
| In the context of the SAP BTP, Kyma runtime product, ensuring a reliable and auditable release process is crucial for maintaining software quality and compliance. An automated release pipeline not only streamlines the deployment process but also provides a clear audit trail of changes, approvals, and deployments. | |
| To ensure the quality and compliance of the SAP BTP, Kyma runtime product, we must have a reliable and auditable release process. Our current process lacks a clear audit trail. |
|
|
||
| In the context of the SAP BTP, Kyma runtime product, ensuring a reliable and auditable release process is crucial for maintaining software quality and compliance. An automated release pipeline not only streamlines the deployment process but also provides a clear audit trail of changes, approvals, and deployments. | ||
|
|
||
| This document outlines the principles and practices for implementing auditable release automation within the Kyma runtime product environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This document outlines the principles and practices for implementing auditable release automation within the Kyma runtime product environment. | |
| This document proposes a new, automated release process that produces the required audit artifacts for changes, approvals, and deployments. |
|
|
||
| This document outlines the principles and practices for implementing auditable release automation within the Kyma runtime product environment. | ||
|
|
||
| ## Principles of Auditable Release Automation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ## Principles of Auditable Release Automation | |
| ## Audit Requirements |
|
|
||
| ## Principles of Auditable Release Automation | ||
|
|
||
| For auditing purposes, each release must provide successful test result artifacts. This includes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| For auditing purposes, each release must provide successful test result artifacts. This includes: | |
| To pass an audit, the release process must produce the following artifacts: |
|
|
||
| ### Test Execution Reports | ||
|
|
||
| Test execution reports should be downloaded for both unit tests and end-to-end (E2E) tests from corresponding GitHub Workflow executions and retained for audit purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we switch to active voice?
| Test execution reports should be downloaded for both unit tests and end-to-end (E2E) tests from corresponding GitHub Workflow executions and retained for audit purposes. | |
| The release workflow must download and retain the execution reports for all unit and end-to-end (E2E) tests from their corresponding GitHub workflow runs. |
|
|
||
| ### Docker Images | ||
|
|
||
| The Docker image used for testing and release should be reproducible and traceable. The current release pipeline builds two Docker images: first for testing and second for release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The Docker image used for testing and release should be reproducible and traceable. The current release pipeline builds two Docker images: first for testing and second for release. | |
| The Docker image used for testing must be the exact same image that is used for the release. Our release process must produce reproducible and traceable images. |
|
|
||
| The Docker image used for testing and release should be reproducible and traceable. The current release pipeline builds two Docker images: first for testing and second for release. | ||
|
|
||
| **Current Flow:** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| **Current Flow:** | |
| **Current Flow:** | |
| Our current release pipeline builds two separate images: |
| The Docker image used for testing and release should be reproducible and traceable. The current release pipeline builds two Docker images: first for testing and second for release. | ||
|
|
||
| **Current Flow:** | ||
| - First Docker image is built during release preparation PR and pushed to the Kyma dev registry with a unique PR tag and digest SHA. This image is used for running unit and E2E tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - First Docker image is built during release preparation PR and pushed to the Kyma dev registry with a unique PR tag and digest SHA. This image is used for running unit and E2E tests. | |
| - The release preparation workflow builds a Docker image from a PR and pushes it to the Kyma dev registry with a unique PR tag and digest SHA. This image is used to run unit and E2E tests. |
|
|
||
| **Current Flow:** | ||
| - First Docker image is built during release preparation PR and pushed to the Kyma dev registry with a unique PR tag and digest SHA. This image is used for running unit and E2E tests. | ||
| - After successful tests, the second image is built for release using the same Dockerfile and source code, but tagged with release version and pushed to the production registry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - After successful tests, the second image is built for release using the same Dockerfile and source code, but tagged with release version and pushed to the production registry. | |
| - After successful tests, the release workflow builds a new image from the same Dockerfile and source code, tags it with the release version and pushes it to the production registry. |
| Both images currently receive different digests due to different build environments and timestamps, despite having identical content and application binary. This behavior is not acceptable for auditable release automation. | ||
|
|
||
| **Resolution:** | ||
| Implement deterministic Docker builds to ensure PR and release images produce identical digests when built from the same source code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Implement deterministic Docker builds to ensure PR and release images produce identical digests when built from the same source code. | |
| We must implement deterministic Docker builds. An image built from a PR must have the identical digest as the final release image built from the same source code. This makes the build process auditable. |
| ### Test Execution Reports | ||
|
|
||
| Test execution reports should be downloaded for both unit tests and end-to-end (E2E) tests from corresponding GitHub Workflow executions and retained for audit purposes. | ||
| Test execution reports should be downloaded for unit tests, end-to-end (E2E) tests, and Gardener Integration tests from corresponding GitHub Workflow executions and retained for audit purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Test execution reports should be downloaded for unit tests, end-to-end (E2E) tests, and Gardener Integration tests from corresponding GitHub Workflow executions and retained for audit purposes. | |
| Test execution reports should be downloaded for unit tests, end-to-end (E2E) tests, and Gardener integration tests from corresponding GitHub Workflow executions and retained for audit purposes. |
|
|
||
| ### Download Test Reports | ||
|
|
||
| The test reports from unit tests, E2E tests, and Gardener tests should be downloaded from the respective GitHub Actions workflows and stored as artifacts for audit purposes. For this pupose, a new re-usable workflow created to download and store test reports based on workflow run ID and job name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should or must? Or simply, "We create a reusable workflow that downloads the test results from... based on... and stores them..."
(I'm not sure which of the actions is "based on run ID and job name", the downloading or the storing?)
| ### Download Test Reports | ||
|
|
||
| The test reports from unit tests, E2E tests, and Gardener tests should be downloaded from the respective GitHub Actions workflows and stored as artifacts for audit purposes. For this pupose, a new re-usable workflow created to download and store test reports based on workflow run ID and job name. | ||
| The new workflow can be called from the release PR workflow after test jobs are completed successfully and upload to the pre-configured GCP bucket for audit retention as desccribed [here](https://github.tools.sap/kyma/backlog/issues/8419). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clarify who/what is uploaded by whom. Not sure what "upload" in the middle of this sentence means. Thus, the following is probably wrong:
| The new workflow can be called from the release PR workflow after test jobs are completed successfully and upload to the pre-configured GCP bucket for audit retention as desccribed [here](https://github.tools.sap/kyma/backlog/issues/8419). | |
| After test jobs are completed successfully, the new workflow is called from the release PR workflow and uploaded to the pre-configured GCP bucket for audit retention (see [Archive Test Logs for 12-Month Auditing via Release Assets #8419](https://github.tools.sap/kyma/backlog/issues/8419). |
| The new workflow can be called from the release PR workflow after test jobs are completed successfully and upload to the pre-configured GCP bucket for audit retention as desccribed [here](https://github.tools.sap/kyma/backlog/issues/8419). | ||
|
|
||
| ### Deterministic Docker Builds | ||
| To achieve deterministic Docker builds, the following strategies can be employed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To achieve deterministic Docker builds, the following strategies can be employed: | |
| To achieve deterministic Docker builds, we consider the following strategies: |
| ### Deterministic Docker Builds | ||
| To achieve deterministic Docker builds, the following strategies can be employed: | ||
|
|
||
| - **Reproducible Build Tools**: Utilize tools and techniques that support reproducible builds, such as Docker's BuildKit option, which have to be implemented by the `Image-Builder`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - **Reproducible Build Tools**: Utilize tools and techniques that support reproducible builds, such as Docker's BuildKit option, which have to be implemented by the `Image-Builder`. | |
| - **Reproducible Build Tools**: Utilize tools and techniques that support reproducible builds, such as Docker's BuildKit option, which must be implemented by the `Image-Builder`. |
| To achieve deterministic Docker builds, the following strategies can be employed: | ||
|
|
||
| - **Reproducible Build Tools**: Utilize tools and techniques that support reproducible builds, such as Docker's BuildKit option, which have to be implemented by the `Image-Builder`. | ||
| - **Copy Release PR Image**: As an alternative to reproducible builds, the release process can be modified to copy the Docker image built during the release PR directly to the production registry with the release tag. This approach ensures that the same image used for testing is released, maintaining identical digests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - **Copy Release PR Image**: As an alternative to reproducible builds, the release process can be modified to copy the Docker image built during the release PR directly to the production registry with the release tag. This approach ensures that the same image used for testing is released, maintaining identical digests. | |
| - **Copy Release PR Image**: As an alternative to reproducible builds, we can modify the release process to copy the Docker image built during the release PR directly to the production registry with the release tag. This approach ensures that the same image used for testing is released, maintaining identical digests. |
Description
Changes proposed in this pull request (what was done and why):
Changes refer to particular issues, PRs or documents:
Traceability
Related Issuessection.