Can AppVeyor deal with upstream builds?
Does AppVeyor have the ability to trigger from upstream builds? For example if project A and B both have dependencies on project C, then when project A and B should both rebuild any time project C is successfully build.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ilya Finkelshte... on 14 Mar, 2018 10:35 PM
Sure, you can start build with REST API at
on_success
step. You can implement custom logic with environment variables which you pass from project C to A and B. Please see some samples:https://gist.github.com/IlyaFinkelshteyn/89d19593318276e2538040787b...
https://gist.github.com/IlyaFinkelshteyn/a50029e48eccab12d0e16afe23...
https://gist.github.com/IlyaFinkelshteyn/d9029406873f9502b1a14e2342...
https://gist.github.com/IlyaFinkelshteyn/4138f6a5525f9ab2e66f9ca86a...
2 Posted by jstafford on 16 Mar, 2018 09:52 PM
So I think this maybe backwards, if I'm understanding it correctly. The problem with this is that now the upstream build has to be aware of all the downstream builds in order to fire off those processes. I think what I had in mind was the other way around, sort of like a subscription event: "I'm project B, if project A builds, let me know so I can rebuild."
An example use case is core libraries. If I fix a bug in 4.15.5 in project C which is a core library, then project A and B need to rebuild - they are looking for nuget packages generated by project C and are targeting 4.15.*. They would rebuild, thus pull the latest packages and automatically deploying through our CD system. This is particularly useful in dev/integration environments
3 Posted by Ilya Finkelshte... on 16 Mar, 2018 09:59 PM
I see, but why starting builds of A and B from
on_success
step of C will not work?4 Posted by jstafford on 16 Mar, 2018 10:01 PM
It's not that it won't work. It's just if I have 50 microservice repositories that depend on this upstream build (what we're calling 'C'), then the build configuration for C now needs an on_success entry for every one of those projects. Correct?
5 Posted by Ilya Finkelshte... on 16 Mar, 2018 10:07 PM
No, this is
on_success
entry only in C. So if C build is OK, it reaches this step in build pipeline and runs script to start all that A, B and other build projects6 Posted by Ilya Finkelshte... on 16 Mar, 2018 10:12 PM
UPDATE maybe we talk about the same, but I misunderstood. Yes, C should have
on_success
entry for every one of those projects, but this can be single script, which reads array of project names and start build for each of the in the loop.7 Posted by jstafford on 16 Mar, 2018 10:17 PM
Yeah, I see that would work, but it's also very inefficient because the responsibility/dependency is inverted. I guess I was looking for more of a subscription model which I thought Jenkins did (it's been a while since I've used Jenkins). That way, the upstream project 'C' doesn't need to know about downstream dependencies. Projects can then just subscribe to a
successful build
event to any project they want and trigger a build as needed. It's common pub/sub type implementation.Does that make sense? Could be a good feature request :)
8 Posted by jstafford on 16 Mar, 2018 10:18 PM
In the meanwhile, I could use your examples as a means to solve the problem in the short term
9 Posted by Ilya Finkelshte... on 16 Mar, 2018 10:25 PM
Right, filed https://github.com/appveyor/ci/issues/2181
10 Posted by jstafford on 16 Mar, 2018 10:26 PM
Thanks!
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:27 AM.