mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
chore: log background jobs
Signed-off-by: allanice001 <allanice001@gmail.com>
This commit is contained in:
@@ -443,6 +443,11 @@ func runMakeOnBastion(
|
|||||||
c *models.Cluster,
|
c *models.Cluster,
|
||||||
target string,
|
target string,
|
||||||
) (string, error) {
|
) (string, error) {
|
||||||
|
logger := log.With().
|
||||||
|
Str("cluster_id", c.ID.String()).
|
||||||
|
Str("cluster_name", c.Name).
|
||||||
|
Logger()
|
||||||
|
|
||||||
bastion := c.BastionServer
|
bastion := c.BastionServer
|
||||||
if bastion == nil {
|
if bastion == nil {
|
||||||
return "", fmt.Errorf("bastion server is nil")
|
return "", fmt.Errorf("bastion server is nil")
|
||||||
@@ -500,9 +505,13 @@ func runMakeOnBastion(
|
|||||||
defer sess.Close()
|
defer sess.Close()
|
||||||
|
|
||||||
clusterDir := fmt.Sprintf("$HOME/autoglue/clusters/%s", c.ID.String())
|
clusterDir := fmt.Sprintf("$HOME/autoglue/clusters/%s", c.ID.String())
|
||||||
sshDir := fmt.Sprintf("$HOME/.ssh/autoglue")
|
sshDir := fmt.Sprintf("$HOME/.ssh")
|
||||||
|
|
||||||
cmd := fmt.Sprintf("cd %s && docker run -it -v %s:/root/.ssh -v ./payload.json:/opt/gluekube/platform.json %s:%s make %s", clusterDir, sshDir, c.DockerImage, c.DockerTag, target)
|
cmd := fmt.Sprintf("cd %s && docker run -v %s:/root/.ssh -v ./payload.json:/opt/gluekube/platform.json %s:%s make %s", clusterDir, sshDir, c.DockerImage, c.DockerTag, target)
|
||||||
|
|
||||||
|
logger.Info().
|
||||||
|
Str("cmd", cmd).
|
||||||
|
Msg("[runMakeOnBastion] executing remote command")
|
||||||
|
|
||||||
out, runErr := sess.CombinedOutput(cmd)
|
out, runErr := sess.CombinedOutput(cmd)
|
||||||
if runErr != nil {
|
if runErr != nil {
|
||||||
|
|||||||
@@ -1,17 +1,13 @@
|
|||||||
import { type FC, useEffect, useRef, useState } from "react"
|
import { type FC, useEffect, useRef, useState } from "react"
|
||||||
import { useTheme } from "next-themes"
|
import { useTheme } from "next-themes"
|
||||||
|
|
||||||
|
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
import { Input } from "@/components/ui/input"
|
import { Input } from "@/components/ui/input"
|
||||||
|
|
||||||
|
|
||||||
import "rapidoc"
|
import "rapidoc"
|
||||||
|
|
||||||
|
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card.tsx"
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card.tsx"
|
||||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select.tsx"
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@/components/ui/select.tsx"
|
||||||
|
|
||||||
|
|
||||||
type RdThemeMode = "auto" | "light" | "dark"
|
type RdThemeMode = "auto" | "light" | "dark"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user