This workshop will help you get started with Forge so you can customise and extend Atlassian products either for your own use, or for selling in the Atlassian Marketplace.
During this section, you will be performing the following setup steps:
You need an Atlassian account in order to develop Forge apps. If you don't have an Atlassian account already, you can create one by visiting https://id.atlassian.com/ and clicking the Create an account link.
If you haven't already, you'll probably want to install the following development tools:
- Git
- A Javascript friendly IDE such as Visual Studio Code.
To setup Docker, follow the instructions in A.SetupDocker.md.
To setup Node.js, follow the instructions in B.SetupNode.md.
To setup the Forge CLI, follow the instructions in C.SetupTheForgeCLI.md.
Creating an Atlassian cloud developer site allows you to install and test your app with Confluence and Jira products set up for you. You can install your app to multiple Atlassian sites however, app data won't be shared between separate Atlassian sites, products, or Forge environments.
- Go to http://go.atlassian.com/cloud-dev and create a site using the email address associated with your Atlassian account.
- Once your site is ready, log in and complete the setup wizard.
CLI - Forge CLI is the command line interface for building and deploying Forge apps.
Jira Modules - Modules describe how Forge apps extend and interact with Atlassian products.
Permissions - Permissions controls your app's access to remote resources.
Manifest - The manifest is a YAML file that describes your Forge app. It includes the modules your app wants to use, the permissions required by your app, and other information about your app.
App Deployment - Forge automatically creates development, staging and production environment to deploy your apps.
Environment variables - Key-value pairs you can manage via the Forge CLI variables commands for different environments.
Tunneling - Tunneling runs your app code locally on your machine via the Forge CLI.
Now that you have a Forge development environment, it's time to create your first app.
- In a terminal or shell, change to a directory that you want your Forge app to be located under.
- Run
forge create
.
- Enter a name for your app using the convention of lower case letters and dashes.
- Select the
UI Kit 2 (Preview)
as the category. - Select
jira-issue-panel
as the template.
- Wait for the app to be created.
- Change into your app's directory. e.g.
cd forge-workshop-hello
- Run
npm install
. - If prompted, run
npm audit fix
to fix vulnerabiolities. - Run
forge deploy
to deploy the app.
- Run
forge install
to install the app. - Select Jira as the product.
- Enter the URL of your Atlassian developer site which you created previously.
- Enter
y
when asked if Are you sure you want to continue installing the app?. - Visit your Atlassian developer site in a browser.
- If you haven;t got any projects, create one by selecting Create project from the Projects menu.
- If you don't have any issues in your project, create one by clicking the Create button.
- Visit an issue in your project.
- Select your app's issue panel from the menu and check it renders as follows:
💪 You've just created and installed an app in a few minutes.
🎉 And you didn't need to set up any hosting.
Your app has two parts:
- Backend functionality that runs on Atlaassian's functions as a service (FaaS)
- A front end that renders the Issue context panel.
You can find the code for these two parts here:
TBD (more explaining to do)
- UI kit
- Components help build UI of your app.
- Components are described using declarative markup language.
- Follows Atlassian Design guidelines out of the box.
- Custom UI
- Supports custom built UI using iframes
- Use your own HTML, CSS, JS, icons, images
- Forge hosts your static resources
- Product trigger - Product trigger invokes a function when a product event is fired.
- Scheduled trigger - Scheduled trigger repeatedly invokes a function on a scheduled interval.
- Web trigger - Web trigger invokes a function as the result of an HTTP request.
- Storage API - The app storage API is a key-value storage API, which enables your app to store data for specific Jira or Confluence sites. The app storage API stores data partitioned by product and site, and is accessible only to your app.
- Entity Properties - Entity properties enable apps to add key-value stores to Jira entities, such as issues or projects.
TBD (do a little tour of Developer Console features centred around the app we created)
- Async API
- Integration with third party APIs
- Developer Console - All the tools necessary to manage your apps, monitor their performance, check the logs and ability to distribute your app.
- Debugging - forge tunnel —debug
- Example Forge apps for Jira
- Tutorials and guides
- Use the
forge deploy
command when you want to persist code changes into the cloud. - Use the
forge install
command when you want to install the app on a new site. - Once the app is installed on a site, the site picks up the new app changes you deploy without needing to rerun the install command.
- Use the
forge upgrade
command to push a new version change to existing installations (ex: when you make changes to manifest, such as permissions/scopes) - Use the
forge tunnel
command to quickly test code changes in theDEVELOPMENT
environment (app runs locally is proxied)