Skip to main content

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 the asc-ci-components repository:
  • Install component - Set up asc in your pipeline
  • Run component - Install and execute commands in one step
  • Self-managed support - Works with GitLab.com and self-hosted instances
Repository: github.com/rudrankriyam/asc-ci-components

Quick Start

Using the Run Component

The simplest way to use asc in GitLab CI:
.gitlab-ci.yml
This creates a job named release:run that:
  1. Installs the latest version of asc
  2. Executes asc apps list
  3. Uses CI/CD variables for authentication

Component Reference

Run Component

Installs asc and runs a command in a single job.
Inputs:

Install Component

Only installs asc, 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

  1. Navigate to Settings > CI/CD > Variables
  2. Click Add variable
  3. Add the required variables:
Enable Protected to restrict access to protected branches/tags. Enable Masked to prevent values from appearing in job logs.

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:
Clone the components repository to your GitLab instance and reference it with your instance URL.

Advanced Patterns

Parallel Jobs

Dynamic Versioning

Retry Logic

Environment-Specific Deployments

Debugging

Enable Debug Output

Test Authentication

Verify Variables

Troubleshooting

  • 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
  • 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
  • Increase job timeout in .gitlab-ci.yml:
  • Set ASC_UPLOAD_TIMEOUT for long uploads
  • Check artifact paths in previous jobs
  • Verify needs dependencies 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: