Promoting Code into Production
Introduction
At a high level, promoting code into production works as follows:
Only promote next into production
All code to go into production should be in the next branch
The production branch name must be main
Some older repos might have a master branch. Delete or rename to
main. We will use main across all repos that we commission.
Preparation Checks and Tests
Conduct regression Testing
Update docassemble package metadata (in
setup.pyinsetup()). Check the following:- name - should match repository name (Note: the name may not match if the repository has been provisioned according to the Provisioning a New Docassemble Repository standard
- version number - should match milestone
- update version number in
setup.py - update versionnumber in
__init.py__
- description - make sure it's meaningful
- long_description
- author_email (should be
XXXX@digitallawlab.org) (TBC) - licence - should be `Copyright (c) YYYY Flinders University. All Rights Reserved'
- url - should be
https://flinders.edu.au
Review
README.md. Make sure it makes sensecheck the main program is called
main.yml. Rename if necessary
Add Digital Law Lab attribution?
Add step to update changelog
Example workflow
Before promotion
- Agreement reached on issues to address for next milestone for a project
- Milestone created under Issues for that project
- Milestone name matches this Policy
- Once all Issues are addressed a PR is raised to merge into
next- multiple PRs may be raised if necessary
Only Mark Ferraretto should approve PRs merging into main
Promotion
- Check no outstanding issues for Milestone. Address and start again otherwise
- Do the merge
- Do the production tests and checks
- Merge
nextintomain - Tag
mainwith Milestone - Pull
maininto playground and install package on development servernotePull Main from the
Packagesfolder in the Playground. Don't usedocassemble_playground_manager.pyfor this step. The playground should sanity check the integrity of the package, whichdocassemble_playground_manager.pydoes not. - Additional tests (if required)
- Send link to app to client. Request approval
- if there are changes, make a new
next, make changes to a new milestone and repeat process
- if there are changes, make a new
- On approval (with no changes) milestone tag of app can be installed into production server
- send produciton link to client. Confirm access
- work with client to make app available (eg: work with clients' web developer to add app to website)