diff --git a/VERSION b/VERSION index 2157409..ca222b7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.22.0 +0.23.0 diff --git a/cli/cleanup/pods.go b/cli/cleanup/pods.go index 4879661..4dd6ecf 100644 --- a/cli/cleanup/pods.go +++ b/cli/cleanup/pods.go @@ -54,7 +54,7 @@ func runPodsCleanup() { deletePod(pods, pod) case "Failed": diff := time.Now().UTC().Sub(pod.CreationTimestamp.UTC()) - if (diff.Hours() / 24) >= 1 { + if diff.Hours() >= 4 { deletePod(pods, pod) } default: diff --git a/cli/pipeline/template.go b/cli/pipeline/template.go index 5598f9c..e50c098 100644 --- a/cli/pipeline/template.go +++ b/cli/pipeline/template.go @@ -3,10 +3,8 @@ package pipeline import ( "bytes" "fmt" - "strconv" "strings" "text/template" - "time" ) type PodSecret struct { @@ -193,8 +191,7 @@ func NewPodDefinition(pipelineDefinition *PipelineDefinition, pipelineDefinition stepName := sanitizeName(pipelineDefinitionStep.Step) branchName := sanitizeName(pipelineDefinitionStep.Branch) stepVersion := sanitizeName(pipelineDefinitionStep.Version) - timestamp := strconv.Itoa(int(time.Now().UTC().Unix())) - podName := fmt.Sprintf("%s-%s-%s-%s-%s", sanitizeName(pipelineDefinition.Pipeline), sanitizeName(pipelineDefinitionStep.Version), stepName, branchName, timestamp[len(timestamp)-4:]) + podName := fmt.Sprintf("%s-%s-%s-%s", sanitizeName(pipelineDefinition.Pipeline), sanitizeName(pipelineDefinitionStep.Version), stepName, branchName) return &PodDefinition{ PodName: podName,