This repository contains the CI and CD pipelines for our Flutter application, running on a self-hosted runner on an Azure VM. Our team members are Samer Mansouri, Ahmed Karray, Elyes Belgouthi, and Omar Maalej.
- Samer Mansouri
- Ahmed Karray
- Elyes Belgouthi
- Omar Maalej
The CI pipeline runs on pull requests to the main branch. It includes the following steps:
- Checkout Code: Checks out the repository code.
- Set up Flutter: Sets up the Flutter environment with the specified version.
- Install Dependencies: Installs necessary dependencies for the Flutter project.
- Run Linter: Runs the Flutter linter to ensure code quality.
- Run Tests: Runs the Flutter tests.
- Install Ruby and Bundle Audit: Installs Ruby, Bundler, and Bundle Audit for dependency checking.
- Install OWASP Dependency-Check: Installs OWASP Dependency-Check for identifying vulnerabilities in dependencies.
- Verify OWASP Dependency-Check Installation: Verifies the installation of OWASP Dependency-Check.
- Run OWASP Dependency-Check: Runs OWASP Dependency-Check on the project dependencies.
- Send Success Notification to Slack: Sends a success notification to Slack if all steps pass.
- Send Failure Notification to Slack: Sends a failure notification to Slack if any step fails.
The CD pipeline runs on pushes to the main branch. It includes the following steps:
- Checkout Code: Checks out the repository code.
- Set up Flutter: Sets up the Flutter environment with the specified version.
- Prepare Environment: Prepares the environment, including creating necessary directories and setting environment variables.
- Install Bundler: Installs Bundler for managing Ruby gems.
- Setup Fastlane: Sets up Fastlane for deployment.
- Install Dependencies: Installs necessary dependencies for the Flutter project.
- Run Linter: Runs the Flutter linter to ensure code quality.
- Run Tests: Runs the Flutter tests.
- Build: Builds the Flutter APK.
- Deploy with Fastlane: Deploys the APK using Fastlane.
- Send Success Notification to Slack: Sends a success notification to Slack if all steps pass.
- Send Failure Notification to Slack: Sends a failure notification to Slack if any step fails.
The CI pipeline is triggered by pull requests to the main branch. To run the CI pipeline, create a pull request with your changes, and the pipeline will automatically run the defined steps.
The CD pipeline is triggered by pushes to the main branch. To run the CD pipeline, push your changes to the main branch, and the pipeline will automatically run the defined steps.
Both pipelines send notifications to a Slack channel to inform the team of the status of the build. Notifications include details about whether the build was successful or if there were any failures.
Ensure that the SLACK_WEBHOOK_URL secret is configured in the repository settings to enable Slack notifications. This secret should contain the webhook URL for your Slack channel.
The pipelines are designed to run on a self-hosted runner on an Azure VM. Ensure that the VM has the necessary dependencies installed and that the environment variables are correctly configured.
By following these steps and configurations, our team can ensure a smooth CI/CD process for the Flutter application, with automated linting, testing, dependency checking, and deployment.





