Use the Dev and Deployment Tool
Use this page to set up the tool and start adding repositories.
Background knowledge
To use the Dev and Deployment Tool, we assume you can do a few fairly technical things:
- Use git, at least a little, to manage code. It's totally fine if you use tools like SourceTree or your IDE to make this easier for you.
- Run commands using an IDE like IntelliJ IDEA or via a terminal or command line. We'll tell you which commands.
The Dev and Deployment Tool works by running Gradle tasks to send your scripts' code and configuration to ScriptRunner Cloud. You don't need to know anything about Gradle or how it works to use the tool, as long as you can run the commands described in the documentation here.
Set up the tool using a sample repository
Follow these instructions to set up your tool:
migration-example-project.Authenticate the Dev and Deployment Tool for your site
To add scripts to your instance, the Dev and Deployment Tool has to authenticate against your site.
Normally, this happens automatically. When you run a deployment command, a browser window opens asking for your permission. When you click Allow, the Dev and Deployment tool caches your credentials.
Recommended workaround: Set up Atlassian API token credentials
Alternative Workarounds:
- Downgrade to older browser versions.
- Firefox: 150 or earlier
- Chrome: 140 or earlier
- Disable browser security settings
- Chrome:
- Navigate to
chrome://flags/#local-network-access-check. - Change Local Network Access Checks to Disabled.
- Navigate to
- Firefox:
- Navigate to
about:config. - Set
network.lna.enabledtofalse.
- Navigate to
- Chrome:
Set up Atlassian API token credentials
While the automated process works, you could need something else for the following reasons:
- You're using the Dev and Deployment Tool inside a Continuous Integration Environment like Jenkins, Bitbucket Pipelines, GitHub Actions, Gitlab Pipelines, or something similar
- You would like to avoid the Allow/Deny dialog box and want to remove this one
Follow these steps to set up new Atlassian token credentials to add to your home directory:
Optional: Add your old scripts to the project
You may find it helpful to have your old scripts from DC alongside your new Cloud scripts while you edit. This step is entirely optional and is mainly intended for users who want to do a side-by-side comparison of the cloud code and the DC code in their favorite code editor.
To add your scripts to the sample repo to start using the tool, follow these steps:
- Make sure you have your script export.
- Add your script code to the Data Center scripts to the
onprem/src/main/groovydirectory.
Rewrite your scripts
- Rewrite the scripts for Cloud however you like (perhaps with the help of the Migration Agent), and put the Cloud equivalent scripts in the
cloud/src/main groovyfolder. - Edit the
cloud/src/main/resources/extensions.yamlfile to include the configuration for each supported feature (the Migration Agent can help with this too)
Refer to the Supported Features for the current list of ScriptRunner Cloud features that the Dev & Deployment Tool works with
Open the project in an IDE
Open your IDE with Gradle and Groovy support. For an IDE, we recommend IntelliJ IDEA. The free Community Edition supports everything that you need to use this project.
Optional: Use mapping variables
When migrating from Jira Data Center, scripts and configuration files contain hard-coded data center entity identifiers that have different values in Cloud, like custom field IDs, issue type IDs, user keys, etc. The Dev and Deployment Tool allows you to define IDs as variable names and refer to them in your scripts and yaml configuration, instead of using hardcoded values.
For a detailed guide on the mapping file format, placeholder syntax, supported entity types, and how to deploy configurations with mapped IDs, see MAPPING.md.
Deploy scripts from an IDE
You can deploy scripts from an IDE in one of two ways:
- From the command line, accessible by selecting Terminal:
- From the Gradle tool window, accessible by selecting Gradle (shaped like an elephant) . The deployment tasks will be in the deployment subfolder. You can double-click individual tasks to run them.
- You can also click the Execute a Gradle Task button, which opens the Gradle tasks. You can start typing to find the specific configuration you want to deploy:
Deploy scripts in bulk
./gradlew.bat to invoke the Gradle wrapper.| Feature to Deploy | Command |
|---|---|
| All extensions | |
| All listeners | |
| All script fields | |
| All jobs (including Escalation Services) | |
| All Behaviours | |
| All workflows | |
| All script manager scripts | |
Deploy individual scripts
You can deploy individual scripts by using the description for listeners or the name for script jobs and script fields.
./gradlew "deploy-job-Create time logging issue"
./gradlew "deploy-scriptField-Date Difference"
./gradlew "deploy-listener-Add a definition of done checklist to an issue on creation"
./gradlew "deploy-workflow-Workflow with file scripts"
./gradlew deploy-behaviour-Test
./gradlew cloud:deploy-script-manager-acme-dev-ConsoleScript2.groovyIf there are errors in the YAML, the plugin will log any errors received. It will still try to create tasks for any good configurations it finds, so you may be able to continue work with partially correct configuration. Still, do try to correct any errors you see so that you can proceed with deployments for all of your configuration.