Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable global configuration of registry-url parameter #101

Open
thallesdaniell opened this issue Jan 11, 2025 · 1 comment
Open

Enable global configuration of registry-url parameter #101

thallesdaniell opened this issue Jan 11, 2025 · 1 comment
Assignees

Comments

@thallesdaniell
Copy link

Context and Description:

During our migration to utilizing CircleCI orbs, specifically the gcp-gcr orb, we observed that certain parameters, such as registry-url, consistently held the same value across all jobs within a pipeline. Currently, the orb requires specifying the registry-url parameter individually in each job or command, leading to repetitive configurations and increased potential for errors.

To enhance efficiency and maintainability, we propose introducing the capability to define the registry-url parameter globally within the gcp-gcr orb. This adjustment would allow users to set the parameter once at a higher level, ensuring uniformity across all jobs and commands, and reducing redundancy in pipeline configurations.

Benefits:

  • Consistency: A global setting ensures that all jobs reference the same registry-url, minimizing discrepancies.

  • Simplified Configuration: Reduces the need to repeatedly specify the same parameter, streamlining the setup process.

  • Reduced Error Potential: With a single source of truth for the registry-url, the likelihood of misconfigurations decreases.

Proposed Implementation:

Introduce a top-level configuration option within the gcp-gcr orb to allow users to define the registry-url globally. This setting would automatically apply to all relevant commands and jobs within the orb, unless explicitly overridden at a lower level.

@thallesdaniell thallesdaniell changed the title Proposal: Enable Global Configuration of registry-url Parameter in gcp-gcr Orb Enable Global Configuration of registry-url Parameter in gcp-gcr Orb Jan 11, 2025
@thallesdaniell thallesdaniell changed the title Enable Global Configuration of registry-url Parameter in gcp-gcr Orb Enable global configuration of registry-url parameter Jan 11, 2025
@david-montano-circleci
Copy link
Contributor

Hello @thallesdaniell , thank you for opening the issue and for your comments.
Orbs usually have both jobs and commands. Let's check both scenarios.

With jobs, users can create their own on the fly commands but also reuse existing commands from the same or other orbs.
The current two available jobs for this orb have a registry-url parameter which has a default value of gcr.io and this parameter is passed down to the commands that are used in the jobs.

Commands are more granular and usually depend on a script to run some logic. Users can identify parts that can be passed down as parameters and this allows jobs to invoke the commands with parameters that where initialized only once at the job level.

This is exactly what is happening with the registry-url already and this is why you find it as a parameter in all jobs and commands in this orb. Given all this, I think the orb is already behaving as you are proposing it to work. Maybe I am missing something? Please feel free to clarify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants