From df1f8223317239131e83ab79c554fa40516cf1ef Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Mon, 30 Dec 2024 13:20:43 -0500 Subject: [PATCH] Fix mgmt repo inference It wasn't being properly used when creating the pr. Also bumps cli --- Dockerfile | 2 +- lib/console/deployments/pr/dispatcher.ex | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c6b77fae87..8b9479178c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -69,7 +69,7 @@ ARG TARGETARCH=amd64 # ENV TERRAFORM_VERSION=v1.9.8 # renovate: datasource=github-releases depName=pluralsh/plural-cli -ENV CLI_VERSION=v0.10.3 +ENV CLI_VERSION=v0.11.1 # renovate: datasource=github-tags depName=kubernetes/kubernetes # ENV KUBECTL_VERSION=v1.31.3 diff --git a/lib/console/deployments/pr/dispatcher.ex b/lib/console/deployments/pr/dispatcher.ex index 839ea3ddcc..005f33d6f6 100644 --- a/lib/console/deployments/pr/dispatcher.ex +++ b/lib/console/deployments/pr/dispatcher.ex @@ -36,8 +36,9 @@ defmodule Console.Deployments.Pr.Dispatcher do @spec create(PrAutomation.t, binary, map) :: pr_resp def create(%PrAutomation{} = pr, branch, ctx) when is_binary(branch) do %PrAutomation{connection: conn} = pr = Repo.preload(pr, [:connection, :repository]) + pr = put_in(pr.identifier, resolve_repo(pr.identifier)) impl = dispatcher(conn) - with {:ok, conn} <- setup(%{conn | branch: pr.branch}, resolve_repo(pr.identifier), branch), + with {:ok, conn} <- setup(%{conn | branch: pr.branch}, pr.identifier, branch), {:ok, f} <- Config.config(pr, branch, ctx), {:ok, ext} <- external_git(pr), {:ok, _} <- Plural.template(f, conn.dir, ext),