Skip to content

Commit 18cd966

Browse files
authored
Merge pull request #81 from kurtmc/feature/instance-vars
Append build pipeline instance vars to the end of the commit message prefix if set
2 parents aae70f9 + 12f048a commit 18cd966

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

out/git_lock_handler.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,12 @@ func (glh *GitLockHandler) messagePrefix() string {
351351
jobName := os.Getenv("BUILD_JOB_NAME")
352352
pipelineName := os.Getenv("BUILD_PIPELINE_NAME")
353353
teamName := os.Getenv("BUILD_TEAM_NAME")
354+
instanceVars := os.Getenv("BUILD_PIPELINE_INSTANCE_VARS")
354355

355356
if buildName != "" && jobName != "" && pipelineName != "" && teamName != "" {
357+
if instanceVars != "" {
358+
return fmt.Sprintf("%s/%s/%s/%s build %s ", teamName, pipelineName, instanceVars, jobName, buildName)
359+
}
356360
return fmt.Sprintf("%s/%s/%s build %s ", teamName, pipelineName, jobName, buildName)
357361
} else if buildID != "" {
358362
return fmt.Sprintf("one-off build %s ", buildID)

0 commit comments

Comments
 (0)