flipt icon indicating copy to clipboard operation
flipt copied to clipboard

Integration with JIRA

Open thepabloaguilar opened this issue 1 year ago • 4 comments

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

  • [X] I searched for other open and closed issues before opening this

Additional Context

No response

thepabloaguilar avatar Sep 27 '24 17:09 thepabloaguilar

And I found this module Feature Flag

thepabloaguilar avatar Sep 27 '24 17:09 thepabloaguilar

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

erka avatar Sep 27 '24 19:09 erka

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

  • Using forge, which is kind a developer framework where your app is deployed in the Atlassian infrastructure
  • Using Connect, a connect app is basically any application (deployed anywhere) that follows some API specifications

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 avatar Oct 04 '24 04:10 thepabloaguilar

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)

thepabloaguilar avatar Oct 04 '24 04:10 thepabloaguilar