@twexchangesolutions/hubot-jira-deployment

0.15.4 • Public • Published

jira-deployment-hook

Ensures that all deployments are associated with a Deployment Task and that that Deployment Task has all the proper approvals per our Audit Requirements.

Requirements:

  • Set of Hubot Scripts
    • @hubot deploy TW-123 where TW-123 is the Deployment Task to trigger
    • @hubot check TW-123 which performs a check of deployment task to ensure audit requirements are in check.
    • Help descriptions are output when running @hubot help
  • 1 Deployment Task must be specified
  • A Deployment Task must first go through a check operation before it can be deployed.
  • Deployment Tasks must have one or more issues linked as relates to.
  • During a check, the Deployment Task must be in the QA Approved state
    • The last change time on the Deployment Task must be the same as the last transition time, or hubot will move the Deployment Task back to Open and exit with an error.
    • If the two times are the same, it will transition to a Hubot Approved state.
  • During an actual deployment, the same check above happens, but checks for Hubot Approved state instead of QA Approved.
  • Each issue linked to a Deployment Task must be one of:
    • Story
    • Maintenance Task
    • Bug
  • Each of the issues linked (or one of their children) in the Deployment Task must appear in the Git history range at least once.
  • Each linked Story must:
    • In the 'Ready to Deploy' state
    • Linked to approved initiative
    • Have no open Sub-tasks or Feature Defects
  • Each linked Maintenance Task must:
    • In the 'Ready to Deploy' state
    • Have no open Sub-tasks or Feature Defects
  • Each linked Bug must:
    • In the 'Ready to Deploy' state
    • Have no open Sub-tasks or Feature Defects
  • Story, Bug, or Maintenance Task issues that are mentioned in the Deployment Task Audit Exceptions do not have to pass the above restrictions.1
  • Every linked issue or one of its subtasks or feature defects must appear in the Git History since last deployment
  • Any full 40 character git SHA mentioned in the Deployment Task Audit
  • Exceptions will be ignored during the cross reference step if it has no issues tagged in it. If there is an issue tagged in the commit that has its SHA in the Deployment Task Audit Exceptions field, that issue's key will still be used in the cross reference check.
  • When all checks are valid (NOT DONE IN CHECK MODE):
    • Tag the production build number in the Deployment Task.
    • Transition each linked relates to issue that is not mentioned in the Deployment Task Audit Exceptions field to Deployed.
    • Need to authenticate to Jira in order to do these, that configuration should come from environment variables (preferrably preffixed with HUBOT_) using a Jira Auth Token.
  • Detailed error output
    • Error output should list all offenses so they can all be easily addressed.
  • Progress output will be helpful for QA to know that Hubot is triggering builds and waiting for them to complete.
  • Should be fast, this will require a number of network requests so the work should be launched as parallel as possible.

Footnotes:

  1. This is what will buy us the flexibility we should need as it allows QA to document exceptions of any kind without complex link relationship types.
s parallel as possible.

Deployment Tasks can be found at: http://jira.extendhealth.com/browse/TW-4384?jql=issuetype%20%3D%20%22Deployment%20Task%22

Production Publishers: http://teamcity.extendhealth.com/project.html?projectId=ProductionPublish&tab=projectOverview

Readme

Keywords

none

Package Sidebar

Install

npm i @twexchangesolutions/hubot-jira-deployment

Weekly Downloads

1

Version

0.15.4

License

MIT

Unpacked Size

303 kB

Total Files

22

Last publish

Collaborators

  • kanoyugoro
  • mtscout6
  • twexchangesolutions