Commit 078019da authored by Guilhem Bonnefille's avatar Guilhem Bonnefille Committed by Pierre Smeyers
Browse files

fix: preserve priority even when mixing .yml and .yaml extensions

parent b8a759a8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -333,7 +333,7 @@ stages:

    if [[ "${K8S_KUSTOMIZE_ENABLED}" == "true" ]]
    then
      kustofile=$(ls -1 "$K8S_SCRIPTS_DIR/${environment_type}/kustomization.yaml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/kustomization.yaml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/${environment_type}/kustomization.yml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/kustomization.yml" 2>/dev/null || echo "")
      kustofile=$(ls -1 "$K8S_SCRIPTS_DIR/${environment_type}/kustomization.yml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/${environment_type}/kustomization.yaml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/kustomization.yml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/kustomization.yaml" 2>/dev/null || echo "")
      if [[ -z "$kustofile" ]]
      then
        log_error "--- kustomize enabled but nor ${environment_type}/kustomization.yaml neither kustomization.yaml was found"
@@ -550,7 +550,7 @@ stages:
    export environment_type=$1
    if [[ "$K8S_KUSTOMIZE_ENABLED" == "true" ]]
    then
      kustofile=$(ls -1 "$K8S_SCRIPTS_DIR/${environment_type}/kustomization.yaml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/kustomization.yaml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/${environment_type}/kustomization.yml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/kustomization.yml" 2>/dev/null || echo "")
      kustofile=$(ls -1 "$K8S_SCRIPTS_DIR/${environment_type}/kustomization.yml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/${environment_type}/kustomization.yaml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/kustomization.yml" 2>/dev/null || ls -1 "$K8S_SCRIPTS_DIR/kustomization.yaml" 2>/dev/null || echo "")
      if [[ -z "$kustofile" ]]
      then
        log_error "--- kustomize enabled but nor ${environment_type}/kustomization.yaml neither kustomization.yaml was found"