From d104b6fc31ffbda6e5fa2d5ab69a38178d6433dc Mon Sep 17 00:00:00 2001 From: Matthias Linhuber Date: Mon, 25 Sep 2023 11:21:29 +0200 Subject: [PATCH] Remove old comments --- HadesScheduler/kube/kube.go | 2 -- HadesScheduler/kube/kube_test.go | 35 -------------------------------- 2 files changed, 37 deletions(-) diff --git a/HadesScheduler/kube/kube.go b/HadesScheduler/kube/kube.go index 33c7ee4..e290969 100644 --- a/HadesScheduler/kube/kube.go +++ b/HadesScheduler/kube/kube.go @@ -203,13 +203,11 @@ func deleteNamespace(clientset *kubernetes.Clientset, namespace string) { func createJob(clientset *kubernetes.Clientset, namespace string, buildJob payload.BuildJob) (*batchv1.Job, error) { log.Infof("Creating job %v in namespace %s", buildJob, namespace) - //TODO: Use function to generate build command sharedVolumeName := "shared-volume-" + buildJob.Name jobs := clientset.BatchV1().Jobs(namespace) var backOffLimit int32 = 0 - //TODO: Use function to generate clone command cloneCommand := utils.BuildCloneCommands(buildJob.Credentials, buildJob.BuildConfig.Repositories...) log.Debugf("Clone command: %s", cloneCommand) diff --git a/HadesScheduler/kube/kube_test.go b/HadesScheduler/kube/kube_test.go index eb86b2c..24a918f 100644 --- a/HadesScheduler/kube/kube_test.go +++ b/HadesScheduler/kube/kube_test.go @@ -27,38 +27,3 @@ func TestDeleteNamespace(t *testing.T) { client := initializeKubeconfig() deleteNamespace(client, "test") } - -// func TestCreateJob(t *testing.T) { -// client := initializeKubeconfig() - -// testBuildJob := payload.BuildJob{ -// Name: "Test Build", -// Credentials: struct { -// Username string `json:"username" binding:"required"` -// Password string `json:"password" binding:"required"` -// }{ -// Username: "testuser", -// Password: "testpassword", -// }, -// BuildConfig: struct { -// Repositories []payload.Repository `json:"repositories" binding:"required,dive"` -// ExecutionContainer string `json:"executionContainer" binding:"required"` -// }{ -// Repositories: []payload.Repository{ -// { -// Path: "/tmp/testrepo1", -// URL: "https://github.com/testuser/testrepo1.git", -// }, -// { -// Path: "/tmp/testrepo2", -// URL: "https://github.com/testuser/testrepo2.git", -// }, -// }, -// ExecutionContainer: "docker", -// }, -// } - -// namespace := "default" - -// createJob(client, namespace, testBuildJob) -// }