Delivering Your Code to the Cloud With JFrog Artifactory and GitHub Actions

Introduction

Artifactory and GitHub actions work great together to manage your deployments to the cloud. In this post, we’re showing an example that deploys an application to Microsoft Azure. This case involves an Azure web app, but the techniques we’re showing today could be used to deploy to any cloud service, virtual machines, or Kubernetes. Also, the application highlighted today is written in Java, but you could use any type of application code in the same way. I’m using Azure web apps because it has built-in CI/CD integration and it integrates easily with JFrog products, including Artifactory and X-Ray. The IDE I’m using is Visual Studio Code, an open-source, free text editor you can get at code.visualstudio.com. Our code is in a GitHub repo, and we're storing some of the dependency artifacts using Artifactory. Here’s a screenshot of the application:

It's a Spring Boot application that shows the Microsoft Developer Advocate mascot named Bit.  You can find the source code in this repo

“Move Fast, With Safety:” CloudBees Connect 2022

Where is software delivery headed in 2022 and beyond, and what role will continuous delivery play? How have organizations like yours successfully transitioned to continuous delivery-and how can you take advantage of what they've already learned? Can feature flags help pave the way, and if so, how can you avoid the most common pitfalls as you scale?

Join us on Wednesday, February 9, 2022 for a half-day event to gain insight into the future of software development and delivery-broadly, as well as at your own organization. You'll have an opportunity to attend sessions and workshops to help you accelerate your DevOps maturity. You'll also be able to network with your like-minded peers-those in similar positions, and those who have walked your path already.

Trunk-Based Development

When coding an application, it is important to remain in sync with the other engineers working on the project. One strategy that helps a team stay in sync with codebase changes is trunk-based development. When employing trunk-based development, the developers working on a project make all their code changes in a common branch known as "trunk". There are numerous benefits to developing with this approach, which we will discuss in this article.

What Is Trunk-Based Development?

Trunk-based development is a version control management practice where developers merge small, frequent updates to a core trunk or main branch. It’s a common practice among DevOps teams and part of the DevOps lifecycle, as it streamlines merging and integration phases. In fact, trunk-based development is a required practice of CI/CD. Developers can create short-lived branches with a few small commits compared to other long-lived feature branching strategies. As codebase complexity and team size grow, trunk-based development helps keep production releases flowing.

How to Build the Process and Culture Behind Using Feature Flags at Scale

Feature flags are a great way to release features quickly with very low risk — they allow software teams to make changes without re-deploying code. They have the power to make an organization’s DevOps practices more efficient, enabling testing in production. They can help developers, operations, QA, product, customer success, sales, and marketing teams deliver higher-quality features, faster.

But like many powerful tools, feature flags need to be used with care. When an organization adopts feature flags, it needs to simultaneously adopt a set of best practices for using them effectively and safely. This article goes beyond a technical “how-to” guide for implementing feature flags, and into the realm of process and culture. Sure, you can start using them today as an individual or a small team, but to truly realize the benefits of feature flags, the entire organization needs to embrace them — and without the necessary process and cultural shifts, you can accumulate a very large load of technical debt very quickly. At best, you’ll end up with bloated code, and at worst, the bloated code can lead to catastrophic events.

Feature Flagging: Falsehoods, Fallacies, and Downright Fictions

In a world where every business is essentially a software company, why wouldn’t everyone need a way to make safe and reliable changes to their software? If “feature flags” or “feature toggles” or “gatekeepers” are a proven method used by Facebook or Twitter, why on earth isn’t everyone doing it - or, at least, trying to do it?  

The concept of feature flagging is relatively old, but not standardized in the community, and there are some misconceptions about this practice. Over time, I’ve learned to separate facts from fiction.

Progressive Delivery: A Detailed Overview

Every developer has been there before: You release a new feature expecting a smooth ride, only to have something go awry in the back end at the last minute. 

An event like this can derail a launch, letting down customers and leaving you scratching your head wondering what went wrong.

Increasing Insights and Productivity Using Feature Flags Across CI/CD

The following is the final blog in a three-part series on feature flags in CI/CD. To read the first blog on feature flags in CI, click here. To read the second blog on features flags in CD, click here.

There's no question that continuous integration (CI) and continuous deployment (CD) make life easier and more productive for technology teams. Quality and customer satisfaction increase when you give them tools that deliver code faster.

Feature flags are one of the tools that make your CI/CD pipeline work better. They help your team shepherd features through your pipeline safely, quickly, and effectively. They make your team more productive while giving them feedback on how they're doing at the same time.

Introduction to Feature Flags in CD

The following is the second blog in a series on feature flags in CI/CD. To read the first blog on feature flags in CI, click here

Are you having problems realizing the speed and agility promised by continuous delivery (CD)? Does continually delivering new code seem impossible to you? Feature flags might be the tool you're missing. Without them, implementing CD is difficult. With feature flags, it's not just easier; it's better.

Introduction to Feature Flags in Continuous Integration

The following is the first in a series of posts related to feature flags across CI/CD.

Continuous integration (CI) and feature flags look like a match made in heaven. Integrating code regularly, combined with the ability to isolate new features and turn them on and off at will, means you can move fast and still manage risk.

But with great power comes great responsibility. Feature flags require careful planning and continuous management, just like your builds do.

The First Stages of Feature Flag Adoption

For quite a while now, developers have used snippets of code to turn features on and off during runtime. These code snippets, more commonly known as feature flags, allow you to change features (or sub-sections) of your application without re-deploying. They help developers release code faster, with less risk. 

Feature flags are more prevalent than you might believe. At most companies, though, adoption begins at the grassroots level. Developers—usually within a single team, and often just a few individuals—implement a handful of feature flags in an ad hoc way. In these early stages, feature flags aren’t usually being considered at a systemic level. They’re meant to solve specific pain points at specific points in time. There is no formal program in place, and there are no plans to manage flags across teams. 

Understanding the Feature Flag Lifecycle

Feature flag deployment is gaining popularity as a way to provide safer and more effective deployments for teams looking to streamline their deployment pipeline. Feature flags simplify the process of making more frequent deployments by allowing granular control of the functionality deployed based on the environment.

As a refresher, a feature flag (also called a feature toggle) modifies software functionality without requiring a redeployment, effectively allowing for dynamic and easy configuration of software. Some of the perks of being able to do this include:

Using Feature Flags During Incident Management

switches

Whether you call it an Incident, outage, surprise, or unplanned work, your application isn't working as expected, and you need to deal with the problem. Your aim during incident resolution is to minimize the impact and get services restored as quickly as possible.

I am defining an incident as unplanned service interruption or reduction in quality. An incident can be:

Togglz With Spring Boot Integration

In the disruptive world, business wants to experiment a feature for a time period in production, operational team inspect a feature with resource consumption, developers want to be up to date with trunk branch while their development spans for a long time. How all this happen and still application/product works without any hassles?

It can be solved by toggle points protected and accessed on demand which is called feature flags. To know more about, refer RefCard. Instead of many hanging custom made code, if we have library which can organize all the flags horizontally across the software it will be easy. So Togglz does that!

Feature Flags Are The Answer To Retailers’ Holiday Nightmares

Feature flags for fast targeted deployments

It was 5 p.m. on Thanksgiving, and everyone had left their homes, full of turkey and stuffing, to drive down to your store for the Black Friday sales. Your team was excited about the new feature implemented on your app that will make it easier for customers to locate sales and speed up the check-out process. You had been working on the code for months, running tests and ensuring that everything will operate efficiently on the day. You couldn’t wait to review the amazing data and upgrade this feature for Cyber Monday.

5 Best Practices for Feature Flagging

Handle these carefully, and only with best practices

As software teams seek higher agility, the tools and techniques for software development and delivery continue to evolve every year. DevOps and CI/CD practices provide a solid framework that allows teams to release software with increased automation and with less risk. One of the best ways to do this is to incorporate feature flagging into software development practices.

You may also enjoy:  Controlling Features With Feature Flags [RefCard]

In their most basic form, feature flags are “if and else” statements that create a conditional branch into code, which allows developers to restrict some functionality to certain groups of users. If a flag or toggle is switched on, the code is executed; else skipped. However, feature flags can go beyond simple boolean states and could be a complex logical statement, list, array and more.

How to Manage Outdated Feature Flags

Feature flags, or feature toggles, are a gold standard of Agile software development and Continuous Integration for good reason: they help teams deliver new features to customers safely, and with better control. If you’ve ever needed to validate new functionality with end-users (hint: test code in production!), quickly roll back a change, or run an A/B test on a feature, you might be a fan of feature flags too. They help de-risk feature releases and code deployment.

But as a DevOps engineer, feature flag management can also give you heartburn. When they’re mismanaged, you can end up with a codebase littered with old, forgotten feature flags that actually introduce risk.

Some Thoughts on Toggles

Kent Beck was asking about “Feature Flags” on Twitter recently and their life cycle. Former colleague, Pete Hodgson linked back to an article he’d written to for Martin Fowler a couple of years ago, and added context.

I don’t think this article fits in that Tweet series, so it’s a standalone blog entry — much of which I’ve shared before.

Feature Flags in React

Feature flags allow you to roll out a feature gradually rather than all at once. At Optimizely, we commonly use feature flags to reduce the risk of complicated deploys like rebuilding UI dashboards.

However, building a feature flagging system is usually not your company’s core competency and can be a distraction from other development efforts.