pass url to 0.8 conversion

This commit is contained in:
Brad Rydzewski 2019-07-18 14:55:48 -07:00
parent 158f7d289a
commit 8ba0430a82
2 changed files with 3 additions and 0 deletions

View file

@ -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/")

View file

@ -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 {