-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion Episode 6, Part2: Continuous Integration (CI) & Continuous Delivery (CD) with Fernando Cejas (& EVERYTHING & LIFE) #52
Comments
You are missing the GitHub release for this part. |
Thanks for the hint, I'm uploading it right now. Update: Now available in release section: https://github.com/artem-zinnatullin/TheContext-Podcast/releases/tag/Episode_6_Part2 |
Question: Jenkins building apps on library changeYou mentioned in this episode that you use a shared library in two Android application projects. Then you said whenever you change the library you let Jenkins run all tests of the application projects to ensure the library changes do not break the applications. |
With jenkins you can specify dependencies to other projects so that jenkins can run them automatically after having build a certain project. Unfortunately, this doesn't work out too good for our use case because we also have to increment the library version in Maybe there is a better way (or a jenkins plugin) but our solution is basically based on shell scripts.
|
To build on @sockeqwe, in our case is very simple: @johnjohndoe when you bump the library version in your Android project, Jenkins will detect and pick up those changes and will run unit test, acceptance tests and static code analysis as it does with any change that happens in master. |
Regarding your question about branch strategy, we basically have master, release and feature branches. You send PRs that need 2 👍 in order to be merged to master unless you paired with someone, so in that case you only need 1 👍 |
Hi, I didn't find your criticism of Jenkins very compelling. I've been using Jenkins for many years. Its not perfect by any means but the browser refresh issue is not there any more. There is a button top right that says 'enable auto refresh'. |
Which reloads the page periodically, which is not a solution :) On 7 Sep 2016 3:07 pm, "Rakesh Patel" [email protected] wrote:
|
CI is not meant to be watched continuously. If you are, then you're doing it wrong :) Its meant to be running in the background, automatically triggered by SCM commits and notifying you if anything fails (or passes if you want). Emails, slack whatever. When you get notification of a failure you go to the job instance in question and examine it further. Having an up to date UI is not important. I realize you must know this, which is why I am baffled by your flippant attitude on this. It would be a shame if beginner developers took what you said to heart and dismissed Jenkins for reasons that are not important in the real world, or based on your faulty preconceptions. |
Well, I partially agree with your points, but I can't say that Jenkins On 7 Sep 2016 7:32 pm, "Rakesh Patel" [email protected] wrote:
|
All software has bugs. I cant say I've ever hit any bugs with Jenkins in the years I've been using it (though I have had problems with 3rd party plugins). There is a new version of Jenkins that perhaps you should check out (I believe the UI has been revamped) but I've not tried it myself since Jenkins I use works fine. |
Awesome podcast! Thanks! I have a few questions:
|
@qazt482 I've been using Jenkins for about 5 years, I keep it as minimalistic as possible and carefully admin it and still it breaks from time to time and I have to spend time to fix problem. Regarding new UI: I've tried it, but it requires you to use Jenkins Pipelines which we don't need to use, mainly because we don't have Pipelines and because we don't want our project to know about CI system we use (it requires you to store Jenkins config under version control of the project which we already have abstracted away from concrete CI system). And new UI is not ready yet, it's in alpha and was pretty unstable when I tried it about 3 weeks ago. @aaronhe42 thanks man!
On project I work at Juno both QAs and developers own, write and maintain UI tests, but at the moment most of them are written by our QA, ideally everyone should contribute them as needed.
Automate them! You can test db upgrades separately, other cases can be covered with UI tests. We also write unit tests for regressions if it's possible. @android10, @sockeqwe what about you? |
Regarding Jenkins, we use Jenkins a lot and it works for us good. We have no super fancy pipeline or tons of plugins, so Jenkins does the job for us. Moreover, it's open source and can be used for free. I, personally don't have high expectations or criterias regarding a CI server. As long as it builds stuff, I'm fine with it 😄
Both, but in contrast to Artem and Fernando I'm not developing (most of the time) for our own product of our company, but rather develop apps for customers / partners (agency alike). We don't have a QA team, but our customers / partners have. So the final decision is made by their QA team.
As Artem have already said: Automate them! It's worth the effort. I, personally (and I know that Artem will not agree with me on this), don't write too much UI tests, because our UI is super simple. |
@sockeqwe regarding Jenkins we are in agreement. I've used TeamCity many years ago and it was also a good choice but not free. I believe Circle CI is the new hotness but not tried it myself. I'm a bit more ardent about UI tests. I don't think they are worth the effort (flaky, brittle, hard to maintain, etc). Unit test everything else and keep the UI dumb works for me. |
@qazt482 I guess, I'm just that kind of (lazy) guy, who dont really care too much about the underlying CI server. Jenkins was already there when I joined the company and it works (sure not perfect, but sufficient and who is actually perfect ... ). I could also use Travis, Circle CI, TeamCity, BuddyBuild or whatever else is available out there. I don't really care too much about it (as long as I don't have to spend weeks to setup a CI server) ... In my opinion Artem made a fair point by saying Jenkins doesn't work to well for his needs, but he also clearly stated out that he don't want to discredit Jenkins and respects and admires all the hard work put into this open source project. |
@aaronhe42
We as developers have to make sure of the quality of the code we write, so we basically write acceptance tests. We have no QA Team and our Testing Engineering Team takes care of all the tooling we use like testing frameworks, CI maintenance and so forth.
As pointed out above, we rely in our test battery but before each release, the entire team spends a couple of hours doing regression tests, basically by following up a regression test checklist we have. |
Totally, definitely great that we can use Jenkins for free and contribute On 8 Sep 2016 12:42 pm, "Hannes Dorfmann" [email protected] wrote:
|
can anyone help me choose between AVD, genymotion or a real device for running simple smoke tests on every PR on the CI (we're using jenkins) what are the costs of maintenance of each choice? |
We use Emulators 2.0 and spawn new with clean state for each build (takes On 10 Sep 2016 1:18 am, "Nizamutdinov Adel" [email protected]
|
@artem-zinnatullin out of, say, 100 builds, how many emulator failures do you get? |
Haha, great question, 1-2. Sometimes emulator does not see network and our On 10 Sep 2016 9:41 pm, "Nizamutdinov Adel" [email protected]
|
Hi, Some questions for all of you.
|
We also use findbugs and lint. if findbugs detect an error the whole build breaks. this happens for every pushed commit, which triggers a build. Basically our pipeline looks like this:
That's basically it. At soundcloud as @android10 as far as I understood the development branch will be build with additional functional and integration and acceptence tests (these tests will not run on feature branch builds at soundcloud, but only on development branch builds). We don't have too many integration tests or end-to-end tests. 90% of our tests are small unit tests and therefore run on every branch during CI builds. As far as I remember @artem-zinnatullin also runs all tests on all branches (including integration tests and acceptance tests etc.) That's probably the main difference here between us 3: Hannes: run all tests on each branch for each commit (as alreaidy said, 90% are simple unit tests running on jvm, the rest is UI and functional tests). Running those tests takes about 5 minutes Obviously, when I say Hannes, Artem, Fernando I mean "and their team".
In our team: treshhold for fiindbugs is 0. One single detected bug by findbug will fail the build. Same was true for LINT, but sometime ago we decided to not be as strict with LINT. LINT won't fail any build anymore. BAD IDEA, don't do that. I was against this decision, but overall I support the decision since we made the decision as team. It all started like this: We had to deliver a test version of our app, but build failed because of lint, so we turned lint off "just for this build" and turn it on afterwards. Well, somehow we didn't enabled lint again. It print warnings, but doesn't fail the build anymore. We have now a huge number of warnings, but we use the common "no time for fix that" excuse to remove all lint warnings / errors. Again, I wouldn't suggest to do that, but being part of a team also means that there are decisions made by us as team that you personally dislike. I also know that other developers run JaCoCo to generate code coverage reports and fail builds if code coverage is under a certain procentage number, but I, personally, don't believe in such numbers. Having a code coverage of 80% or 40% doesn't says anything about your code base imho. For instance, we don't have too many UI tests because our UI is very simple. So if JaCoCo says that our code has 60 % testing coverage there are a lot of UI related classes that we explicitly don't want to test. On the other hand, we really want to ensure that the "core" of our app is very well tested. We ensure that by code reviewing unit tests.
We don't use google play beta. We manually upload apk's to google play store (happens once However, in Artem's and Fernando's CI pipeline at the end of each build of development branch a APK will be uploaded somewhere (like Crashlytics beta). Fernando also uses Google play beta. I expect that they mainly use the beta channel to get some early feedback but never promote the same apk to production. Hope that he can give us some insights on that.
That really depends on your team. On one hand I think consistency especially on architecture is important. On the other hand, architecture is always evolving over time and that is completely fine. In contrast, I have also worked with other teams and companies that are very strict on architectural things like, we use MVP, there must be a class However, I think iterating on Architecture (and learning from architectural mistakes) is faster if you don't have very strict rules, but then one may argument that it is just a small step into (architectural) chaos. |
In our setup (we use jenkins), I have made 2-3 jobs for same repository. Where one job is specially for Static code analysis, one for regular build and after launch of Jenkins 2.0 I have made one to actually study pipeline feature(Which I am yet to finish BTW). Thus I have made a way that static analysis should never stop regular build, which in many cases requires anyway. But I have set such a high threshold because of size and timeline of our code base. When we started said project, databinding is not yet announced and we are just learning RxJava. Now it's full of MVVM and RxJava. And right now we are slowly moving into covering as much as data - repository part in testing. I think keeping a high threshold will motivate developers to reduce it, and I can use that leverage because I have separated the jobs. Though I doubt this approach but I have decided to use it for couple of months more.
I think we can use some lint flags in Gradle can help us to change severity or consider errors as warning. I am yet to try it though. |
Jenkins ¯_(ツ)_/¯ |
// I'll be on vacation (first ****** time in my life, yay!) soon so I'm assigning discussion to you guys @sockeqwe @android10, deal with it
The text was updated successfully, but these errors were encountered: