diff --git a/operator/runner/env.go b/operator/runner/env.go index 02d54bea..2b3770ba 100644 --- a/operator/runner/env.go +++ b/operator/runner/env.go @@ -96,6 +96,8 @@ func buildEnviron(build *core.Build) map[string]string { "DRONE_BUILD_STARTED": fmt.Sprint(build.Started), "DRONE_BUILD_FINISHED": fmt.Sprint(build.Finished), "DRONE_DEPLOY_TO": build.Deploy, + // legacy + "CI_COMMIT_SHA": build.After, } if strings.HasPrefix(build.Ref, "refs/tags/") { env["DRONE_TAG"] = strings.TrimPrefix(build.Ref, "refs/tags/") diff --git a/trigger/trigger.go b/trigger/trigger.go index c6b2acab..4fe88f06 100644 --- a/trigger/trigger.go +++ b/trigger/trigger.go @@ -198,6 +198,7 @@ func (t *triggerer) Trigger(ctx context.Context, repo *core.Repository, base *co // the legacy yaml configuration file to the new format. raw.Data, err = converter.ConvertString(raw.Data, converter.Metadata{ Filename: repo.Config, + URL: repo.Link, Ref: base.Ref, }) if err != nil {