Commit e2219b8c authored by Yann D'Isanto's avatar Yann D'Isanto
Browse files

fix(bluegreen): handle path when mapping routes

parent b198a6ef
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -494,9 +494,11 @@ stages:
            route=${route//((appname))/$app_target}
            route=${route//((hostname))/$hostname_target}
            # extract hostname and domain
            route_host=${route%%.*}
            route_domain=${route#*.}
            cf map-route "$app_tmp" "$route_domain" --hostname "$route_host"
            route_host=$(echo "$route" | cut -d '.' -f1)
            route_domain_and_path=$(echo "$route" | cut -d '.' -f2-)
            route_domain=$(echo "$route_domain_and_path" | cut -d '/' -f1)
            route_path=$(echo "$route_domain_and_path" | cut -d '/' -s -f2-)
            cf map-route "$app_tmp" "$route_domain" --hostname "$route_host" ${route_path:+--path "$route_path"}
        done
    else
        # map route from env