Jira plugin development in cloud

Here I'm trying to upload a plugin to JIRA cloud

Goal is: if any events are created or resolved or it may be JIRA release, my json should receive that and trigger the mail to the users.

I created json and xml file as in tutorials:https://developer.atlassian.com/static/connect/docs/latest/guides/migrating-from-xml-to-json-descriptor.html

atlassian-connect.json

{
"name": "PlugIn",
"description": "Atlassian Connect add-on",
"key": "plug-in1",
"baseUrl": "https://3a48dc0a.ngrok.io",
"vendor": {
"name": "My Organization, Inc",
"url": "https://developer.atlassian.com"
},
"authentication": {
"type": "none"
},
"apiVersion": 1,
"modules": {
"webhooks": [
{
"event": "jira:issue_created",
"url": "/issue-created"
},
{
"event": "jira:issue_updated",
"url": "/issue-updated"
}
]
}
}

 

atlassian-plugin.xml

<?xml version="1.0" ?>
<atlassian-plugin key="plug-in1" name="PlugIn" plugins-version="2">
<plugin-info>
<description>Atlassian Connect add-on</description>
<version>1</version>
<vendor name="My Organization, Inc" url="https://developer.atlassian.com" />
</plugin-info>
<remote-plugin-container key="container" display-url="http://localhost:8000">
</remote-plugin-container>
</atlassian-plugin>

The url which i get after running ngrok, i'm uploading it to JIRA in manage add-on's, but i'm getting the error while uploading:

//The add-on descriptor failed to validate against the schema. Please confirm this add-on is intended for use with JIRA and then contact the add-on vendor.

1 answer

0 vote
Chris Fuller Atlassian Team Feb 27, 2017

The error message as you pasted it includes extra whitespace.  Maybe you accidentally included it in your descriptor without realizing it and the value isn't trimmed?

/baseUrl: string " https://3a48dc0a.ngrok.io" is not a valid URI//
                  ^--- extra space in the string?

Yep i did it, but error is same

I need to clarify the approach is in right way??

Chris Fuller Atlassian Team Feb 27, 2017

I'm not an expert on Connect, so I'm not sure whether there are any other problems with the descriptor or not.

What I can tell you is that the specific error that's being reported comes from json-schema-validator and the reason it gets generated is only ever that Java itself says there is something wrong with the URI, as you can see in its URIAttribute.java source.

I suggest that you remove the baseUrl attribute from the descriptor and carefully type it back it, because the error message is definitely telling you that this is the problem.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

102 views 0 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you