I’ve got a monorepo where each folder is a separate set of code and tests, so while I was able to get run a very basic config.yml without any trouble, I really need some dynamic config eventually. None of the split-config/config-splitting orbs seem to work as advertised (or I’m doing it wrong), so I wanted to try something simpler, but I’m struggling to get reusable commands and persistent workspaces working.
Following circleci’s examples and tutorials, I was thinking it would be nice if I could put the attach_workspace steps in a command for reuse, but I’m getting ‘command not found’ when I try to do that.
So my current config looks something like this:
parameters: commands: downstream: steps: - attach_workspace at: /tmp/workspace - run: #(check if that worked, copied directly from circle example) executors: docker-executor: docker: - image: the_image jobs: first_job: #(this one works) - run: #setup some stuff - persist_to_workspace #this seems to work correctly second_job: # (doesn't work) executor: docker-executor steps: - run: downstream #(command that it says it can't find, which is defined right at the top) - run: my tests #(it never gets this far)
Is it impossible to do it this way? I’d really like to take advantage of reusable commands, but if they don’t work for the thing I’m trying to do, it would be nice to know, vs. I just still don’t really understand the syntax of what needs to go where.