Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to setup environment for unity tests (development)?

External (to jira) script needs to be rewritten.
The script uses REST API to work with Jira on prem.

The script takes:
1) epic created to document some specific project (with affected and fix versions, components and some custom fields defined)
2) template - other epic with all its issues that are generic so that can be applied for most of development projects
The script "clones" issues from the 2. template, populates fields defined in 1. epic and assign just created issues to the 1. epic. As the output, epic 1. gets the same issues structure with their subjects, descriptions, labels (and few other fields) as in template that are specific to the 1. epic (components, versions etc.).

To follow best development practices, I'd like to have automated setup for env I'd use for unit tests.

I'm considering two options so far:
1) docker

docker volume create --name jiraVolume
docker run -v jiraVolume:/var/atlassian/application-data/jira --name="jira" -d -p 8080:8080 atlassian/jira-software
2) vagrant
Vagrant.configure("2") do |config| = "ubuntu/focal64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "8192"
vb.cpus = 2
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt update
sudo apt install --yes adoptopenjdk-8-hotspot
sudo sh -c 'echo "deb stable contrib" >>/etc/apt/sources.list'
sudo apt-key add public
sudo apt-get update
sudo apt-get install --yes atlassian-plugin-sdk
atlas-create-jira-plugin -a myPlugin -g com.atlassian.tutorial -v 1.0.0-SNAPSHOT -p com.atlassian.tutorial.myPlugin --non-interactive
cd myPlugin/ && sudo atlas-run --jvmargs "-Xms512m -Xmx768m"
sudo atlas-run --jvmargs "-Xms512m -Xmx768m" does not work well this way
# vagrant ssh and run in from machine
# probably fork needed or run as daemon

Both are semi-automatic, as before any (admin) user can be used via REST, someone has to login to jira and setup the account (language, avatar, etc).
Any idea how to automate that in one or another case (docker or vagrant)?

1 comment

Nice hints can be found in this project :


Log in or Sign up to comment

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you