jira-automation-scripts
Scripts to aid in automating Jira actions and CI tasks.
To build
First, update the VERSION
in version.rb. Then, to build the gem use the command gem build NG1BuildHelpers.gemspec
. This will create the gem, which can then be used by your applications.
To use
The first build step is to run ng1build circleci_fetch_git_range
while exporting the value returned in the environment variable CIRCLECI_COMMIT_RANGE
. This will go through CircleCI to find the last successful build for a given [target_branch] and will use that as a range to feed the next step. You can pass the CircleCI token in as a paramter or set it as an environment variable 'CIRCLE_TOKEN'
export CIRCLECI_COMMIT_RANGE=`ng1build circleci_fetch_git_range --url https://circleci.com/api/v1.1 --branch [target_branch] --project [your_project] --company [your_company] --token [your_token_here] --export`
The second step is to run ng1build jira_update_fix_version
which will use the previously provided commit range to look through the Git history and find stories with a given [issue_matching_regex] that are in the 'Testing' status. Once it finds those, it will create a new Fix Version and set those tickets version and transition those to the 'In Acceptance' column.
ng1build jira_update_fix_version --site [jira_base_url] --username [jira_username] --password [jira_password] --build_number [build_number] --regex [issue_matching_regex] --version [version_number] --project [jira_project_name] --version_name [jira_version_name]