Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 46,544
    • Issues 46,544
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,499
    • Merge requests 1,499
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #280582
Closed
Open
Issue created Nov 09, 2020 by Steve Abrams@sabrams2️⃣Maintainer

Predefined CI variables for the dependency proxy

Problem to solve

The dependency proxy is intended to be heavily used with CI. However users need to define their own variables or hardcode some values into their scripts.

Intended users

  • Delaney (Development Team Lead)
  • Sasha (Software Developer)
  • Devon (DevOps Engineer)

User experience goal

Provide some intuitive predefined variables for users to easily work with in CI scripts

Proposal

Although we can use many of the existing predefined variables like:

docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_SERVER_HOST":"$CI_SERVER_PORT"
docker pull "$CI_SERVER_HOST":"$CI_SERVER_PORT"/groupname/dependency_proxy/containers/alpine:latest

it would be better to use variables specific to the dependency proxy even if they are just aliases.

I propose the following variables:

  1. CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX the full group url with no protocol that could be found in the dependency proxy page for the group, for example: gitlab.com/groupname/dependency_proxy/containers
  2. CI_DEPENDENCY_PROXY_USER (alias of CI_REGISTRY_USER)
  3. CI_DEPENDENCY_PROXY_PASSWORD (alias of CI_REGISTRY_PASSWORD)
  4. CI_DEPENDENCY_PROXY_SERVER for use in docker login, the base host with no protocol, but including the port

This would allow the above commands to be used like:

docker login -u "$CI_DEPENDENCY_PROXY_USER" -p "$CI_DEPENDENCY_PROXY_PASSWORD" "$CI_DEPENDENCY_PROXY_SERVER"
docker pull "$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX"/alpine:latest

The CI_DEPENDENCY_PROXY_GROUP_URL variable being the most beneficial since it is not possible to build it using other existing variables.

Edited Dec 08, 2020 by Tim Rizzi
Assignee
Assign to
Time tracking