Skip to content
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

[DO NOT REVIEW] Switch to submission validate #391

Conversation

mgoerens
Copy link
Contributor

No description provided.

This was referenced Sep 24, 2024
This was referenced Sep 25, 2024
@mgoerens mgoerens force-pushed the switch_to_submission_validate branch 6 times, most recently from d368703 to 6e89a01 Compare October 1, 2024 08:27
This PR refactors the certification pipeline by splitting the
chart-verifier job into three jobs, running sequentially:
- The new 'validate-submission' is responsible for extracting and
  validating all information related to a PR.
- The existing 'chart-verifier' job is now only responsible for running
  chart-verifier against the Chart source (if provided, or verifies the
  submitted report.yaml instead).
- The new 'manage-gh-pr' adds a comment on the PR, and merges it in case
  the pipeline was successfull.

This PR also introduces a new mechanism for passing information between
jobs. In addition to the existing GitHub outputs, a submission.json
artifact containing a json representation of the Submission object is
created in 'validate-submission'. Subsequent steps/jobs now have the
possibility to read from this file.

The main pursued goal behind this PR is to better separate concerns and
avoid mixed up logic, thus improving readability and clarity of our
pipeline and improve future maintainability and onboarding.

This PR also opens up the ability to reducde code deduplication and
redundant checks. In the interest of keeping this PR to a minimum, this
has not been fully done here. One example: get-verify-params.py
currently queries the GitHub API in order to get chart's information,
while they are already available in the submission.json artifact. This
rather trivial change is left for a future PR.

Note that the 'submission' python module is essentially replacing the
old 'checkpr' module. The only function remaining used by other modules
being 'get_file_match_compiled_patterns', it is moved to the 'reporegex'
module.

Closes openshift-helm-charts#296

Signed-off-by: Matthias Goerens <[email protected]>
@mgoerens mgoerens force-pushed the switch_to_submission_validate branch from 6e89a01 to 42852df Compare October 1, 2024 08:35
@mgoerens mgoerens closed this Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant