The OctopusDeploy OpenFeature provider for Java.
This provider works with the OpenFeature Server-Side SDK. It is not intended for use in clients such as browser or desktop applications.
Octopus Deploy is a sophisticated, best-of-breed continuous delivery (CD) platform for modern software teams. Octopus offers powerful release orchestration, deployment automation, and runbook automation, while handling the scale, complexity and governance expectations of even the largest organizations with the most complex deployment challenges.
This provider will work with Java 11 and above.
The Octopus OpenFeature provider for Java is available as a Maven package. You can add it to your project using your dependency manager (e.g. Maven or Gradle).
<dependency>
<groupId>com.octopus.openfeature</groupId>
<artifactId>octopus-openfeature-provider</artifactId>
<version>0.2.0</version> <!-- use current version number -->
</dependency>
implementation group: 'com.octopus.openfeature', name: 'octopus-openfeature-provider', version: '0.2.0'
// Use current version number
import dev.openfeature.sdk.*;
import com.octopus.openfeature.provider.*;
public class Main {
public static void main(String[] args) {
var openFeature = OpenFeatureAPI.getInstance();
openFeature.setProviderAndWait(new OctopusProvider(new OctopusConfiguration("Your Octopus client identifier")));
var openFeatureClient = openFeature.getClient();
var darkModeIsEnabled = openFeatureClient.getBooleanValue("dark-mode", false);
}
}
For information on using the OpenFeature client please refer to the OpenFeature Documentation.