You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-06-03 16:35:37 +02:00
Add CI_PIPELINE_RERUNS environment variable (#6588)
This commit is contained in:
@@ -77,6 +77,9 @@ func (m *Metadata) Environ() map[string]string {
|
||||
setNonEmptyEnvVar(params, "CI_PIPELINE_STARTED", strconv.FormatInt(pipeline.Started, 10))
|
||||
setNonEmptyEnvVar(params, "CI_PIPELINE_AUTHOR", pipeline.Author)
|
||||
setNonEmptyEnvVar(params, "CI_PIPELINE_AVATAR", pipeline.Avatar)
|
||||
if pipeline.RerunCount > 0 {
|
||||
setNonEmptyEnvVar(params, "CI_PIPELINE_RERUNS", strconv.FormatInt(pipeline.RerunCount, 10))
|
||||
}
|
||||
|
||||
workflow := m.Workflow
|
||||
setNonEmptyEnvVar(params, "CI_WORKFLOW_NAME", workflow.Name)
|
||||
|
||||
@@ -56,6 +56,7 @@ type (
|
||||
DeployTask string `json:"task,omitempty"`
|
||||
Commit Commit `json:"commit"`
|
||||
Parent int64 `json:"parent,omitempty"`
|
||||
RerunCount int64 `json:"rerun_count,omitempty"`
|
||||
Cron string `json:"cron,omitempty"`
|
||||
Author string `json:"author,omitempty"`
|
||||
Avatar string `json:"avatar,omitempty"`
|
||||
|
||||
Reference in New Issue
Block a user