We are going to adopt our app to Connect on Forge. However I have question regarding the app key. Let me give some background:
Currently we have Connect app, deployed on different environments (prod, test, dev). They all have the same key, but different urls. Only the prod version is listed on the MP. It was initially implemented that way because the app requires ACCESS_EMAIL_ADDRESSES scope thus all environments need that as well.
As stated on limitations and differences the key for each environment should be set differently.
In that case we should create private listings for test & dev and set appropriate keys for them before we start Forge migration/deployment.
Could you confirm my thoughts? Will we need to request the scope mentioned before for “new” private listings?
The key for each Forge environment should differ, as it is not possible to install multiple environments with the same key. For example, if you used connect.app.key for both Development and Production, you’ll need to uninstall the app between installations to ensure the installation work succeed; otherwise you’ll face a failure due to a key conflict.
With that said, it’s also worth noting that the utilisation of private listings on the marketplace is not compatible with Forge, as noted here. There are a few options you can explore to accomodate this, depending upon how you were using these apps previously. This includes, but is not limited to:
Installing the varying environments of your app directly to those instances utilising the forge install command. You can extend this further if required by having additional custom development environments.
@SeanBourke can you please clarify whether or not this is a hard requirement?
Because reading between the lines, it seems that you can use the same connect.app.key if you are using multiple instances.
We use the same approach for our connect app with a single key, and we have multiple cloud instances usually suffixed with -dev, -acc and -prod in which we install the respective versions of the app.
I reckon this should also work with Connect on Forge. If we install the Development environment in our -dev site, the Staging environment on -acc and the production environment on -prod, we should be fine, right?
If this is correct, I think the documentation should be changed as it currently reads as a hard requirement.
So, if your connect on forge app key is: com.myapp.connect.on.forge and it is deployed (using forge deploy) in development, staging and production environments, then: -
You cannot install different forge environments of this app in the same site. For eg.: -
forge install --site mysite.atlassian.net -e development // this will work
forge install --site mysite.atlassian.net -e staging // this will fail because the app with the same key is already installed in mysite.atlassian.net and you will have to uninstalled that first.
However, in this case you can create environment specific keys in your manifest.yml and be able to install different forge version in the same site such as: -