Welcome to CircleCI Discuss!
You’re on the right track here, and I would be happy to assist you further with this. This looks like a snippet for your configuration, so I may be missing some information on how this job is defined, but I’ll try and make this example as clear as possible. Please let me know if you require any clarification.
The job containing the parameter
kafka should be defined as a reusable command syntax.
run-kafka-command: # This is just a name, I encourage this to be changed!
- run: echo << parameters.kafka >> #...command as you already have included
From your snippet, it looks like you have this part complete. The error here is likely how the command is being called. This is how we can run the command twice in the build job.
- image: cimg/node # Please continue using the image of your choice!
command: "echo Hello!"
As you can see, we call the command twice within the
build-pr job, and then only call the
build-pr job later. Once you make your changes, run
circleci config validate to see if everything compiled properly. If you run into any trouble at this stage, please feel free to reply with any errors that crop up.
I hope this helps you with your building adventure!