Can anyone provide a rough outline of their git workflow that complies with continuous integration.
E.g. How do you branch? Do you fast forward commits to the master branch?
I am primarily working with Rails as well as client and server side Javascript. If anyone can recommend a solid CI technology that's compatible with those, that'd be great. I've looked into Jenkins but would like to check out other good alternatives.
To put some context into this, I am planning on transitioning from working as a single developer into working as part of the team. I'd like to start standardizing my own personal workflow so that I can onboard new devs quickly.
-
1Did you look how this is done commonly? Set up e.g. jenkins with gerrit and play with it.Benjamin Bannier– Benjamin Bannier2012年03月24日 08:57:49 +00:00Commented Mar 24, 2012 at 8:57
-
Have you tried something that didn't work or didn't seem right, that you could describe & add to your question?jcmeloni– jcmeloni2012年03月24日 12:03:12 +00:00Commented Mar 24, 2012 at 12:03
2 Answers 2
A simple workflow.
- Central Git Repo used by the CI server
- People push to a specific branch on that Repo (say Master)
- CI Server detects changes in master branch or runs a timed build
- CI Server runs unit tests
- Depending on your rules, the CI server can then tag the repository, and a myriad of other things.
There are countless ways to do this, do what fits your workflow the best.
-
2Do you use feature branches? How do you ensure a clean commit history on the master branch? Or are everyone's commits aggregated?Andrew Lauer Barinov– Andrew Lauer Barinov2012年03月28日 23:55:17 +00:00Commented Mar 28, 2012 at 23:55
-
We do not use feature branches to trigger builds, but we do use them. We don't worry that much about clean commit history, we'd prefer it was accuratesylvanaar– sylvanaar2012年03月29日 14:13:13 +00:00Commented Mar 29, 2012 at 14:13
- Work
- Commit to your local repo
- Push (to master repo)
- CI detects new revision
- CI checks out new revision
- CI builds and tests new revision
- CI updates Changelog (commit and push)
- CI creates a version file and then tags master repo
- CI packages build
- CI pushes package to artifact repo (in our case a YUM repo)
- rinse, repeat
We don't work of branches. We always commit to trunk, but then again we also do ATDD to mitigate the common issues like instability.
-
Is the CI server you're using a custom one or something that's available off the shelf?Andrew Lauer Barinov– Andrew Lauer Barinov2012年03月28日 23:44:27 +00:00Commented Mar 28, 2012 at 23:44
-
@Andrew Barinov: We are currently using Hudson, but most of the logic is in our Makefiles.iteratingself– iteratingself2012年03月29日 05:02:15 +00:00Commented Mar 29, 2012 at 5:02
Explore related questions
See similar questions with these tags.