opendevstack / ods-pipeline

Alternative ODS CI/CD pipeline based on Tekton / OpenShift Pipelines
Apache License 2.0
13 stars 5 forks source link

Enforce successful pipeline run for parent repo as well #692

Open michaelsauter opened 1 year ago

michaelsauter commented 1 year ago

Right now, when an artifact-source is configured for the pipeline of an umbrella repo, it is ensured that all configured subrepos have a successful pipeline run for the checked out commit. This ensures that e.g. image promotion to the target namespace works as expected.

What is currently not implemented is a similar check for the umbrella repo itself. For an umbrella repo this may not be crucial, but for the case where there is only a single repo, this feature is important. When there is no umbrella repo, merges must be done using fast-forward in order not to loose artifacts during promotion. Therefore, ODS Pipeline should check for this to avoid surprises.

As a consequence, Git merge operations which result in promotion must be done using fast-forward. I think this is fine, as that is the safest way to promote.

A further consequence is that the example project doc must be adjusted as there must be a pipeline run pushing artifacts into the Nexus dev repo, otherwise going to QA does not work. This is also fine as it enforces a good workflow (opening a PR to go to QA).