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 9e9ebd0 commit c4f72f8
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 c4f72f8

Please sign in to comment.