You've already forked woodpecker
							
							
				mirror of
				https://github.com/woodpecker-ci/woodpecker.git
				synced 2025-10-30 23:27:39 +02:00 
			
		
		
		
	Use proper random container name
This commit is contained in:
		| @@ -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), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user