Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Commit

Permalink
Timestamp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Csongor Barabasi committed Jun 22, 2020
1 parent 12ef0fe commit c98b7b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/pipeline/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package pipeline
import (
"bytes"
"fmt"
"strconv"
"strings"
"text/template"
"time"
Expand Down Expand Up @@ -192,7 +193,7 @@ func NewPodDefinition(pipelineDefinition *PipelineDefinition, pipelineDefinition
stepName := sanitizeName(pipelineDefinitionStep.Step)
branchName := sanitizeName(pipelineDefinitionStep.Branch)
stepVersion := sanitizeName(pipelineDefinitionStep.Version)
timestamp := time.Now().UTC().String()
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:])

return &PodDefinition{
Expand Down

0 comments on commit c98b7b2

Please sign in to comment.