circleci-orb
circleci-orb copied to clipboard
feat: wrap run as a command to support circleci_ip_range
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.
Is it good? Is there anything else you would want me to add?