You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for building arbitrary git branches based off regex for branch name (without requiring a GitHub pull request) #239
This is necessary for our workflows (on the Pivotal Tracker sub-teams), because we often work on feature branches, and want these branches to automatically build, run tests, deploy to a test PWS instance for acceptance, etc., without having to manually add the branches/jobs/etc to the concourse config and redeploy.
As an example, we already have this working, implemented as a reusable resource and a reusable job than can perform any arbitrary build tasks for any arbitrary branches:
This is all well tested, documented, standalone, and open source. We would be glad to contribute this back to the Concourse community as soon as there's a official place to do that.
Thanks,
-- Chad
Reacted by Glenn Oppegard, sks, Timani Tunduwani, Alex, Evan Bolyen, Louis-Paul Dareau, Piotr Komborski, Clifton Kaznocha, Johannes Löthberg, Matt Hamann and 13 more
For implementation, I'd like to have jobs with parameters that are passed to fly instead of generating and destroying pipelines. So that I could fly trigger-job mypipeline/build myrepo/test-branch and so.
@muv yes, the PR resource works, and is a simpler approach, but it has some UX drawbacks compared to the branch-manager approach (aside from requiring the use of PRs, it's difficult to find and re-run builds for specific branches/PRs).
However, it is also much more efficient and less resource intensive (many containers are created with the branch-manager approach), so the PR resource may be a good choice for teams with
many active branches and sensitivity to resource cost (read: are running on AWS).
Everything considered, the lack of official support for building feature branches in an efficient way with a reasonable UX is still a significant barrier to concourse adoption for any team which actively uses feature branches, whether they are via PRs or not.
Exactly. Reading official docs I wondered for awhile how to build feature branches. Until I finally realized how to compose a proper google request and found this.
I also want to put together a plan for having pipeline hierarchies, so you don't end up with a flat set of pipelines with generated names for each branch: #532
@vito So, how exactly do you envision the git-branch-heads-resource being used?
It doesn't seem necessary for the pipeline-per-branch approach, right? All that needs is a list of branches which changed via the git-branches-resource, and the the concourse-pipeline-resource would then create/delete pipelines based on existing branches which match the regex. Then, each created per-branch pipeline would just use the standard git-resource pointing to the branch (which is exactly what concourse-branch-manager does).
@thewoolleyman It's not necessary but is much simpler for less complicated projects where you just want assistance from CI to give you a feedback loop at the unit level.
@vito Makes sense. I'd like to see an example of it used in an actual pipeline/job, though (once it's written), to see how it could be used to manage the build of multiple branches.
I think enough has come out of this discussion to warrant closing the issue; there are a few approaches that work to varying levels, and what's left isn't very actionable as it's kind of open-ended.
can we reopen this issue as concourse-pipeline-resource is not really suitable for the task (due to concourse/concourse-pipeline-resource#10 which is not yet implemented)? it seems the concourse is the only CI/CD that doesn't have a proper support for multiple branches, in terms of UX and overall workflow experience.
Reacted by Benoit Averty, Bernhard Mäder, jonnysco, Artur Krysiak, Andy Elliott, Graham Forest, Biel Simon Rojas and Adrian Fedoreanu
Activity
concourse-bot commentedon Dec 21, 2015
Hi there!
We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.
The current status is as follows:
This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.
thewoolleyman commentedon Apr 13, 2016
Post-1.0 ping as requested @vito
thewoolleyman commentedon Apr 13, 2016
Ideally, this should not be tied to Pull Requests, because many teams do not use PRs for branches.
jkamenik commentedon Apr 29, 2016
👍
muv commentedon Jun 28, 2016
@thewoolleyman Haven't seen the ability to build from pull requests in the official docs. Are you refering to https://github.com/jtarchie/pullrequest-resource?
muv commentedon Jun 28, 2016
For implementation, I'd like to have jobs with parameters that are passed to
flyinstead of generating and destroying pipelines. So that I couldfly trigger-job mypipeline/build myrepo/test-branchand so.thewoolleyman commentedon Jun 28, 2016
@muv yes, the PR resource works, and is a simpler approach, but it has some UX drawbacks compared to the branch-manager approach (aside from requiring the use of PRs, it's difficult to find and re-run builds for specific branches/PRs).
However, it is also much more efficient and less resource intensive (many containers are created with the branch-manager approach), so the PR resource may be a good choice for teams with
many active branches and sensitivity to resource cost (read: are running on AWS).
Everything considered, the lack of official support for building feature branches in an efficient way with a reasonable UX is still a significant barrier to concourse adoption for any team which actively uses feature branches, whether they are via PRs or not.
muv commentedon Jun 28, 2016
Exactly. Reading official docs I wondered for awhile how to build feature branches. Until I finally realized how to compose a proper google request and found this.
vito commentedon Jul 13, 2016
There are two approaches made possible by
version: everywithout the need for a separate server.Travis-style: see #525 (comment)
Pipeline per branch: you could use a
git-branchesresource (which I'd forgotten you already wrote, but mine's a bit different) and aconcourse-pipelineresource (which just needs support for deleting pipelines: see concourse/concourse-pipeline-resource#10).I also want to put together a plan for having pipeline hierarchies, so you don't end up with a flat set of pipelines with generated names for each branch: #532
10 remaining items
thewoolleyman commentedon Jul 15, 2016
@vito So, how exactly do you envision the
git-branch-heads-resourcebeing used?It doesn't seem necessary for the pipeline-per-branch approach, right? All that needs is a list of branches which changed via the
git-branches-resource, and the theconcourse-pipeline-resourcewould then create/delete pipelines based on existing branches which match the regex. Then, each created per-branch pipeline would just use the standardgit-resourcepointing to the branch (which is exactly whatconcourse-branch-managerdoes).vito commentedon Jul 15, 2016
@thewoolleyman It's not necessary but is much simpler for less complicated projects where you just want assistance from CI to give you a feedback loop at the unit level.
thewoolleyman commentedon Jul 15, 2016
@vito Makes sense. I'd like to see an example of it used in an actual pipeline/job, though (once it's written), to see how it could be used to manage the build of multiple branches.
vito commentedon Sep 25, 2016
Finally got around to whipping up that
git-branch-headsresource:https://github.com/vito/git-branch-heads-resource
Example pipeline:
https://github.com/concourse/concourse/blob/d0053847af8d68da8521b52e7bb3fc5446d7851e/ci/pipelines/wip.yml
And here it is in our CI:
https://ci.concourse.ci/teams/main/pipelines/wips
(...not that it's particularly impressive at the moment)
vito commentedon Dec 30, 2016
I think enough has come out of this discussion to warrant closing the issue; there are a few approaches that work to varying levels, and what's left isn't very actionable as it's kind of open-ended.
mzelinsky commentedon Jun 2, 2017
can we reopen this issue as
concourse-pipeline-resourceis not really suitable for the task (due to concourse/concourse-pipeline-resource#10 which is not yet implemented)? it seems the concourse is the only CI/CD that doesn't have a proper support for multiple branches, in terms of UX and overall workflow experience.vito commentedon Nov 3, 2017
For all those keeping up with this issue, please see #1707 and the stories it led to. :)
See also our post announcing it (which...basically just links to that issue).
thewoolleyman commentedon Nov 4, 2017
@vito Awesome, thanks for putting in the hard work to come up with a good solution to this.
bump atc fly web
bump atc