habitat-sh / builder

Habitat Builder
Apache License 2.0
32 stars 35 forks source link

Add additional github + auto rebuilds + channel workflows #345

Open tashimi opened 6 years ago

tashimi commented 6 years ago

As a user, I would like more options in how and when Builder re-builds my application automatically. These should be configurable, not automatic.

Aha! Link: https://chef.aha.io/features/APPDL-7

christophermaier commented 6 years ago

The current code was written with the intention that pushes to master would trigger builds, but I think we're either listening for the wrong Github API event, or responding incorrectly to the right API event. It should be a relatively straightforward fix (famous last words :smile: )

The branch-to-channel mapping is interesting, in that it would enable workflows where only vetted and stable code is pushed to master (so master => stable), while allowing merges of code to a "staging" branch to get built and promoted into a "staging" channel automatically. This might work with some kind of git-flow-style strategies. It would be a little different, in that a single artifact wouldn't be built and then promoted through various channels and environments; promotion would effectively be taken away from Builder and given to the repository branching model. Wonder if there are authorization concerns to think about there 🤔

On the other hand, it may provide the kernel of a model in which we can build and test packages on feature branches as part of the overall PR evaluation process, without worrying about polluting the unstable channel in a nondeterministic way.

christophermaier commented 6 years ago

Paging @bixu

bixu commented 6 years ago

I think the comments here accurately describe what we at smartB have been wishing for.

Take for example this possible flow:

A push to a feature branch results in a package built and tagged with a matching feature channel. The feature is vetted and then a PR is created and merged to the Master branch. The the push of this merge to Master results in a package tagged for a staging channel. The Staging environment that subscribes to this staging channel self-updates, final validation is performed and then Builder is used to release the the package to Production by adding the stable (or possibly a custom production) channel tag.

rsertelon commented 6 years ago

That's a nice one. It could even be super useful for core-plans maintenance. Builder could launch builds of a PR and we could even get information in the PR build state telling if the job group failed or succeeded (much like travis actually).

Also, the created channel should be named after the branch, so that if you're working on several packages/services that interact together, they'll be built/run against the modified deps too.

Finally, with the ability to remove packages from bldr, these feature branches could even be purged properly (manually at least, automatically at best ;)). As @christophermaier pointed out, the unstable channel wouldn't be polluted then (and in core-plans, that is important IMHO).

dmccown commented 5 years ago

Duplicate of #31

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

bixu commented 4 years ago

This is still important to us.

On Apr 2, 2020, at 23:34, stale[bot] notifications@github.com wrote:

 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

stale[bot] commented 12 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.