Before running, follow these instructions:
- You need to be able to install add-ons on the Jive server being used for this tutorial. Registered developers can use the Jive Developer Sandbox, which allows you to install most types of add-ons. You can request Sandbox access from the Jive Community Developer Page.
- Your development system must be accessible to the Jive server. Consider using a cloud-based IDE (such as Nitrous.IO) for this tutorial.
The following instructions should help you get the GitHub4Jive project onto the developer sandbox for testing.
- Determine the hostname for your service. All subsequent references to
SERVICE_HOSTNAME
should be replaced with this hostname. If you are using Nitrous.IO, you can determine the hostname by selecting any Port submenu item from the Preview menu. When recording the hostname, be sure to omit the port number and do not include a terminating backslash (/).
For example:http://blazing-example-12345.usw1-2.nitrousbox.com
- Clone the GitHub4Jive repository.
git clone https://github.com/jivesoftware/GitHub4Jive.git
- Change to the add-on subdirectory.
cd GitHub4Jive/GitHub4Jive-Addon
- Update your Node.js dependencies.
npm update
- Update the
clientUrl
property in thejiveclientconfiguration.json
file, which can be found in theGitHub4Jive-Addon
subdirectory. If you are using Nitrous.IO, refresh the file browser panel before browsing for this file.
"clientUrl": "http://SERVICE_HOSTNAME",
Remember to replace theSERVICE_HOSTNAME
value with whatever you got from the first step. - (Optional) Change the
name
property value to something more personalized.
"name": "My Personalized GitHub4Jive Project Name",
- Authorize your service's use of the GitHub API using your GitHub account.
- Log in to GitHub.
- From the GitHub settings, register a new developer application.
- Choose a recognizable
Application name
. - Set the home page URL to any URL. This URL will be accessible from within the Jive place you will create.
- Set the
Authorization call URL
to the following URL:
http://SERVICE_HOSTNAME:8090/github/oauth/callback
Remember to replace theSERVICE_HOSTNAME
value with whatever you got from the first step. - Click Register application.
- Grab the Client ID and the Client Secret specified in the GitHub application page and fill in the OAuth key and secret within the
jiveclientconfiguration.json
file.
"oauth2ConsumerKey": "GITHUB_APP_CLIENT_ID",
"oauth2ConsumerSecret": "GITHUB_APP_CLIENT_SECRET",
Replace theGITHUB_APP_CLIENT_ID
with the GitHub Client ID andGITHUB_APP_CLIENT_SECRET
with the GitHub Client Secret. - Start your GitHub4Jive service.
node app.js
- Download the
extension.zip
file produced from starting your service. (If you are using Nitrous.IO, refresh the file browser panel before browsing for this file. Right click on the file and select Download "extension.zip".) - Navigate to https://sandbox.jiveon.com/addon-services!input.jspa in the Jive Sandbox to install your newly created add-on.
- Upload the
extension.zip
file that you just downloaded.
You can now create a group or project within the Jive Sandbox and select the GitHub4Jive place template (found within the Other category) to get started.
To develop and test the Jive cartridge, add
"type": "jab-cartridges-app"
to the extensionInfo
object in jiveclientconfiguration.json
.
Without this entry, the SDK will not package the cartridge into the add-on.
For a tour of the GitHub4Jive Add-On code (which includes sequence diagrams), refer to: