|
@@ -90,7 +90,6 @@ const NewAppFlow: React.FC<Props> = ({ ...props }) => {
|
|
|
const [actionConfig, setActionConfig] = useState<GithubActionConfigType>({
|
|
const [actionConfig, setActionConfig] = useState<GithubActionConfigType>({
|
|
|
...defaultActionConfig,
|
|
...defaultActionConfig,
|
|
|
});
|
|
});
|
|
|
- const [procfileProcess, setProcfileProcess] = useState("");
|
|
|
|
|
const [branch, setBranch] = useState("");
|
|
const [branch, setBranch] = useState("");
|
|
|
const [repoType, setRepoType] = useState("");
|
|
const [repoType, setRepoType] = useState("");
|
|
|
const [dockerfilePath, setDockerfilePath] = useState(null);
|
|
const [dockerfilePath, setDockerfilePath] = useState(null);
|
|
@@ -99,7 +98,9 @@ const NewAppFlow: React.FC<Props> = ({ ...props }) => {
|
|
|
const [buildConfig, setBuildConfig] = useState();
|
|
const [buildConfig, setBuildConfig] = useState();
|
|
|
const [porterYaml, setPorterYaml] = useState("");
|
|
const [porterYaml, setPorterYaml] = useState("");
|
|
|
const [showGHAModal, setShowGHAModal] = useState<boolean>(false);
|
|
const [showGHAModal, setShowGHAModal] = useState<boolean>(false);
|
|
|
- const [porterJson, setPorterJson] = useState<z.infer<typeof PorterYamlSchema>>(null);
|
|
|
|
|
|
|
+ const [porterJson, setPorterJson] = useState<
|
|
|
|
|
+ z.infer<typeof PorterYamlSchema>
|
|
|
|
|
+ >(null);
|
|
|
|
|
|
|
|
const validatePorterYaml = (yamlString: string) => {
|
|
const validatePorterYaml = (yamlString: string) => {
|
|
|
let parsedYaml;
|
|
let parsedYaml;
|
|
@@ -129,9 +130,9 @@ const NewAppFlow: React.FC<Props> = ({ ...props }) => {
|
|
|
setCurrentStep(Math.max(currentStep, 4));
|
|
setCurrentStep(Math.max(currentStep, 4));
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
- console.log("Error converting porter yaml file to input: " + error)
|
|
|
|
|
|
|
+ console.log("Error converting porter yaml file to input: " + error);
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
// Deploys a Helm chart and writes build settings to the DB
|
|
// Deploys a Helm chart and writes build settings to the DB
|
|
|
const isAppNameValid = (name: string) => {
|
|
const isAppNameValid = (name: string) => {
|
|
@@ -169,7 +170,6 @@ const NewAppFlow: React.FC<Props> = ({ ...props }) => {
|
|
|
builder: "heroku",
|
|
builder: "heroku",
|
|
|
buildpacks: "nodejs,ruby",
|
|
buildpacks: "nodejs,ruby",
|
|
|
dockerfile: dockerfilePath,
|
|
dockerfile: dockerfilePath,
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
cluster_id: currentCluster.id,
|
|
cluster_id: currentCluster.id,
|
|
@@ -306,8 +306,6 @@ const NewAppFlow: React.FC<Props> = ({ ...props }) => {
|
|
|
setActionConfig={setActionConfig}
|
|
setActionConfig={setActionConfig}
|
|
|
branch={branch}
|
|
branch={branch}
|
|
|
setBranch={setBranch}
|
|
setBranch={setBranch}
|
|
|
- procfileProcess={procfileProcess}
|
|
|
|
|
- setProcfileProcess={setProcfileProcess}
|
|
|
|
|
dockerfilePath={dockerfilePath}
|
|
dockerfilePath={dockerfilePath}
|
|
|
setDockerfilePath={setDockerfilePath}
|
|
setDockerfilePath={setDockerfilePath}
|
|
|
folderPath={folderPath}
|
|
folderPath={folderPath}
|
|
@@ -317,7 +315,7 @@ const NewAppFlow: React.FC<Props> = ({ ...props }) => {
|
|
|
setBuildConfig={setBuildConfig}
|
|
setBuildConfig={setBuildConfig}
|
|
|
porterYaml={porterYaml}
|
|
porterYaml={porterYaml}
|
|
|
setPorterYaml={(newYaml: string) => {
|
|
setPorterYaml={(newYaml: string) => {
|
|
|
- validatePorterYaml(newYaml)
|
|
|
|
|
|
|
+ validatePorterYaml(newYaml);
|
|
|
}}
|
|
}}
|
|
|
/>
|
|
/>
|
|
|
</>,
|
|
</>,
|
|
@@ -378,8 +376,11 @@ const NewAppFlow: React.FC<Props> = ({ ...props }) => {
|
|
|
*/
|
|
*/
|
|
|
<Button
|
|
<Button
|
|
|
onClick={() => {
|
|
onClick={() => {
|
|
|
|
|
+ // TODO: remove
|
|
|
|
|
+ deployPorterApp();
|
|
|
|
|
+
|
|
|
if (imageUrl) {
|
|
if (imageUrl) {
|
|
|
- deployPorterApp();
|
|
|
|
|
|
|
+ // deployPorterApp();
|
|
|
} else {
|
|
} else {
|
|
|
setShowGHAModal(true);
|
|
setShowGHAModal(true);
|
|
|
}
|
|
}
|