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|
config.vm.box = "ubuntu/focal64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "8192"
vb.cpus = 2
end
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt update
sudo apt install --yes adoptopenjdk-8-hotspot
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"
SHELL
end
#
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)?