flipt-io / flipt

Enterprise-ready, GitOps enabled, CloudNative feature management solution
https://flipt.io
GNU General Public License v3.0
3.78k stars 210 forks source link

Integration with JIRA #3498

Open thepabloaguilar opened 1 month ago

thepabloaguilar commented 1 month ago

Problem

Hi, it's me! It has been a while that I don't show up here 😄

I recently I was exploring JIRA and the developers tool we can integrate with and it has some integrations for Feature Flag services like this one for LaunchDarkly! It might be a great addition to Flipt, I just don't exaclty how to develop this but there're some documentation: Build a Jira hello world app

Ideal Solution

Jira integration with Flipt where we can specify feature flags and take some actions over them (maybe not all)! There's also this documentation from LaunchDarkly about how to configure and explaning some integration aspects: https://docs.launchdarkly.com/integrations/jira

Search

Additional Context

No response

thepabloaguilar commented 1 month ago

And I found this module Feature Flag

erka commented 1 month ago

There is some other ideas related to this issue https://github.com/orgs/flipt-io/discussions/3042

thepabloaguilar commented 1 month ago

Going deeper on how we can easily integrate with Jira I've found out there's two ways for creating an app:

For this case I think the later is better and for now we just have the Feature Flag module for Connect apps. They have some tools for building one but don't have any for Go: Connect frameworks and tools.

But I guess it's not something we can't implement in Go, so far I just saw one module from them in the examples which just deal with JWT, Understanding JWT for Connect apps

thepabloaguilar commented 1 month ago

To start, all we need to do is create an endpoint to serve a configuration file:

{
  "name": "Hello World",
  "description": "Atlassian Connect app",
  "key": "com.example.myapp",
  "baseUrl": "https://<placeholder-url>",
  "vendor": {
    "name": "Example, Inc.",
    "url": "http://example.com"
  },
  "authentication": {
    "type": "none"
  },
  "apiVersion": 1,
  "modules": {
    "jiraFeatureFlagInfoProvider": {
      "homeUrl": "https://myfeatureflagprovider.com",
      "logoUrl": "https://myfeatureflagprovider.com/images/logo.svg",
      "documentationUrl": "https://myfeatureflagprovider.com/docs/jira-integration",
      "actions": {
        "createFlag": {
          "templateUrl": "https://myfeatureflagprovider.com/integration/jira/create?issueKey={issue.key}"
        },
        "linkFlag": {
          "templateUrl": "https://myfeatureflagprovider.com/integration/jira/link?issueKey={issue.key}"
        },
        "listFlags": {
          "templateUrl": "https://myfeatureflagprovider.com/integration/jira/flags?issueKey={issue.key}"
        }
      },
      "name": {
        "value": "My Feature Flag Provider"
      },
      "key": "featureflag-integration"
    }
  }
}

As Flipt can be deployed on-premisse and in different ways I'd also say this should be generated based on configurations like the base url and even the name (to allow differentiation between environments)