Przeglądaj źródła

Prevent docker based to render buildpack config and added branch to the rerun api call

jnfrati 4 lat temu
rodzic
commit
d79989f4c7

+ 11 - 6
dashboard/src/main/home/cluster-dashboard/expanded-chart/BuildSettingsTab.tsx

@@ -135,6 +135,7 @@ const BuildSettingsTab: React.FC<Props> = ({ chart }) => {
           git_installation_id: chart.git_action_config?.git_repo_id,
           git_installation_id: chart.git_action_config?.git_repo_id,
           owner: chart.git_action_config?.git_repo?.split("/")[0],
           owner: chart.git_action_config?.git_repo?.split("/")[0],
           name: chart.git_action_config?.git_repo?.split("/")[1],
           name: chart.git_action_config?.git_repo?.split("/")[1],
+          branch: chart.git_action_config?.git_branch,
           release_name: chart.name,
           release_name: chart.name,
         }
         }
       );
       );
@@ -279,12 +280,16 @@ const BuildSettingsTab: React.FC<Props> = ({ chart }) => {
           }}
           }}
         ></KeyValueArray>
         ></KeyValueArray>
 
 
-        <Heading>Buildpack settings</Heading>
-        <BuildpackConfigSection
-          currentChart={chart}
-          actionConfig={chart.git_action_config}
-          onChange={(buildConfig) => setBuildConfig(buildConfig)}
-        />
+        {chart.git_action_config.dockerfile_path ? (
+          <>
+            <Heading>Buildpack settings</Heading>
+            <BuildpackConfigSection
+              currentChart={chart}
+              actionConfig={chart.git_action_config}
+              onChange={(buildConfig) => setBuildConfig(buildConfig)}
+            />
+          </>
+        ) : null}
         <SaveButtonWrapper>
         <SaveButtonWrapper>
           <MultiSaveButton
           <MultiSaveButton
             options={[
             options={[

+ 4 - 0
dashboard/src/shared/api.tsx

@@ -1721,6 +1721,7 @@ const reRunGHWorkflow = baseApi<
     git_installation_id: number;
     git_installation_id: number;
     owner: string;
     owner: string;
     name: string;
     name: string;
+    branch: string;
     filename?: string;
     filename?: string;
     release_name?: string;
     release_name?: string;
   }
   }
@@ -1734,9 +1735,12 @@ const reRunGHWorkflow = baseApi<
     cluster_id,
     cluster_id,
     filename,
     filename,
     release_name,
     release_name,
+    branch,
   }) => {
   }) => {
     const queryParams = new URLSearchParams();
     const queryParams = new URLSearchParams();
 
 
+    queryParams.set("branch", branch);
+
     if (release_name) {
     if (release_name) {
       queryParams.set("release_name", release_name);
       queryParams.set("release_name", release_name);
     }
     }