circleci-orb icon indicating copy to clipboard operation
circleci-orb copied to clipboard

feat: wrap run as a command to support circleci_ip_range

Open guilatrova opened this issue 3 years ago • 2 comments

This PR creates a command named run_cypress (I couldn't reuse the run name because it conflicts with the job), and wraps it with the job named run.

Motivation

In my company, our staging environment is limited to just a few IPs forcing us to enable the circleci_ip_ranges flag. For some reason, I couldn't pass this flag through parameters.

So it made me realize the best way to avoid code duplication would be to create a command, and wrap it up so it's retro compatible for those who are using the job, at the same time allowing other people (i.e. me) to include extra parameters/flags to the job.

Let me know what you think. Right now, we literally copied the whole orb code for run, pasted it in our CircleCI config just to pass a single flag.

guilatrova avatar Oct 23 '21 15:10 guilatrova

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 23 '21 15:10 CLAassistant

Is it good? Is there anything else you would want me to add?

guilatrova avatar Oct 28 '21 19:10 guilatrova