Skip to content

Commit

Permalink
FIX opendevstack#1038 Helm deployment issues with custom chartDir option
Browse files Browse the repository at this point in the history
This will bail out if the repository is ambigious about the deployment descriptor.

It will fail if:

* there is no deployment descriptor
* there is more than one deployment descriptor

For a successfull release to happen, developers are required to "clean" their repository of unrelated deployment desciptors that could interfere with the current version.
  • Loading branch information
serverhorror committed Oct 19, 2023
1 parent 11c5ee0 commit 074e5a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/org/ods/orchestration/phases/DeployOdsComponent.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,14 @@ class DeployOdsComponent {
}
}
}

// FIXME: This method does not support multiple deployment descriptors.
@TypeChecked(TypeCheckingMode.SKIP)
private String computeStartDir() {
List<File> files = steps.findFiles(glob: "**/${DeploymentDescriptor.FILE_NAME}")
logger.debug("DeploymentDescriptors: ${files}")
if (!files || files.size() == 0) {
// If we find anything but _exactly_ one deployment descriptor, we fail.
if (!files || files.size() != 1) {
throw new RuntimeException("Error: Could not determine starting directory. " +
"Neither of [chart, openshift, openshift-exported] found.")
} else {
Expand Down

0 comments on commit 074e5a6

Please sign in to comment.