From 86ca01561bae2f7b33cd1d93f2ec36d89f61872c Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Fri, 12 May 2017 15:02:24 +0200 Subject: [PATCH 1/2] Use proper random container name --- server/hook.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/hook.go b/server/hook.go index 73cfa7474..bdbdc90e7 100644 --- a/server/hook.go +++ b/server/hook.go @@ -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), From 6d49f99601d4458483b5f55a2e6d3472071c7743 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 12 May 2017 15:46:32 +0200 Subject: [PATCH 2/2] execute dist for tag [ci skip] --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index b9f922ceb..0592d9de0 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,7 +16,7 @@ pipeline: - ./dist.sh secrets: [ ssh_key ] when: - event: push + event: [ push, tag ] archive: image: plugins/s3