Members and points repartitions:
- Lubrat Jilian - 100 points
- Michelozzi Antoine-Marie - 100 points
- Galli Evan - 100 points
- Gripari Alexandre - 100 points
- Falcoz Alban - 100 points
- Lassauniere Theo - 100 points
The Multi-Fidelity Card (MFC) system is designed to allow customers to benefit from discounts on purchases, while
enabling partners to offer benefits and access statistics on the benefits they provide.
For example, it allows partners to see how many customers use it on a given day and whether it increases foot traffic
during the time slots in which they offer benefits.
You can start the Docker containers using two different modes and commands:
For development mode, you need to be connected to the university's VPN and then run the following command:
docker compose -f docker-compose-dev.yml up -dThis command build all the images from the Dockerfiles, during the build all dependencies are pulled from Artifactory, then it starts the containers.
For deployment mode, you first need to run the following command:
docker login ghcr.io -u USERNAMEEnter a token as the password. For more details, refer to this documentation.
After that, you can use the following command to launch the containers:
docker compose up -dIn this mode, pre-built Docker images are pulled from GitHub Packages. This images are pushed by Jenkins at each commit
and are tagged according to the branch (latest for main, name of the branch otherwise).
Since all commits are tested by Jenkins before producing the images, using them, reduces potential issues in a
production environment.
After some time, each container is started, in the right order from their dependencies, waiting for their health check command to be OK.
To interact with the containerized CLI, you can use:
docker attach cliAt startup, the CLI should display the following prompt:
shell:>Running the help command will provide guidance on how to use the CLI.
Our CI/CD pipeline consists of several services that communicate with each other to keep the Docker images and dependencies files up to date. The following services are used:
- GitHub: Hosts the source code, triggers build events via a webhook, and stores the built Docker images as packages.
- Smee.io: Receives webhook events from GitHub and forwards them to Jenkins.
- Jenkins: Triggers builds and tests on each push to the branches. It interacts with GitHub Packages and Artifactory.
- Artifactory: Used to store the dependencies files generated by Jenkins.
Go to the settings of your GitHub repository.
In the Webhooks section, add a new webhook with the URL of your Smee.io instance and select the events to listen for (
e.g., Push on main branches).
Set up a channel on Smee.io to redirect GitHub webhook events to Jenkins.
- Install Jenkins and configure the necessary access to allow it to interact with GitHub.
This includes adding credentials (access tokens or SSH keys) that allow Jenkins to clone repositories in response to Smee webhooks and push artifacts on Artifactory. - Create a Jenkins worker and grant it the necessary permissions to execute builds and access server resources. Adding credentials to enable the worker to connect to the server.
- Create and configure a Jenkinsfile in the project to define the CI/CD pipeline. This should include:
- The checkout step to retrieve the source code from GitHub.
- Compilation and execution of automated tests.
- Generation of artifacts (.jar files, Docker images, etc.).
- Deployment of artifacts to GitHub Packages and Artifactory.
-
Java Dependencies:
After compilation, dependencies will be pushed to Artifactory.
The following Maven command is used for that purpose:mvn deploy
-
Docker Images:
Once the build is successful, Jenkins will build the Docker image.
Docker images will be pushed to GitHub Packages using the following command:docker push ghcr.io/repository/imageName:TAG