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
72 stars 57 forks source link

Helm deployment issue with custom chartDir option #1038

Open BraisVQ opened 1 year ago

BraisVQ commented 1 year ago

Describe the bug One of the available customizations for Helm deployments is to specify the path where you have the Charts. This feature works fine but if you have your charts not in a folder on the root of your repository but in a subfolder inside it once you start a release with orchestration pipeline it will fail to find the DeploymentDescriptor.

To Reproduce Steps to reproduce the behavior:

  1. Configure a repository with helm charts
  2. store the charts in a folder like helm/elasticsearch-backup-pvc
  3. Start a release pipeline (orchestration)
  4. See error in QA (pipeline will finish successfully but no helm chart will be deployed)

Expected behavior Pipeline should deploy Helm chart successfully regardless of the path it is stored so long and it is configured using available customization options.

Screenshots image

image

Affected version:

Log Output

[Pipeline] findFiles
[Pipeline] echo
DEBUG: DeploymentDescriptors: [helm/elasticsearch-backup-pvc/ods-deployments.json, helm/ods-deployments.json]
[Pipeline] dir
Running in /tmp/workspace/qstestupdt-cd/qstestupdt-cd-qstestupdt-mro-pipeline-master/repositories/elasticsearch-infra/helm
[Pipeline] {
[Pipeline] fileExists

Aditional notes:

The issue is comming from this part of the code: https://github.com/opendevstack/ods-jenkins-shared-library/blob/master/src/org/ods/orchestration/phases/DeployOdsComponent.groovy#L131-L140