Merge pull request #2038 from tboerger/rand-container-name

Use proper random container name
This commit is contained in:
Brad Rydzewski 2017-05-12 15:12:16 +02:00 committed by GitHub
commit 707721e4fa

View file

@ -5,6 +5,7 @@ import (
"crypto/sha256"
"encoding/json"
"fmt"
"math/rand"
"regexp"
"strconv"
"time"
@ -39,6 +40,10 @@ import (
var skipRe = regexp.MustCompile(`\[(?i:ci *skip|skip *ci)\]`)
func init() {
rand.Seed(time.Now().UnixNano())
}
func GetQueueInfo(c *gin.Context) {
c.IndentedJSON(200,
Config.Services.Queue.Info(c),
@ -492,7 +497,7 @@ func (b *builder) Build() ([]*buildItem, error) {
fmt.Sprintf(
"%d_%d",
proc.ID,
time.Now().Unix(),
rand.Int(),
),
),
compiler.WithEnviron(proc.Environ),