Просмотр исходного кода

Merge pull request #532 from porter-dev/procfile-support

do not block deploy when procfile is not detected
sunguroku 5 лет назад
Родитель
Сommit
2b7fec9fd8

+ 8 - 6
dashboard/src/components/repo-selector/ActionDetails.tsx

@@ -169,12 +169,14 @@ export default class ActionDetails extends Component<PropsType, StateType> {
             <i className="material-icons">keyboard_backspace</i>
             Select Folder
           </BackButton>
-          {!this.props.procfilePath && !this.props.dockerfilePath ? (
-            <StatusWrapper>
-              <i className="material-icons">error_outline</i>
-              Procfile not detected.
-            </StatusWrapper>
-          ) : this.props.selectedRegistry ? (
+          {
+          // !this.props.procfilePath && !this.props.dockerfilePath ? (
+          //   <StatusWrapper>
+          //     <i className="material-icons">error_outline</i>
+          //     Procfile not detected.
+          //   </StatusWrapper>
+          // ) : 
+          this.props.selectedRegistry ? (
             <StatusWrapper successful={true}>
               <i className="material-icons">done</i> Source selected
             </StatusWrapper>

+ 3 - 1
dashboard/src/components/repo-selector/ContentsList.tsx

@@ -289,7 +289,9 @@ export default class ContentsList extends Component<PropsType, StateType> {
           <ConfirmButton
             onClick={() => {
               this.props.setFolderPath(this.state.currentDir || "./");
-              this.props.setProcfilePath("./Procfile");
+              if (this.state.processes && Object.keys(this.state.processes).length > 0) {
+                this.props.setProcfilePath("./Procfile");
+              }
             }}
           >
             No, I don't want to use a Dockerfile

+ 8 - 8
dashboard/src/main/home/launch/expanded-template/LaunchTemplate.tsx

@@ -383,14 +383,14 @@ class LaunchTemplate extends Component<PropsType, StateType> {
       procfilePath,
     } = this.state;
 
-    if (
-      sourceType === "repo" &&
-      !dockerfilePath &&
-      folderPath &&
-      !procfilePath
-    ) {
-      return "Procfile not detected.";
-    }
+    // if (
+    //   sourceType === "repo" &&
+    //   !dockerfilePath &&
+    //   folderPath &&
+    //   !procfilePath
+    // ) {
+    //   return "Procfile not detected.";
+    // }
 
     if (!this.submitIsDisabled()) {
       return this.state.saveValuesStatus;