brigade icon indicating copy to clipboard operation
brigade copied to clipboard

project defaultScript is not getting added in the event secret

Open kumudt opened this issue 8 years ago • 2 comments

Data mounted from event secret is missing the script key. As a result of this if /vcs/brigade.js and /etc/brigade-default-script/brigade.js is missing and the users are depending on the project's defaultScript things will break.

The fix for this is to add Script key in here https://github.com/Azure/brigade/blob/master/pkg/webhook/github.go#L229

I will raise a PR for the same.

kumudt avatar Jul 23 '18 09:07 kumudt

A default script should not be added to the event's secret. It should be injected into the worker by the controller, and read during worker startup in the prestart.js. Gateways are not supposed to make decisions about defaults. They are just supposed to pass what they are given. The Controller and Worker are responsible for filling defaults in.

technosophos avatar Jul 23 '18 23:07 technosophos

Closing for now, but feel free to reopen if you have additional questions.

Thanks!

radu-matei avatar Jan 04 '19 23:01 radu-matei