How not to waste time on continuous integration

Any software company sooner or later comes to the need of introducing continuous integration, whether it is developing a mobile app, creating a website, or even more so, if it's a complex micro-structure of the service.

image
Earlier I wrote that our team develops iOS and Android applications turnkey, including backend and frontend. This implies an acute need for a scalable distribution process and established standards in project management.

But one thing, when you have the only product where you can do something like this, and the other if every month there is a new, with special requirements, a large team, for which it is necessary quickly to CI/CD.

You probably thought that now would be instructions for setting up this integration, where I'll share best practices, scripts, recommendations for infrastructure and other lifehacks.

I thought so too.


the

Beginning


But suddenly realized that all this is just copy paste on an industrial scale, but the correct decision is not for instruction, but for tool. Tool that performs the analysis, configuration and build projects on their own. In the end, continuous integration was intended to simplify life, not add new problems with the need to create a tutorials for writing such an exorbitant volume script. And then another, and maintain.

For this reason, I'm largely pleased with the services such as Travis and Circle the capacity of their language, the rigor and accessibility of infrastructure, but nevertheless, this is not enough. All this imposes the obligation to study their guides, requires a deep understanding of the platform on which the product is being developed. Have just enough to be able to make iOS or Android apps, it is necessary to know the features of the SDK and the device they have under the hood.



You can say that it is normal that every developer needs to know his platform and be able to configure a build from the command line, but I disagree. The developer should be able to develop, write, product, to know the methods of the SDK, the perfect library and know how to use them. But not to understand the systems of distribution, scripting languages and infrastructure. It is as before to create a simple site have to be a little bit more and the system administrator. Exaggerate a little, but I think you understand.

the

Research


In order not to reinvent the wheel, I had a deep dive into the Internet, where I expected to find already existing services and to test their strength. As everyone knows, the idea never comes up in one head.

I decided to take a test project that will give the experiences of all services.
The criterion of success is the ability to conduct a full cycle of continuous integration from source code to deployment in Crashlytics.

For starters, we'll focus on iOS, as I have personally, as the author more expertise in this area, and secondly, the creation of apple has always been famous for puzzling configuration of certificates and other obstacles.

As the sample for testing, take old project that I bullied in every article. And so there you go.

After a long diving right up to the 20th page of Google, I found three products that fit the description. Two of them were run, in principle, so we will not even consider the third though it worked, but something like: could not identify an appropriate version of Xcode, inexplicably took a long time to Carthage and Cocoapods(for the uninitiated — based), and created the impression that the cache of any kind, in principle, not heard. And in the end zafeylili Assembly, as expected:

Oh, these tales. Without false modesty, I realized that I can do better now. Because except for one ambitious formulations, it was also a clear understanding of what the competition is running so how to fix this and make the whole better and faster.

the

Work


Inspired by the idea together with the colleagues who supported the idea, we sat down for the development of the prototype. Omit pompous narrative about how we worked day and night under the 'Eye of the tiger', and instead of juicy marketing better tell you what we have achieved, what chips have implemented and that is now really working.

The main goal was to fully automate the setup of continuous integration for all, even the Manager was able to build in your company's normal business process, having the only link to the repository and with a complete lack of technical knowledge. We even conducted an experiment, asking the person not developing for iOS to configure continuous integration with our creations. We were very happy that it all happened. It was a signal that we are moving in the right direction.

A small demo video about how it all happens.


If you compare with Travis, with equal resources, projects going 4-5 times faster due to the optimization of dependency and no need to virtualize each individual worker and to deliver him missing.

I forgot to say. The project decided to call Buildben. First, just wanted Ben, in honor of the miraculous of our office cat, and then was born the game of words between Big Ben and Ben Build.

But we digress. You probably all realized that a class all by itself makes a cat cool, we're good and everything. As they say — what will surprise?

And that's what. We have prepared a few special features that you will enjoy:

the
    the
  • Caching of Carthage frameworks in the cloud. What Biljana once Belitsa again.
    If one is encountered, then there is a problem that many frameworks on github do not provide compiled binary. And if granted, it is only under certain Swift. We've made our store libraries for each version of Swift, which is regularly updated on the fly automatically.

  • the
  • Utility for self-configuration of office for iOS developer. When you deploy the app constantly have to think about certificates, profiles, bundle id, and all entitlements, icloud and other. We took it all on himself, and automated.

  • the
  • for cleaning Crashlytics app. Everyone who worked with Crashlytics know that when creating a new application, or even just change its bundle id, and have it at least once to run, that it has created. And if you need app with new bundle id to check? Or just want to use the charm distribution in Kraslice no trouble with the SDK?

    So, everything now works as it should. Enough in the admin panel to choose Crashlytics, then it itself.

    image

    We plan to make the opportunity just to drive a login and password from the Fabric or, if you have no account, you by to register it without dancing with tambourines.

  • the
  • Asynchronous Assembly. If something can be done simultaneously — we do it. For example, Cocoapods & Carthage are installed in parallel on different machines and then merge together. In the end, the tasks that do not require powerful resources are provided by the relevant micro-processes, allowing you to focus all the power on the compilation.

    image

the

Next step


At one point we realized that for too long stew in their own pot, and about the service, but a couple of friends and acquaintances, almost no one heard. And the money is not elastic, cloud in Amazon itself doesn't pay, you know.
It was decided to go look for investors in the best tradition of startups. Long search was not necessary, surprisingly, we were interested in and made an appointment.

Asked a lot of questions asked about the experience, as a team, which projects are developed, who see yourself in 5 years, what's our target audience, were asked to count the many different complex numbers, and a dozen some odd indicators, simultaneously reading lectures about how to live. In the end, we said the following:

" — ladies and gentlemen, it's great, the project is interesting. But there is one thing. You need users. Without them there is no certainty that the project is really in demand is developed. Find at least a couple of dozen people and companies that want to use your services and we will continue the conversation."

Where a techie can find a techie that loves new products and ready to go in the forefront? Of course here, on habré. My little encounter with the audience on several written articles have shown that the people here though, and loves to criticize, but intelligent and inquisitive.

I'm not a salesman and marketer and do not know how to speak beautifully about love, but if you've read up to this point, it means that the theme you found it interesting and we will be glad, if you would use it.

We have a small landing site, where you can leave the application for beta testing, you are welcome. Each application, triggered my alarm clock, and I run to answer immediately. But, unfortunately, our resources are now very limited, and can not invite everyone, but I'll try.

the

Important details


At the end of the post add the FAQ which will be updated as the dialogue in the comments.
Security issues can be found there now. This is a particularly important aspect that everyone understands.

I want to say and to repeat that the development of the boxed version that you can deploy and forget about the paranoia, is among the most priority and we know that it's necessary.

the

Conclusion


Perhaps, that's all I wanted to tell. I will be glad to answer questions, to listen and to bless in more detail any aspects.

Oh, by the way, here is the same cat I was talking about:



A miracle, isn't it?

And by tradition I want to share some useful links:

the
    the
  • Crashlytics is incredibly comfortable and the free distribution system. Has good tutorials and a coherent SDK for iOS & Android, I recommend.
  • the
  • Mattermost chat for team communication like Slack, only self-hosted and free. Easily integrates with all of. If you are still discussing business matters in the telegram.
  • the
  • Fastlane is the Swiss knife for continuous integration. If you yourself are deploom, it's just a must have. However, requires some knowledge of Ruby.


UPD1: Oops! Unexpectedly, we received several dozen applications and a steady list of bug reports.
Forced suspended the admission of new members to the nearest Monday.
We will pay attention to all new users, thank you for being with us.

the

FAQ


Question: how can I be sure that my code will not flow away?
Answer: In the first place is our main main responsibility. We don't read your code and no one from the outside can access it, all hidden in individual sandbox for each project. And even more, we deleted it immediately after Assembly, leaving only the logs. It is written in our confidentiality agreement that you sign automatically by registering in our service. So We're in agreement on privacy write, that deleted the source code after Assembly.

Question: Okay, and what about access to iTunes Connect? How can I be sure you won't break our application?

Question: do you Plan to release a boxed version that you could deploy at home and not to worry about the safety?
Answer: Plan to very soon. This is one of the priority areas.
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Wikia Search — first impressions

Emulator data from GNSS receiver NMEA

mSearch: search + filter for MODX Revolution