CI lifecycle - sebascm/taxi-booking GitHub Wiki
CI lifecycle
In this wiki's page will be defined the lifecycle of CI needed in this project.
Phases
- Setup
- Validate
- Compile
- Tests
- Verify
- Deploy
- Benchmark
Development pipeline
Executed only on the "enhancement" branches
Setup
Creates the directories to store artifacts
- Input: None
- Output: Directories to store artifacts
Validate
Its corresponds with the phase 'validate' of Maven. Validate that the project is correct and checks the code style (checkstyle and sortpom)
- Input: workspace
- Output:
- Phase works correctly: next phase starts
- Phase gives an error: reports with the errors are stored
Compile
Its corresponds with the phase 'compile' of Maven. Compile the source code of the project
- Input: workspace validated
- Output:
- Phase works correctly: next phase starts
- Phase gives an error: failure and skips to post stage
Tests
Its corresponds with the phase 'tests' of Maven. Test the compiled source code using JUnit.
- Input: workspace with compiled resources.
- Output:
- Phase works correctly: next phase starts
- Phase gives an error: reports with the test errors are stored
Pre-production pipeline
Executed only on the "dev" branch
Verify
Its corresponds with the phase 'verify' of Maven. Run any checks on results of integration tests to ensure quality criteria are met. Also runs Spotbugs.
- Input: workspace tested
- Output:
- Phase works correctly without bugs: next phase starts
- Phase works correctly but with bugs: reports with bugs are stored
Deploy
Its corresponds with the phase 'deploy' of Maven. Copies the final package to the remote repository for sharing with other developers and projects.
- Input: workspace verified
- Output:
- Phase works correctly: uploads the compressed packages.
- Phase gives an error: failure and skips to post stage
Benchmark
Run performance tests on the project.
- Input: workspace verified.
- Output:
- Phase works correctly: reports with benchmarks
Due to that it goes after test phase and that phase has to work in order to continue the pipeline, this phase tests shouldn't fail but a timeout could happen because of the environment.
Post stage
- Always
- Upload the reports artifact
- Notify the results
- Success
- Upload the executable artifact
- Cleanup
- Clean the workspace
If one of the stages fails, the pipeline skips all stages. 'Deploy' stage only runs on master branch.
Scheduled pipeline
Every day at 12pm will execute all the stages defined above on the "master" branch