# GitLab Integration Guide This project is integrated with GitLab project **V9** (ID: 79690840) for mirroring, CI/CD, and AI features. ## 1. Project Details - **Project URL**: [https://gitlab.com/a6-nuna-9v/V9](https://gitlab.com/a6-nuna-9v/V9) - **Owner**: Eii Juu (ejuu53899) - **Email**: ejuu53899@gmail.com ## 2. Synchronization (GitHub to GitLab) The script `scripts/sync_to_gitlab.sh` is used to push the current code to GitLab. ### Setup Update `config/vault.json` with your GitLab Project Access Token: ```json { "gitlab": { "access_token": "your_glpat_token", "project_url": "https://gitlab.com/a6-nuna-9v/V9.git" } } ``` ### Execution ```bash export GITLAB_ACCESS_TOKEN="your_glpat_token" bash scripts/sync_to_gitlab.sh ``` **Note**: The token user (e.g., **Device NUNA**) must have the **Maintainer** role in the GitLab project settings to push code. ## 3. GitLab Runner Setup A custom runner can be registered using the provided token from the project settings. ### Registration Run the setup script: ```bash # Uses the default token: glrt-1ZsoNDOLM3I_AA8MD7Qhn286MQpwOjFiYnU4NQp1OmtxZHRpCw.01.121alw78m sudo bash scripts/setup_gitlab_runner.sh ``` The runner is configured with the tag `mql5` and uses the `docker` executor. ## 4. GitLab Duo (AI Features) The project includes a `.gitlab-ci.yml` file configured with: - **SAST**: Static Application Security Testing. - **Secret Detection**: Scans for leaked credentials. - **Code Quality**: Analyzes code structure. - **Custom AI Job**: `gitlab-duo-analysis` for market research. To enable full GitLab Duo features (Code Suggestions, Chat): 1. Go to **Settings** -> **General** in your GitLab project. 2. Expand **GitLab Duo features**. 3. Enable **Code suggestions**. ## 5. Troubleshooting If you receive a **403 Forbidden** error during sync: - Check that the token is not expired. - Verify that **Device NUNA** has **Maintainer** access at [Project Members](https://gitlab.com/a6-nuna-9v/V9/-/project_members).