GitLab CI Integration
Use official GitLab CI components to integrate App Store Connect CLI into your pipelines
Official Components
GitLab CI integration is provided through reusable components in theasc-ci-components repository:
- Install component - Set up
ascin your pipeline - Run component - Install and execute commands in one step
- Self-managed support - Works with GitLab.com and self-hosted instances
Quick Start
Using the Run Component
The simplest way to useasc in GitLab CI:
.gitlab-ci.yml
release:run that:
- Installs the latest version of
asc - Executes
asc apps list - Uses CI/CD variables for authentication
Component Reference
Run Component
Installsasc and runs a command in a single job.
Install Component
Only installsasc, allowing you to run multiple commands:
Complete Pipelines
TestFlight Deployment
.gitlab-ci.yml
Multi-Stage Release
.gitlab-ci.yml
Metadata Sync Pipeline
.gitlab-ci.yml
Scheduled Monitoring
.gitlab-ci.yml
Authentication Setup
CI/CD Variables
- Navigate to Settings > CI/CD > Variables
- Click Add variable
- Add the required variables:
Base64 Encoding
Using Private Key File
Alternatively, store the raw private key and write it to a file:Self-Managed GitLab
For self-hosted GitLab instances, components work identically:Advanced Patterns
Parallel Jobs
Dynamic Versioning
Retry Logic
Environment-Specific Deployments
Debugging
Enable Debug Output
Test Authentication
Verify Variables
Troubleshooting
Component not found
Component not found
- Verify component URL matches your GitLab instance
- Check repository exists and is accessible
- Ensure you’re using the correct branch/tag (
@main,@v1, etc.) - For self-hosted: confirm components are published to the instance
Authentication failed
Authentication failed
- Verify all three variables are set in CI/CD settings
- Check that variables are not expired or masked incorrectly
- Ensure private key is properly base64-encoded
- Test credentials locally with the same key
Job timeout
Job timeout
- Increase job timeout in
.gitlab-ci.yml: - Set
ASC_UPLOAD_TIMEOUTfor long uploads
Artifacts not found
Artifacts not found
- Check artifact paths in previous jobs
- Verify
needsdependencies are correct - Ensure artifacts haven’t expired
Best Practices
Use protected variables
Mark sensitive variables as Protected and Masked to prevent exposure in logs.
Pin component versions
Use specific tags instead of
@main for stability:Set timeouts
Configure appropriate timeouts for upload operations:
Use manual triggers
Require manual approval for production: