-
Log into JIRA and go to
Account Settings
>Security
>Create and manage API tokens
(or visit https://id.atlassian.com/manage-profile/security/api-tokens) -
Click on
Create an API token
NOTE: You are only presented this token once; be sure to save it somewhere.
-
jira_b64_username_token
: $(echo -n <user>@redhat.com:<jira_token> | base64) -
project_path
: $(pwd) <at the top level of the project containing the Cypress tests>
$ ansible-playbook setup-test.yml
-
Updates the JIRA status from
Ready
toIn Progress
-
Creates a feature branch (with the proper naming convention) off of
master
-
Generates files and populates them with skeleton code/documentation
$ ansible-playbook finish-test.yml
-
Stages the changes to the test/feature files if any are made and commits them
-
Updates JIRA status from
In Progress
toReady to Review
NOTE: You will need to manually push your changes (for now). Once you've done so, create a merge request and add it as a comment in the corresponding JIRA story.
{ "transitions": [ { "id": "21", "name": "In Progress", }, { "id": "31", "name": "Done", }, { "id": "41", "name": "ToDo", }, { "id": "51", "name": "Blocked", }, { "id": "61", "name": "Ready To Demo", }, { "id": "71", "name": "Ready", }, { "id": "81", "name": "Ready To Review", } ] }
-
Arguably more trouble than itβs worth/goes against best practices (in
finish-test.yml
):-
Automate pushing to Git and creating a merge request
$ git push --set-upstream origin {{ feature_branch }} --no-verify -o merge_request.create -o merge_request.target=master
-
Grab the merge request URL and add it as a comment in the JIRA story with another POST request
-
-
Have the user override the JIRA id in a separate playbook for moving cards
-
Add more descriptive prerequisites for when to run a playbook and when not to (i.e. if a certain action has already been done) in the README