Conditionally setting parameters

Is it possible to set parameters in the same was as job/workflows based on filters?

I’m looking at the Cypress Orb (a circleci partner) and was hoping to set the “record” option of the cypress/run job only on certain branches.

I think the easiest way to achieve this is to split this into its own job and use the standard filters. Is this not an option for your use case?

Thanks for the response @levlaz! It is an option, I was just hoping to avoid it due to the large amount of duplication that will occur.

I’m using the cypress/run job in my workflow. In order to have a singular parameter (record in this case) I have to duplicate the - cypress/run: ... with all of it’s additional parameters that stay the same. It’s not a huge issue, just hoping to be a bit more DRY

That makes a lot of sense. I don’t think its possible in the current state, unless you write your own version of this orb step and use that instead.

There are a couple of other instances where I would hope to be able to “override” the actual step of a given orb.

Recently, I was working with the python orb which makes a lot of assumptions about how your project is set up. It would be cool if we could override specific parts out of the box. This might be a really useful enhancement for orbs as a whole.

This is similar in some ways to this feature request: https://ideas.circleci.com/ideas/CCI-I-895

I added a new idea here (https://ideas.circleci.com/ideas/CCI-I-1482) however, for some reason ideas don’t seem to be showing up. :confused: May be a bug in Aha.

1 Like