CI and deployment Flashcards
continuous delivery
deploys built release to test and staging environments but does not release to production with out manual intervention/approval
Continuous deployment
releases to production after automatic testing has been completed in dev/test and staging. Only a failed test will stop the release going to prod
Continuous integration
automatic build of an application after a commit, merge or Pull request. Should include code quality tests
Static analysis
check non-running code for bugs, vulnerabilities and knows bad programming patterns/smells
Examples of static analysis tools
Sonarqube
white source bolt
PMD
White source bolt
provides license and vulnerabilities details on 3-party packages in your project
Dynamic analysis
ran against live deployed code. commonly used to run pentests against know vaubabilies like SQL injection
Examples of Dynamic analysis tools
owsap ZED ATTACK PROXY (zap)
What should unit tests be built for?
testing a single piece or a core function in isoloation.
What test data should be used in unit tests
mock data from a file
what data should be used in intergration tests
data hosted on the same DB system as the production enviormemtq
Example of a good unit test
- short and run quickly
- tests code critical to the application
- needs to be repeatable and return the same result everytime when everything is in a working state
- should not test external libaires, this should be done in intergration tests
- should not be done on combined functions and methods
When should you make a package
when code can be reused across your projects and the code does not need to be changed oftern
what is a packaged
ready to run compiled or uncompiled code depeneding on the langauge. Stored in compressed zip files that have a different exnteions based on the langauge/frameworkv
Symantec versioning
in x.x.x format. major breaking change. feature change that is backwards compatible. hotfix or patch