Skip to main content

Set up the Companion App

Deploy the Script Master Companion App to your site and connect it to Script Master. Web triggers, scheduled jobs, scripted fields and post functions run only once it's connected. To learn what the Companion App is first, see The Companion App.

Before you begin​

  • Jira or Confluence permission: you need to be a Jira admin or Confluence admin to change Script Master's Settings, and to install an app on the site.
  • Tools on your computer: Git, Node.js, the Forge CLI, and Yarn with Corepack turned on (npm install -g yarn && corepack enable).
  • An Atlassian developer account: sign in to the Forge CLI with forge login and an Atlassian API token.

Deploy the Companion App​

You do this once. You can then install the same app on Jira, Confluence or both.

  1. Clone the Companion App's repository and install its dependencies:

    git clone https://github.com/kaisersoftapps/script-master-sandbox.git
    cd script-master-sandbox
    yarn install
  2. Register it as a new Forge app under your developer account:

    yarn forge-register script-master-companion-app
  3. Build it and deploy it to Forge's production environment:

    yarn forge-deploy -e production

Result: The Companion App is deployed under your account, ready to install.

Install it on your site​

  1. Install the Companion App on your Jira site:

    yarn forge-install --site example.atlassian.net --product jira --non-interactive -e production
  2. In Jira, select Settings > Marketplace apps, then select Script Master: Companion App under Apps in the sidebar.

    The page shows a Token field with the Companion App's URL.

PlaceholderDescription
example.atlassian.netThe address of the site Script Master is installed on

Connect it to Script Master​

  1. On the Script Master: Companion App page, select the copy button next to Token.

    Companion App admin page with the Token field and its copy button

  2. Open Script Master and go to the Settings tab.

  3. In Secured Execution, paste the URL into the text field.

  4. Select Save.

    Secured Execution section on the Settings tab, with Current status showing Secured Execution

Result: Current status changes to Secured Execution. The Action Required banner disappears from the Web Triggers, Scheduled Jobs, Custom Fields and Workflows tabs.

warning

The URL contains the Companion App's secret token. Anyone who has it can run scripts in your Companion App, with its permissions. Don't share it, and don't paste it into tickets or chats.

Replace the token​

Make a new token if the old one may have leaked. The old URL stops working at once, so server-side scripts fail until you finish these steps.

  1. On the Script Master: Companion App page, open the β€’β€’β€’ menu next to Token and select Recreate.
  2. In Recreate Token?, select Recreate.
  3. Copy the new URL.
  4. In Script Master, open the Settings tab. Current status shows Invalid Configuration, because the old token no longer works. If it still shows Secured Execution, the text field is locked: select Reset, which saves an empty URL at once.
  5. In Secured Execution, replace the URL in the text field with the new one, and select Save.

Result: Current status shows Secured Execution again.