From 29c663b4e26919c30db2902aee7bae4242b7b4e5 Mon Sep 17 00:00:00 2001 From: mbecker20 Date: Tue, 5 Apr 2022 04:48:29 -0700 Subject: [PATCH] deploy not working --- core/src/messages/deployments/clone.ts | 7 ------ core/src/messages/deployments/deploy.ts | 22 +++++++++---------- frontend/src/components/update/Update.tsx | 14 ++++++++++-- .../src/components/update/update.module.scss | 6 +++-- .../src/components/util/menu/menu.module.scss | 6 ++--- frontend/src/style/index.scss | 1 + periphery/src/routes/deploy.ts | 2 ++ periphery/src/routes/git.ts | 4 ---- 8 files changed, 32 insertions(+), 30 deletions(-) diff --git a/core/src/messages/deployments/clone.ts b/core/src/messages/deployments/clone.ts index 6cf181b3a..9a740c555 100644 --- a/core/src/messages/deployments/clone.ts +++ b/core/src/messages/deployments/clone.ts @@ -50,8 +50,6 @@ async function cloneRepo( githubAccount && SECRETS.GITHUB_ACCOUNTS[githubAccount] ) : await clonePeriphery(server, deployment); - console.log("repo cloned"); - console.log(cloneCle); const onCloneCle = server.isCore && onClone ? await execute( @@ -62,8 +60,6 @@ async function cloneRepo( )} && ${onClone.command}` ) : undefined; - console.log("on clone executed"); - console.log(onCloneCle); const onPullCle = server.isCore && onPull ? await execute( @@ -74,8 +70,6 @@ async function cloneRepo( )} && ${onPull.command}` ) : undefined; - console.log("on pull executed"); - console.log(onPullCle); const { command, log, isError } = mergeCommandLogError( { name: "clone", @@ -87,7 +81,6 @@ async function cloneRepo( }, { name: "on pull", cle: onPullCle } ); - console.log("log merged") addDeploymentUpdate( app, _id!, diff --git a/core/src/messages/deployments/deploy.ts b/core/src/messages/deployments/deploy.ts index d7df691ac..b68f8e273 100644 --- a/core/src/messages/deployments/deploy.ts +++ b/core/src/messages/deployments/deploy.ts @@ -60,17 +60,6 @@ async function deployDeployment( build && build.dockerBuildArgs ? join(build.dockerAccount || "", build.pullName!) : undefined; - const containerMount = - deployment.repo && deployment.containerMount - ? { - repoFolder: join( - SYS_DEPLOYMENT_REPO_PATH, - deployment.containerName!, - deployment.repoMount || "" - ), - containerMount: deployment.containerMount, - } - : undefined; const { command, log, isError } = server ? await deployPeriphery( server, @@ -84,7 +73,16 @@ async function deployDeployment( image: image ? image : deployment.image, }, SYSROOT, - containerMount, + deployment.repo && deployment.containerMount + ? { + repoFolder: join( + SYS_DEPLOYMENT_REPO_PATH, + deployment.containerName!, + deployment.repoMount || "" + ), + containerMount: deployment.containerMount, + } + : undefined, (build && build.dockerAccount) || deployment.dockerAccount, ((build && build.dockerAccount) || deployment.dockerAccount) && SECRETS.DOCKER_ACCOUNTS[ diff --git a/frontend/src/components/update/Update.tsx b/frontend/src/components/update/Update.tsx index e30f6925b..b15bcfe73 100644 --- a/frontend/src/components/update/Update.tsx +++ b/frontend/src/components/update/Update.tsx @@ -89,13 +89,23 @@ const Update: Component<{ update: UpdateType; showName: boolean }> = (p) => {
stderr
-
+                
                   {p.update.log.stderr}
                 
stdout
-
+                
                   {p.update.log.stdout}
                 
diff --git a/frontend/src/components/update/update.module.scss b/frontend/src/components/update/update.module.scss index 2b94a06cb..c3a933393 100644 --- a/frontend/src/components/update/update.module.scss +++ b/frontend/src/components/update/update.module.scss @@ -10,7 +10,7 @@ } .Log { - white-space: pre-line; + white-space: pre-wrap; overflow-wrap: anywhere; /* word-wrap: break-word; */ tab-size: 2; @@ -18,5 +18,7 @@ max-width: 90vw; margin-left: 2rem; box-sizing: border-box; - max-height: 20vh; + max-height: 30vh; + background-color: rgba(c.$darkgrey, 0.6); + padding: 1rem; } \ No newline at end of file diff --git a/frontend/src/components/util/menu/menu.module.scss b/frontend/src/components/util/menu/menu.module.scss index d537005e3..4b720e977 100644 --- a/frontend/src/components/util/menu/menu.module.scss +++ b/frontend/src/components/util/menu/menu.module.scss @@ -21,7 +21,7 @@ display: grid; width: fit-content; /* border: solid 1px rgba(2, 107, 121, 0.25); */ - background-color: c.$darkgrey; + background-color: c.$grey; z-index: 21; border-radius: 0.25rem; box-sizing: border-box; @@ -117,7 +117,7 @@ top: 100%; left: 0; padding: 0rem 0.5rem; - background-color: c.$darkgrey; + background-color: c.$grey; border-radius: 0.25rem; z-index: 30; white-space: nowrap; @@ -140,5 +140,5 @@ } .SelectorItem:hover { - background-color: c.$grey; + background-color: c.$lightgrey; } diff --git a/frontend/src/style/index.scss b/frontend/src/style/index.scss index ed3f09e87..972ec9289 100644 --- a/frontend/src/style/index.scss +++ b/frontend/src/style/index.scss @@ -166,4 +166,5 @@ input::placeholder { .scroller::-webkit-scrollbar-thumb { background: rgba(252, 234, 222, 0.3); + border-radius: 0.25rem; } diff --git a/periphery/src/routes/deploy.ts b/periphery/src/routes/deploy.ts index 9fff459df..624aea5bb 100644 --- a/periphery/src/routes/deploy.ts +++ b/periphery/src/routes/deploy.ts @@ -22,6 +22,7 @@ const deploy = fp((app: FastifyInstance, _: {}, done: () => void) => { } : undefined; await deleteContainer(deployment.containerName!); + console.log("deploying") const log = await dockerRun( { ...deployment, @@ -35,6 +36,7 @@ const deploy = fp((app: FastifyInstance, _: {}, done: () => void) => { deployment.dockerAccount && SECRETS.DOCKER_ACCOUNTS[deployment.dockerAccount] ); + console.log("deployed"); res.send(log); }); diff --git a/periphery/src/routes/git.ts b/periphery/src/routes/git.ts index a45ab37b9..93b0c84cc 100644 --- a/periphery/src/routes/git.ts +++ b/periphery/src/routes/git.ts @@ -18,7 +18,6 @@ const git = fp((app: FastifyInstance, _: {}, done: () => void) => { onClone, onPull, } = deployment; - console.log("cloning repo"); const cloneCle = await clone( repo!, join(CONTAINER_REPO_ROOT, containerName!), @@ -26,7 +25,6 @@ const git = fp((app: FastifyInstance, _: {}, done: () => void) => { branch, githubAccount && SECRETS.GITHUB_ACCOUNTS[githubAccount] ); - console.log("repo cloned"); const onCloneCle = onClone && (await execute( @@ -36,7 +34,6 @@ const git = fp((app: FastifyInstance, _: {}, done: () => void) => { onClone.path || "" )} && ${onClone.command}` )); - console.log("on clone executed"); const onPullCle = onPull && (await execute( @@ -46,7 +43,6 @@ const git = fp((app: FastifyInstance, _: {}, done: () => void) => { onPull.path || "" )} && ${onPull.command}` )); - console.log("on pull executed"); const log = mergeCommandLogError( { name: "clone", cle: cloneCle }, { name: "on clone", cle: onCloneCle },