BACKEND: CICD + Docker + Temporary hosting + general clean-up.
BACKEND: CICD + Docker + Temporary hosting + general clean-up.
What does this Merge Request (MR) do?
1. CICD Practices + pipeline implementation
- Implemented
gitlab-ci.yml
and setup a CICD pipeline. - This is needed as it will test, build and deploy our project automatically when a MR is created or merged.
- It automates the software development cycle and is good practice that will lead to less failures and better code quality.
- Also adds eslint to remove bad code - pipeline will fail if eslint fails in ‘test’ stage.
- So far includes 3 stages for now:
-
-
test
: Which automatically will run all unit tests in the project.
-
-
-
build
: Which builds the project/ artifact
-
-
-
deploy
: currently deploys the artifact to firebase.
-
- If anymore stages are necessary / need to be automated it can be done through the
yaml
file.
*The pipeline requires a GitLab runner to begin. At the moment we're using a shared one so the pipeline might take a while to complete. When we properly configure hosting, we can set up our own to speed it up.
2. Docker for testing locally
- Setup a
Dockerfile
so the project can be easy to run -> as we can containerize the application. - This is beneficial for testing locally as it's an isolated environment.
- This project will require a lot of dependencies and will prevent the classic 'it works on my machine' problem.
3. Temporary hosting on firebase
- Setup a basic temporary project in firebase.
- This will be changed in future. Just used the test the yaml file for now.
4. General Clean-up
- Removed
package.json
andpackage-lock.json
in the root directory. - Added instructions if anyone wants to use Docker from now.
Edited by TONY CALLAGHAN