41

Strategies to Deliver Apps Faster with Continuous Integration

 4 years ago
source link: https://www.tuicool.com/articles/Y3ueYfI
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

images?q=tbn:ANd9GcQGdCeciGfZtxPOP2Dn8rDwn3iBjJOOVz7gTrTyLoUrdOsUHNORUA

Agile DevOps practices are changing the ways apps are being developed and delivered. This collaboration of software developers and IT operations staff allows for faster development cycles, more frequent updates, and faster delivery.

Companies not using DevOps might do software updates annually. That’s because the pathway to deployment could take a long time. Developers focused on code. When the code was completed, the operations team would go to work to make sure everything runs smoothly. Then a security team might analyze it. When an issue arose, it was back to the developers to start the cycle over again.

In a DevOps world, these independent teams are working together at the same time . Instead of working on a large code base, parts of codes are partitioned in containers or repositories. By working on parts of the code, any new feature that is introduced doesn’t affect the entire code until it’s been tested. Changes become more incremental and less complex.

Continuous Integration (CI) allows for updates whenever needed . With automated delivery systems, these updates happen more frequently and seamlessly – even multiple times per day.

CI Pros And Cons

There are pros and cons to using a CI model for your app development.

Pros

  • Faster bug fixes

  • Stronger code base

  • Rapid app development

  • Increased efficiency

  • Automated pipeline

Cons

  • Higher initial investment

  • Training takes time

  • Getting internal buy-in

  • Changing habits of coding teams

  • Constant testing and review

CI Best Practices

You will want to make sure Continuous Integration is right for your organization before jumping in. You can expect growing pains as your teams change habits and work cohesively. However, using best practices for CI will help forge strong habits that can make a significant difference.

It starts with mapping out the process from start to finish. This strategic roadmap will take time to develop, but it will act as the blueprint for how projects are to be done. It may help to start with a single project and beta test it. Include frequent checkpoints, reviews, testing, and feedback.

As always, having the right people on board is key. You may find you need to recruit new team members with different skill sets in order to make CI work for you. There may be some team members that won’t buy-in or have trouble letting go of the old ways of developing apps. It’s a big change for developers who are used to bigger and less frequent code commits.

All of your team will need training in the process. Make sure they have adequate support and encouragement along the way. It helps if you can find team leaders that are evangelists for the CI process to guide the way.

One critical component of your process is a single code base. Even though parts of the code will live separately in repositories or containers, all pull request should come from a central branch to make sure your code stays current. While you can still use branching, the cycle should be rapid. Production fixes should be addressed and then merged back into upstream branches as soon as possible to avoid unintended forks.

Jeremiah Small, Director of Engineering at Soliant Consulting, outlines this process , “Developers write a new feature or fix a reported bug on their development machines and then push their new branch to a collaborative repository. Automated unit and integration tests run and notify the team of potential new bugs or other code quality issues. Assuming the automated tests pass, the developer creates a pull request (aka PR). A PR allows developers and reviewers to comment directly on the changes the developer submits to the main branch. Most PR tools support convenient inline dialog about the proposed changes.”

Clear communication across the team is critical to maintaining QA. Everyone should have the ability to see every change made to the code. This helps keep everybody on the same page and lets team members see how changes affect other portions of the code.

The right tools are critical as well. CI works best with a distributed version control system (DVCS) designed for easier merging. Open source code tools, such as Git used with  GitHub as a collaboration server, can streamline your process and help ease frustrations. A suite of tools such as  AtlassianBitBucket for pull requests, and  Bamboo for CI can facilitate closed source projects. Ultimately, though, it’s what your DevOps team is comfortable using that will dictate your choice.

Finally, everyone on the team should PR their code at the end of every day to the main repository to minimize merge conflicts. These daily code commits are a critical habit to establish.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK