Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restarting a promoted build loses target environment #2748

Closed
JeffDownie opened this issue Jul 3, 2019 · 2 comments
Closed

Restarting a promoted build loses target environment #2748

JeffDownie opened this issue Jul 3, 2019 · 2 comments

Comments

@JeffDownie
Copy link

When I try to restart a build that has been run as the result of a promotion, drone seems to trigger a new promotion build, but with the variable set to empty - for example, if I run

drone build promote my/repository 123 production

It works fine, but when I hit the restart button in the UI for this build, it does something roughly the equivalent of

drone build promote my/repository 123

(after the 123 intentionally left blank)

@bradrydzewski
Copy link

bradrydzewski commented Jul 29, 2019

this can be fixed by modifying the code here.

			Sender:       prev.Sender,
			Params:       map[string]string{},
		}

+		for k, v := range prev.Params {
+			hook.Params[k] = v
+		}

@bradrydzewski
Copy link

fixed by c7788c4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants