GitLab Integration
Set up FirmwareCI integration with GitLab repositories using access tokens and webhooks.
Prerequisites
- Repository set up with
.firmwareciinfrastructure (see Repository Setup) fwciCLI tool authenticated
Setup Steps
1. Generate Access Token
Create a token with required permissions:
Option A: Personal Access Token
- Navigate to Settings > Access Tokens in your GitLab account
- Create a token with these scopes:
apiread_repositorywrite_repository
- Save the token securely
Option B: Project Access Token
- Navigate to Settings > Access Tokens in your GitLab project
- Create a token with the same scopes as above
- Save the token securely
2. Run Integration Command
Provide the access token when running integration:
3. Configure Webhook
Set up the webhook in your GitLab project to enable automatic configuration updates:
- Navigate to Settings > Webhooks in your GitLab project
- Add the webhook URL:
- URL:
https://api.firmwareci.9esec.dev:8443 - For self-hosted instances, use your FirmwareCI server URL
- URL:
- Secret Token: Contact FirmwareCI team for the secret token
- Trigger events:
- ☑ Push events
- ☑ Merge request events
- Click Add webhook
4. Verify Integration
Push a commit to trigger the first configuration update:
Check the commit in GitLab - you should see the FirmwareCI status appear.
How It Works
Automatic Configuration Updates:
- Branch pushes: Update that branch’s configuration on the FirmwareCI
server. Each pushed branch is tracked as a
gitbranch with its own configuration, somainand feature branches stay independent (see the Branches reference). - Merge request pushes: Run validation to catch configuration errors before merge
- Branch deletion: Deleting a branch on GitLab removes the corresponding
gitbranch from FirmwareCI (best-effort); its jobs and history remain reachable.
Status Reporting:
- Configuration validation results appear as commit status
- Test results are reported back to merge requests (see Job Triggers)
HTTPS Authentication
When cloning HTTPS remotes fails, see these extra authentication options:
Environment Variables (Recommended):
Interactive Prompt (Fallback):
Generate Token:
Create a Personal Access Token with api and read_repository scopes.
