I am unsure about some syntax I am putting together for a Jenkins pipeline step where I want to replace part of a command line arg (for a filename) in a shell script with a variable I have defined
sh "npx cypress run --config-file cypress/cypress.$e2eEnvironment.json --env $envCredentials || true"
I think what I have above will look for a variable $e2eEnvironment.json but I dont want that as I need to keep the .json as is in the cli arg. E.g. if I have an $e2eEnvironment value set to integration then the value should get built as cypress/cypress.integration.json
Can someone guide me here please?