opendevstack / ods-jenkins-shared-library

Shared Jenkins library which all ODS projects & components use - provisioning, SonarQube code scanning, Nexus publishing, OpenShift template based deployments and repository orchestration
Apache License 2.0
70 stars 57 forks source link

Dead code or undocumented repo type? #555

Open michaelsauter opened 3 years ago

michaelsauter commented 3 years ago

I've come across https://github.com/opendevstack/ods-jenkins-shared-library/blob/master/src/org/ods/orchestration/util/MROPipelineUtil.groovy#L343-L362.

That part is, to my understanding, only executed if the repo is not of type ods, ods-service or ods-test (based on the if conditions above). However, according to the docs (https://github.com/opendevstack/ods-jenkins-shared-library/blob/master/docs/modules/jenkins-shared-library/pages/orchestration-pipeline.adoc#configuration) there are only 3 repo types: ods, ods-service and ods-test.

Which makes me wonder if the shell script / Makefile part is dead code and can be removed, or if there is an undocumented component type, or if I am just confused and don't understand the code.

@metmajer do you know more on this?

clemensutschig commented 3 years ago

I think it's dead code (as we somewhere default the type to ods from what I remember ... )

            // Set repo type, if not provided
            if (!repo.type?.trim()) {
                repo.type = MROPipelineUtil.PipelineConfig.REPO_TYPE_ODS_CODE
            }
clemensutschig commented 3 years ago

so we should introduce makefile and shellscript imho

metmajer commented 3 years ago

You're right @michaelsauter. This stems from the first executor implementation which happened before the ods type got integrated. Then, ods became a default as indicated by @clemensutschig which rendered this block a dead code in the end. I would like to see this get revitalised ;-) but this would require a new component type that integrates with the Release Manager.