mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +00:00
Merge pull request #2038 from tboerger/rand-container-name
Use proper random container name
This commit is contained in:
commit
707721e4fa
1 changed files with 6 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue