This document provides an overview of the Mega City Cab Reservation Service project, detailing the version control techniques used and the daily updates applied to the project. The project is hosted on a public GitHub repository for easy access and collaboration.
- Log in to your GitHub account.
- Click on the New button to create a new repository.
- Name your repository
mega-city-cab-backend. - Set the repository to Public.
- Initialize the repository with a README file.
- Click on Create repository.
- Clone the repository to your local machine:
git clone https://github.com/dinethjanitha/mega-city-cab-backend.git
- Navigate to the project directory:
cd mega-city-cab-backend
- Master Branch: The main branch where the stable code resides.
- Feature Branches: Separate branches for each new feature or bug fix.
- Naming convention:
feature/feature-nameorbugfix/bug-description
- Naming convention:
- Release Branches: Branches used for preparing a new production release.
- Naming convention:
release/version-number
- Naming convention:
- Follow a consistent format for commit messages:
[TYPE] Short description of the change [TYPE] can be one of: - feat: A new feature - fix: A bug fix - docs: Documentation changes - style: Code style changes (formatting, etc.) - refactor: Code refactoring - test: Adding or updating tests - chore: Other changes that don't modify src or test files
- Use semantic versioning for tags:
git tag -a v1.0.0 -m "Initial release" git push origin v1.0.0
- Created the GitHub repository.
- Added the initial project files.
- Commit: 8ae040a309dd0cdb17c05ce8c6c7d126afc68fa4
- Created the
feature/user-managementbranch. - Implemented user registration and login.
- Merged the feature branch into the
masterbranch. - Commit: b0df89d12edfdfc398d4f66757d98d3d706a55cd
- Tag:
v1.1.0
- Created the
feature/Cab-Managementbranch. - Implemented cab adding and managing.
- Merged the feature branch into the
masterbranch. - Commit: 44d820fe17806a0cbf0526d47a365b12183bc555
- Tag:
v1.2.0
- Created the
feature/booking-systembranch. - Enhanced the booking system to support multiple cabs and advanced scheduling.
- Merged the feature branch into the
masterbranch. - Commit: a06b30c1ce8655ea1a4cf8d435a40baec010e676
- Tag:
v1.3.0
This Jenkins pipeline script defines a Continuous Integration/Continuous Deployment (CI/CD) process for the mega-city-cab-backend project. The pipeline is composed of several stages that automate the workflow from code checkout to deployment. Below is a detailed description of each stage:
- Agent: The pipeline runs on any available Jenkins agent.
- Tools: Ensures that Maven version 3.9.9 is installed on Jenkins.
-
Checkout
- Purpose: Retrieves the latest code from the GitHub repository.
- Steps:
- Uses the
gitcommand to clone the repositoryhttps://github.com/dinethjanitha/mega-city-cab-backend.git.
- Uses the
-
Build
- Purpose: Builds the project using Maven.
- Steps:
- Executes
mvn clean packageto clean the project and package it into a deployable artifact.
- Executes
-
Test
- Purpose: Runs the unit tests for the project.
- Steps:
- Executes
mvn testto run the project's tests and ensure code quality.
- Executes
-
Deploy
- Purpose: Deploys the built application locally.
- Steps:
- Runs the command
java -jar target/mega-city-cab-backend-0.0.1-SNAPSHOT.jar &to start the application using the generated JAR file.
- Runs the command
-
Success
- Purpose: Provides feedback on successful deployment.
- Steps:
- Prints a message
Deployment was successful!.
- Prints a message
-
Always
- Purpose: Ensures the workspace is cleaned up after the pipeline execution.
- Steps:
- Executes
cleanWs()to delete the workspace files and directories.
- Executes
The public GitHub repository for the Mega City Cab Reservation Service can be accessed at: GitHub Repository
This documentation highlights the version control techniques and daily updates applied to the Mega City Cab Reservation Service project. By following a structured approach to version control, we ensured a smooth and efficient development process, enabling easy collaboration and continuous integration.