Push and pull packages between GitLab CI/CD and Cloudsmith
GitLab CI/CD gives your team a powerful pipeline engine. Cloudsmith gives it a proper home for packages. Connect the two and your pipeline stages can push built artifacts into Cloudsmith and pull dependencies from it, giving you a fully managed, secure artifact repository at every stage of your build.
How we support GitLab CI/CD
Why teams integrate Cloudsmith with GitLab CI/CD
Frequently asked questions
Add your Cloudsmith API key as a CI/CD environment variable named CLOUDSMITH_API_KEY in your GitLab repository settings. The Cloudsmith CLI reads this variable automatically, so no credentials ever appear in your pipeline logs or .gitlab-ci.yml file.
Cloudsmith supports 30+ formats including Docker, npm, Python (PyPI), Maven, Gradle, Ruby Gems, Helm, NuGet, Debian, RPM, Cargo, Terraform modules, and more. You can push built packages or pull dependencies using either the Cloudsmith CLI or native package tooling such as pip install or helm pull directly in your pipeline stages.
GitLab's package registry covers a limited set of formats and lacks dedicated vulnerability scanning, OPA-based policy enforcement, and CDN-backed global distribution. Cloudsmith is purpose-built for artifact management and gives you a single, consistent registry for every format your pipelines produce, with enterprise-grade security controls included.
Yes. The integration relies on the Cloudsmith CLI or native package tooling inside your pipeline steps, so it works identically whether your GitLab instance is hosted on gitlab.com or running on your own infrastructure. There is no special configuration required for self-managed GitLab.
Install the Cloudsmith CLI in a pipeline step, set CLOUDSMITH_API_KEY as a CI/CD variable, then call cloudsmith push FORMAT OWNER/REPOSITORY PACKAGE_FILE to publish, or configure native tooling to pull from your Cloudsmith repository URL. Full examples for each supported format are available in the Cloudsmith docs at docs.cloudsmith.com/integrations/integrating-with-gitlab-cicd.
Yes. Every package pushed to Cloudsmith is scanned automatically against known vulnerability databases. You can configure vulnerability policies to quarantine or reject packages that breach your risk thresholds, blocking unsafe artifacts before any consumer can pull them.
Yes. Cloudsmith's Enterprise Policy Manager uses OPA Rego to express policy-as-code. You can restrict which package versions, licenses, or dependency chains are permitted at upload time, giving you a consistent enforcement point regardless of which pipeline or team is pushing.
Store your API key as a masked CI/CD variable in GitLab repository or group settings. For native package tooling that requires a credentials file, use a GitLab file variable so the key is written to disk only during the pipeline run and never checked into source control.
Yes. A single Cloudsmith organisation can host repositories for every format your pipeline produces. One API key covers all of them, so you can push Docker images, Helm charts, and Python wheels from the same pipeline without managing separate credentials or registries.
Yes. Cloudsmith captures every upload, download, and policy event in detailed audit and client logs. You can export these logs to S3 or Azure for long-term retention and analysis, giving you full traceability across all your CI/CD pipelines.